summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm946es
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-04-15 16:13:48 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-05-15 16:24:37 +0200
commitcd6cc3440f3f8166b0ceda3c510786d8fcd64dff (patch)
tree821c9375e75a1876956770398ab1d59a784c333a /arch/arm/cpu/arm946es
parentb4ee1491b917951c0f57e18fd816a4211f5829d4 (diff)
downloadu-boot-imx-cd6cc3440f3f8166b0ceda3c510786d8fcd64dff.zip
u-boot-imx-cd6cc3440f3f8166b0ceda3c510786d8fcd64dff.tar.gz
u-boot-imx-cd6cc3440f3f8166b0ceda3c510786d8fcd64dff.tar.bz2
arm: move reset_cpu from start.S into cpu.c
CPUs arm946es and sa1100 both define the reset_cpu() function in their start.S file. Move this cpu-specific code into cpu.c so that start.S only contains ARM generic code. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Diffstat (limited to 'arch/arm/cpu/arm946es')
-rw-r--r--arch/arm/cpu/arm946es/cpu.c13
-rw-r--r--arch/arm/cpu/arm946es/start.S23
2 files changed, 13 insertions, 23 deletions
diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c
index 0c8d92d..e20e5a8 100644
--- a/arch/arm/cpu/arm946es/cpu.c
+++ b/arch/arm/cpu/arm946es/cpu.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <command.h>
#include <asm/system.h>
+#include <asm/io.h>
static void cache_flush(void);
@@ -51,3 +52,15 @@ static void cache_flush (void)
asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
asm ("mcr p15, 0, %0, c7, c6, 0": :"r" (i));
}
+
+#ifndef CONFIG_INTEGRATOR
+
+__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
+{
+ writew(0x0, 0xfffece10);
+ writew(0x8, 0xfffece10);
+ for (;;)
+ ;
+}
+
+#endif /* #ifdef CONFIG_INTEGRATOR */
diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S
index 7d50145..534592f 100644
--- a/arch/arm/cpu/arm946es/start.S
+++ b/arch/arm/cpu/arm946es/start.S
@@ -320,26 +320,3 @@ fiq:
bl do_fiq
#endif
-
-# ifdef CONFIG_INTEGRATOR
-
- /* Satisfied by general board level routine */
-
-#else
-
- .align 5
-.globl reset_cpu
-reset_cpu:
-
- ldr r1, rstctl1 /* get clkm1 reset ctl */
- mov r3, #0x0
- strh r3, [r1] /* clear it */
- mov r3, #0x8
- strh r3, [r1] /* force dsp+arm reset */
-_loop_forever:
- b _loop_forever
-
-rstctl1:
- .word 0xfffece10
-
-#endif /* #ifdef CONFIG_INTEGRATOR */