summaryrefslogtreecommitdiff
path: root/cpu/mcf532x/speed.c
diff options
context:
space:
mode:
authorWolfgang Wegner <w.wegner@astro-kom.de>2010-03-02 10:59:20 +0100
committerTsiChung Liew <tsicliew@gmail.com>2010-03-04 01:46:53 -0600
commitc7de810c79a00aa6fc08900ee0bb57bd295db733 (patch)
treea9438f0823000b68a17fb92d0648cb33dd1876cd /cpu/mcf532x/speed.c
parentbb907ab51fd04255923b7ecf9dab352078808351 (diff)
downloadu-boot-imx-c7de810c79a00aa6fc08900ee0bb57bd295db733.zip
u-boot-imx-c7de810c79a00aa6fc08900ee0bb57bd295db733.tar.gz
u-boot-imx-c7de810c79a00aa6fc08900ee0bb57bd295db733.tar.bz2
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 <w.wegner@astro-kom.de>
Diffstat (limited to 'cpu/mcf532x/speed.c')
-rw-r--r--cpu/mcf532x/speed.c3
1 files changed, 3 insertions, 0 deletions
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;
}