Added UPM array table, upmconfig, and Local Bus configuration support for 
SIMPC8313

Signed-off-by: Ron Madrid <ron_mad...@sbcglobal.net>
---
 board/sheldon/simpc8313/simpc8313.c |   34 ++++++++++++++++++++++++++++++++++
 include/configs/SIMPC8313.h         |   10 ++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/board/sheldon/simpc8313/simpc8313.c 
b/board/sheldon/simpc8313/simpc8313.c
index 1044de2..3bfd4db 100644
--- a/board/sheldon/simpc8313/simpc8313.c
+++ b/board/sheldon/simpc8313/simpc8313.c
@@ -91,6 +91,40 @@ void pci_init_board(void)
 int misc_init_r(void)
 {
        int rc = 0;
+       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
+       volatile fsl_lbus_t *lbus = &immap->lbus;
+       volatile u32 *mxmr = &lbus->mamr;       /* Pointer to mamr */
+
+       /* UPM Table Configuration Code */
+       static uint UPMATable[] = {
+               /* Read Single-Beat (RSS) */
+               0x0fff0c00, 0x0fffdc00, 0x0fff0c05, 0xfffffc00,
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
+               /* Read Burst (RBS) */
+               0x0fff0c00, 0x0ffcdc00, 0x0ffc0c00, 0x0ffc0f0c,
+               0x0ffccf0c, 0x0ffc0f0c, 0x0ffcce0c, 0x3ffc0c05,
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
+               /* Write Single-Beat (WSS) */
+               0x0ffc0c00, 0x0ffcdc00, 0x0ffc0c05, 0xfffffc00,
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
+               /* Write Burst (WBS) */
+               0x0ffc0c00, 0x0fffcc0c, 0x0fff0c00, 0x0fffcc00,
+               0x0fff1c00, 0x0fffcf0c, 0x0fff0f0c, 0x0fffcf0c,
+               0x0fff0c0c, 0x0fffcc0c, 0x0fff0c05, 0xfffffc00,
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
+               /* Refresh Timer (RTS) */
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00,
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01,
+               /* Exception Condition (EXS) */
+               0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01
+       };
+
+       upmconfig(UPMA, UPMATable, sizeof(UPMATable) / sizeof(UPMATable[0]));
+
+       /* Set LUPWAIT to be active low and enabled */
+       *mxmr = 0x08000000 | MxMR_GPL_x4DIS;
 
        return rc;
 }
diff --git a/include/configs/SIMPC8313.h b/include/configs/SIMPC8313.h
index 84af8df..889050f 100644
--- a/include/configs/SIMPC8313.h
+++ b/include/configs/SIMPC8313.h
@@ -184,6 +184,16 @@
 #define CONFIG_SYS_NAND_LBLAWBAR_PRELIM        CONFIG_SYS_LBLAWBAR0_PRELIM
 #define CONFIG_SYS_NAND_LBLAWAR_PRELIM CONFIG_SYS_LBLAWAR0_PRELIM
 
+#define CONFIG_SYS_BR1_PRELIM          ( 0xFF000000    /* FPGA Base Addr */ \
+                                       | BR_PS_16 \
+                                       | BR_MS_UPMA \
+                                       | BR_V )
+#define CONFIG_SYS_OR1_PRELIM          ( 0xFFE00000    /* length 2MB */ \
+                                       | OR_UPM_BCTLD)
+
+#define CONFIG_SYS_LBLAWBAR1_PRELIM    0xFF000000      /* FPGA Base Addr */
+#define CONFIG_SYS_LBLAWAR1_PRELIM     0x80000014      /* 2MB */
+
 /*
  * JFFS2 configuration
  */
-- 
1.5.5.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to