From 91650b3e4de688038d4f71279c44858e3e2c6870 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 6 Nov 2006 17:06:36 +0100 Subject: Sequential accesses to non-existent memory must be synchronized, at least on G2 cores. This fixes get_ram_size() problems on MPC5200 Rev. B boards. --- board/mcc200/mcc200.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'board/mcc200/mcc200.c') diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c index 71a691b5dbf..8b475c690d9 100644 --- a/board/mcc200/mcc200.c +++ b/board/mcc200/mcc200.c @@ -27,6 +27,7 @@ #include #include #include +#include /* Two MT48LC8M32B2 for 32 MB */ /* #include "mt48lc8m32b2-6-7.h" */ @@ -98,6 +99,7 @@ long int initdram (int board_type) { ulong dramsize = 0; ulong dramsize2 = 0; + uint svr, pvr; #ifndef CFG_RAMBOOT ulong test1, test2; @@ -192,6 +194,23 @@ long int initdram (int board_type) #endif /* CFG_RAMBOOT */ + /* + * On MPC5200B we need to set the special configuration delay in the + * DDR controller. Please refer to Freescale's AN3221 "MPC5200B SDRAM + * Initialization and Configuration", 3.3.1 SDelay--MBAR + 0x0190: + * + * "The SDelay should be written to a value of 0x00000004. It is + * required to account for changes caused by normal wafer processing + * parameters." + */ + svr = get_svr(); + pvr = get_pvr(); + if ((SVR_MJREV(svr) >= 2) && (PVR_MAJ(pvr) == 1) && + (PVR_MIN(pvr) == 4)) { + *(vu_long *)MPC5XXX_SDRAM_SDELAY = 0x04; + __asm__ volatile ("sync"); + } + return dramsize + dramsize2; } -- cgit v1.2.3 From a9398e018593782c5fa7d0741955fc1256b34c1e Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 27 Nov 2006 15:32:42 +0100 Subject: Minor code cleanup. Update CHANGELOG. --- board/mcc200/mcc200.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'board/mcc200/mcc200.c') diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c index 8b475c690d9..5d74bdeb42e 100644 --- a/board/mcc200/mcc200.c +++ b/board/mcc200/mcc200.c @@ -205,8 +205,7 @@ long int initdram (int board_type) */ svr = get_svr(); pvr = get_pvr(); - if ((SVR_MJREV(svr) >= 2) && (PVR_MAJ(pvr) == 1) && - (PVR_MIN(pvr) == 4)) { + if ((SVR_MJREV(svr) >= 2) && (PVR_MAJ(pvr) == 1) && (PVR_MIN(pvr) == 4)) { *(vu_long *)MPC5XXX_SDRAM_SDELAY = 0x04; __asm__ volatile ("sync"); } -- cgit v1.2.3