提交 c7de810c 编写于 作者: W Wolfgang Wegner 提交者: TsiChung Liew

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: NWolfgang Wegner <w.wegner@astro-kom.de>
上级 bb907ab5
...@@ -204,6 +204,8 @@ int clock_pll(int fsys, int flags) ...@@ -204,6 +204,8 @@ int clock_pll(int fsys, int flags)
fout = ((fref * mfd) / (BUSDIV * 4)); fout = ((fref * mfd) / (BUSDIV * 4));
#endif #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. * Check to see if the SDRAM has already been initialized.
* If it has then the SDRAM needs to be put into self refresh * If it has then the SDRAM needs to be put into self refresh
...@@ -254,6 +256,7 @@ int clock_pll(int fsys, int flags) ...@@ -254,6 +256,7 @@ int clock_pll(int fsys, int flags)
/* wait for DQS logic to relock */ /* wait for DQS logic to relock */
for (i = 0; i < 0x200; i++) ; for (i = 0; i < 0x200; i++) ;
#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
return fout; return fout;
} }
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
addl #60,%sp; /* space for 15 regs */ \ addl #60,%sp; /* space for 15 regs */ \
rte; rte;
#if !defined(CONFIG_MONITOR_IS_IN_RAM)
.text .text
/* /*
* Vector table. This is used for initial platform startup. * Vector table. This is used for initial platform startup.
...@@ -121,6 +122,7 @@ vector192_255: ...@@ -121,6 +122,7 @@ vector192_255:
.long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT .long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
.long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT .long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
.long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT .long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
.text .text
...@@ -130,9 +132,11 @@ _start: ...@@ -130,9 +132,11 @@ _start:
nop nop
move.w #0x2700,%sr /* Mask off Interrupt */ move.w #0x2700,%sr /* Mask off Interrupt */
#if !defined(CONFIG_MONITOR_IS_IN_RAM)
/* Set vector base register at the beginning of the Flash */ /* Set vector base register at the beginning of the Flash */
move.l #CONFIG_SYS_FLASH_BASE, %d0 move.l #CONFIG_SYS_FLASH_BASE, %d0
movec %d0, %VBR movec %d0, %VBR
#endif
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0 move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0
movec %d0, %RAMBAR1 movec %d0, %RAMBAR1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册