Skip to contentSkip to conversation

omap3: moved reset_cpu function to omap3

PATCH New Minkyu Kang 2 participants 2 messages Jun 18, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omap3: moved reset_cpu function to omap3

Because this function is soc specific, it should be moved to omap3

---
 cpu/arm_cortexa8/omap3/interrupts.c |   14 ++++++++++++++
 cpu/arm_cortexa8/start.S            |   14 --------------
 2 files changed, 14 insertions(+), 14 deletions(-)
cpu/arm_cortexa8/omap3/interrupts.c +14 -0
index 742fe9c..1b70a7a 100644
@@ -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");
cpu/arm_cortexa8/start.S +0 -14
index 66b4820..6bd6552 100644
@@ -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
Signature · 1 line
1.5.4.3
#1 lore raw

PATCH 1/1 omap3: moved reset_cpu function to omap3

Dear Dirk,

2009/6/18 Minkyu Kang <[email protected]>

Quoted 57 lines

Because this function is soc specific, it should be moved to omap3

---
 cpu/arm_cortexa8/omap3/interrupts.c |   14 ++++++++++++++
 cpu/arm_cortexa8/start.S            |   14 --------------
 2 files changed, 14 insertions(+), 14 deletions(-)
cpu/arm_cortexa8/omap3/interrupts.c +14 -0
index 742fe9c..1b70a7a 100644
@@ -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");
cpu/arm_cortexa8/start.S +0 -15
index 66b4820..6bd6552 100644
@@ -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
--
Quoted 2 lines

1.5.4.3

I found previous patch written by you.
http://lists.denx.de/pipermail/u-boot/2009-May/053490.html
<http://lists.denx.de/pipermail/u-boot/2009-May/053490.html>
Please ignore this patch :)
thanks.

Signature · 2 lines
from. prom.
promsoft.net