All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap3: moved reset_cpu function to omap3
Date: Thu, 18 Jun 2009 12:20:01 +0900	[thread overview]
Message-ID: <4A39B261.6060402@samsung.com> (raw)

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

Signed-off-by: Minkyu Kang <mk7.kang@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

             reply	other threads:[~2009-06-18  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18  3:20 Minkyu Kang [this message]
2009-06-18  6:02 ` [U-Boot] [PATCH] omap3: moved reset_cpu function to omap3 Minkyu Kang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A39B261.6060402@samsung.com \
    --to=mk7.kang@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.