summaryrefslogtreecommitdiffstats
path: root/board/sheldon
diff options
context:
space:
mode:
authorRon Madrid <ron_madrid@sbcglobal.net>2010-04-28 16:04:43 -0700
committerKim Phillips <kim.phillips@freescale.com>2010-05-07 12:19:52 -0500
commit3b439792b0781921c599d8af9bed6a771d295b53 (patch)
tree88e2946fbd7771404999751da2fbfcaec38af99e /board/sheldon
parent767fdc4af684770f5e97a6c5e19a8ac2616b8329 (diff)
downloadblackbird-obmc-uboot-3b439792b0781921c599d8af9bed6a771d295b53.tar.gz
blackbird-obmc-uboot-3b439792b0781921c599d8af9bed6a771d295b53.zip
mpc83xx: Add UPMA configuration to SIMPC8313
Added UPM array table, upmconfig, and Local Bus configuration support for SIMPC8313 Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'board/sheldon')
-rw-r--r--board/sheldon/simpc8313/simpc8313.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/board/sheldon/simpc8313/simpc8313.c b/board/sheldon/simpc8313/simpc8313.c
index 1044de2a47..0235545ae4 100644
--- a/board/sheldon/simpc8313/simpc8313.c
+++ b/board/sheldon/simpc8313/simpc8313.c
@@ -29,6 +29,7 @@
#include <mpc83xx.h>
#include <ns16550.h>
#include <nand.h>
+#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -91,6 +92,40 @@ void pci_init_board(void)
int misc_init_r(void)
{
int rc = 0;
+ immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
+ fsl_lbus_t *lbus = &immap->lbus;
+ 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 */
+ out_be32(mxmr, MxMR_UWPL | MxMR_GPL_x4DIS);
return rc;
}
OpenPOWER on IntegriCloud