summaryrefslogtreecommitdiffstats
path: root/cpu
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-08-28 09:41:22 +0000
committerwdenk <wdenk>2003-08-28 09:41:22 +0000
commitd94f92cbd7f4a4d3bf0d5d963b709c686e8f6633 (patch)
treec85dd4a10c5a68ca09b9139c1b6428d55ada6451 /cpu
parente0ac62d798ce60ec5d43125d4786e58b0d881836 (diff)
downloadtalos-obmc-uboot-d94f92cbd7f4a4d3bf0d5d963b709c686e8f6633.tar.gz
talos-obmc-uboot-d94f92cbd7f4a4d3bf0d5d963b709c686e8f6633.zip
* Fix ICU862 environment problem
* Fix RAM size detection for RMU board * Implement "reset" for MGT5100/MPC5200 systems
Diffstat (limited to 'cpu')
-rw-r--r--cpu/mpc5xxx/cpu.c24
-rw-r--r--cpu/mpc8xx/start.S12
2 files changed, 5 insertions, 31 deletions
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
index 7d95d2f9c3..c481d187df 100644
--- a/cpu/mpc5xxx/cpu.c
+++ b/cpu/mpc5xxx/cpu.c
@@ -54,31 +54,17 @@ int checkcpu (void)
int
do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
- ulong msr, addr;
-
- *(vu_long *)MPC5XXX_CDM_SRESET &= ~(1 << 16); /* Checkstop Reset enable */
-
+ ulong msr;
/* Interrupts and MMU off */
__asm__ __volatile__ ("mfmsr %0":"=r" (msr):);
msr &= ~(MSR_ME | MSR_EE | MSR_IR | MSR_DR);
__asm__ __volatile__ ("mtmsr %0"::"r" (msr));
- /*
- * Trying to execute the next instruction at a non-existing address
- * should cause a machine check, resulting in reset
- */
-#ifdef CFG_RESET_ADDRESS
- addr = CFG_RESET_ADDRESS;
-#else
- /*
- * note: when CFG_MONITOR_BASE points to a RAM address, CFG_MONITOR_BASE
- * - sizeof (ulong) is usually a valid address. Better pick an address
- * known to be invalid on your system and assign it to CFG_RESET_ADDRESS.
- */
- addr = CFG_MONITOR_BASE - sizeof (ulong);
-#endif
- ((void (*)(void)) addr) ();
+ /* Charge the watchdog timer */
+ *(vu_long *)(MPC5XXX_GPT0_COUNTER) = 0xf;
+ *(vu_long *)(MPC5XXX_GPT0_ENABLE) = 0x9004; /* wden|ce|timer_ms */
+
return 1;
}
diff --git a/cpu/mpc8xx/start.S b/cpu/mpc8xx/start.S
index cdd549fc74..3ebcab46ae 100644
--- a/cpu/mpc8xx/start.S
+++ b/cpu/mpc8xx/start.S
@@ -76,9 +76,6 @@
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_start)
-#if defined(CONFIG_ICU862)
- GOT_ENTRY(environment)
-#endif
END_GOT
/*
@@ -617,16 +614,7 @@ clear_bss:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
-#if defined(CONFIG_ICU862)
- /*
- * For the FADS - the environment is the very last item in flash.
- * The real .bss stops just before environment starts, so only
- * clear up to that point.
- */
- lwz r4,GOT(environment)
-#else
lwz r4,GOT(_end)
-#endif
cmplw 0, r3, r4
beq 6f
OpenPOWER on IntegriCloud