From c7de810c79a00aa6fc08900ee0bb57bd295db733 Mon Sep 17 00:00:00 2001 From: Wolfgang Wegner Date: Tue, 2 Mar 2010 10:59:20 +0100 Subject: allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM CONFIG_MONITOR_IS_IN_RAM is broken for MCF532x. This patch fixes this by conditionally - removing the vector table at the beginning of code - not overwriting the vector base register - removing the code to re-set the PLL, which effectively disables SDRAM access Signed-off-by: Wolfgang Wegner --- cpu/mcf532x/speed.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpu/mcf532x/speed.c') diff --git a/cpu/mcf532x/speed.c b/cpu/mcf532x/speed.c index 0d378e6..67f08c7 100644 --- a/cpu/mcf532x/speed.c +++ b/cpu/mcf532x/speed.c @@ -204,6 +204,8 @@ int clock_pll(int fsys, int flags) fout = ((fref * mfd) / (BUSDIV * 4)); #endif +/* must not tamper with SDRAMC if running from SDRAM */ +#if !defined(CONFIG_MONITOR_IS_IN_RAM) /* * Check to see if the SDRAM has already been initialized. * If it has then the SDRAM needs to be put into self refresh @@ -254,6 +256,7 @@ int clock_pll(int fsys, int flags) /* wait for DQS logic to relock */ for (i = 0; i < 0x200; i++) ; +#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */ return fout; } -- cgit v1.1