[U-Boot] [PATCH] omap3: moved reset_cpu function to omap3
Minkyu Kang
mk7.kang at samsung.com
Thu Jun 18 05:20:01 CEST 2009
Because this function is soc specific, it should be moved to omap3
Signed-off-by: Minkyu Kang <mk7.kang at samsung.com>
---
cpu/arm_cortexa8/omap3/interrupts.c | 14 ++++++++++++++
cpu/arm_cortexa8/start.S | 14 --------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/cpu/arm_cortexa8/omap3/interrupts.c b/cpu/arm_cortexa8/omap3/interrupts.c
index 742fe9c..1b70a7a 100644
--- a/cpu/arm_cortexa8/omap3/interrupts.c
+++ b/cpu/arm_cortexa8/omap3/interrupts.c
@@ -70,6 +70,20 @@ int disable_interrupts(void)
}
#endif
+void reset_cpu(ulong ignored)
+{
+ prm_t *prm_base = (prm_t *)PRM_BASE;
+
+ writel(0x2, &prm_base->rstctrl);
+
+ while (1) {
+ if (serial_tstc()) {
+ serial_getc();
+ break;
+ }
+ }
+}
+
void bad_mode(void)
{
panic("Resetting CPU ...\n");
diff --git a/cpu/arm_cortexa8/start.S b/cpu/arm_cortexa8/start.S
index 66b4820..6bd6552 100644
--- a/cpu/arm_cortexa8/start.S
+++ b/cpu/arm_cortexa8/start.S
@@ -500,17 +500,3 @@ finished_inval:
@ but we compile with armv5
ldmfd r13!, {r0 - r5, r7, r9 - r12, pc}
-
-
- .align 5
-.global reset_cpu
-reset_cpu:
- ldr r1, rstctl @ get addr for global reset
- @ reg
- mov r3, #0x2 @ full reset pll + mpu
- str r3, [r1] @ force reset
- mov r0, r0
-_loop_forever:
- b _loop_forever
-rstctl:
- .word PRM_RSTCTRL
--
1.5.4.3
More information about the U-Boot
mailing list