diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-04-15 16:13:48 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-05-15 16:24:37 +0200 |
commit | cd6cc3440f3f8166b0ceda3c510786d8fcd64dff (patch) | |
tree | 821c9375e75a1876956770398ab1d59a784c333a /arch/arm/cpu/sa1100/cpu.c | |
parent | b4ee1491b917951c0f57e18fd816a4211f5829d4 (diff) | |
download | u-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/sa1100/cpu.c')
-rw-r--r-- | arch/arm/cpu/sa1100/cpu.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index 6651898..4c9752a 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -17,6 +17,7 @@ #include <common.h> #include <command.h> #include <asm/system.h> +#include <asm/io.h> #ifdef CONFIG_USE_IRQ DECLARE_GLOBAL_DATA_PTR; @@ -52,3 +53,16 @@ static void cache_flush (void) asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i)); } + +#define RST_BASE 0x90030000 +#define RSRR 0x00 +#define RCSR 0x04 + +__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused))) +{ + /* repeat endlessly */ + while (1) { + writel(0, RST_BASE + RCSR); + writel(1, RST_BASE + RSRR); + } +} |