]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ppc4xx: Change LWMON5 to not use OCM for init-ram and POST anymore
authorStefan Roese <sr@denx.de>
Wed, 9 Jan 2008 09:28:20 +0000 (10:28 +0100)
committerStefan Roese <sr@denx.de>
Wed, 9 Jan 2008 09:28:20 +0000 (10:28 +0100)
This patch configures the LWMON5 port to use d-cache as init-ram and
the unused GPT0_COMP6 as POST WORD storage.

Signed-off-by: Stefan Roese <sr@denx.de>
board/lwmon5/init.S
include/configs/lwmon5.h
include/ppc440.h

index 6798e80985d63a4b1e70d6b48a2a0be09130506e..5aade72b52f302bab4415b8615f11d97207912fa 100644 (file)
@@ -57,7 +57,7 @@ tlbtab:
 
 #ifdef CFG_INIT_RAM_DCACHE
        /* TLB-entry for init-ram in dcache (SA_I must be turned off!) */
-       tlbentry(CFG_INIT_RAM_ADDR, SZ_64K, CFG_INIT_RAM_ADDR, 0, AC_R|AC_W|AC_X|SA_G)
+       tlbentry(CFG_INIT_RAM_ADDR, SZ_4K, CFG_INIT_RAM_ADDR, 0, AC_R|AC_W|AC_X|SA_G)
 #endif
 
        /* TLB-entry for PCI Memory */
index 5210024d8f2863af209cc08dbecf24d5a3a83a90..0bf536b6b59ffe3f865158d74d7a8bc05785f790 100644 (file)
 /*-----------------------------------------------------------------------
  * Initial RAM & stack pointer
  *----------------------------------------------------------------------*/
-/* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache    */
-#define CFG_INIT_RAM_ADDR      CFG_OCM_BASE    /* OCM                  */
-#define CFG_OCM_DATA_ADDR      CFG_OCM_BASE
-
+/*
+ * On LWMON5 we use D-cache as init-ram and stack pointer. We also move
+ * the POST_WORD from OCM to a 440EPx register that preserves it's
+ * content during reset (GPT0_COM6). This way we reserve the OCM (16k)
+ * for logbuffer only.
+ */
+#define CFG_INIT_RAM_DCACHE    1               /* d-cache as init ram  */
+#define CFG_INIT_RAM_ADDR      0x70000000              /* DCache       */
 #define CFG_INIT_RAM_END       (4 << 10)
-#define CFG_GBL_DATA_SIZE      256             /* num bytes initial data */
+#define CFG_GBL_DATA_SIZE      256             /* num bytes initial data*/
 #define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
-#define CFG_POST_WORD_ADDR     (CFG_GBL_DATA_OFFSET - 0x4)
-#define CFG_INIT_SP_OFFSET     CFG_POST_WORD_ADDR
+#define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
+#define CFG_POST_ALT_WORD_ADDR (CFG_PERIPHERAL_BASE + GPT0_COMP6)
+                                               /* unused GPT0 COMP reg */
 
 /*-----------------------------------------------------------------------
  * Serial Port
index 90e56b0989efaa9dfa2b02b4e3a97258642bd1ca..b0d16fb4a7dd24b0ff050f8239dd4d25e76a6db7 100644 (file)
 #define plb1_bearl                (PLB_ARBITER_BASE+ 0x0C)
 #define plb1_bearh                (PLB_ARBITER_BASE+ 0x0D)
 
-#if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
-    defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
 /* Pin Function Control Register 1 */
 #define SDR0_PFC1                    0x4101
 #define   SDR0_PFC1_U1ME_MASK         0x02000000    /* UART1 Mode Enable */
 #define   SDR0_MFR_PKT_REJ_EN1         0x00080000   /* Pkt Rej. Enable on EMAC3(1) */
 #define   SDR0_MFR_PKT_REJ_POL         0x00200000   /* Packet Reject Polarity */
 
-#endif /* defined(CONFIG_440EP) || defined(CONFIG_440GR) */
+#define GPT0_COMP6                     0x00000098
 
 #if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
 #define SDR0_USB2D0CR                 0x0320