diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-03-30 10:40:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-03-30 14:15:03 +0200 |
commit | cf2703a6fb96cd7703bd5622d69367696f400af5 (patch) | |
tree | d09efc33aa353fe97f1e775cc744519b1adb8805 | |
parent | 56299cc7fd2934306c1a9840cfb8edb19b3350b2 (diff) | |
download | barebox-cf2703a6fb96cd7703bd5622d69367696f400af5.tar.gz barebox-cf2703a6fb96cd7703bd5622d69367696f400af5.tar.xz |
ARM: replace cleanup_before_linux with the generic shutdown_barebox function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/cpu/cpu.c | 12 | ||||
-rw-r--r-- | arch/arm/include/asm/common.h | 2 | ||||
-rw-r--r-- | arch/arm/lib/armlinux.c | 6 |
3 files changed, 9 insertions, 11 deletions
diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c index 1b8fc970..a5e2fe2a 100644 --- a/arch/arm/cpu/cpu.c +++ b/arch/arm/cpu/cpu.c @@ -132,18 +132,16 @@ int icache_status (void) } /** - * Prepare a "clean" CPU for Linux to run + * Disable MMU and D-cache, flush caches * @return 0 (always) * - * This function is called by the generic barebox part just before we call - * Linux. It prepares the processor for Linux. + * This function is called by shutdown_barebox to get a clean + * memory/cache state. */ -int cleanup_before_linux (void) +void arch_shutdown(void) { int i; - shutdown_barebox(); - #ifdef CONFIG_MMU mmu_disable(); #endif @@ -151,8 +149,8 @@ int cleanup_before_linux (void) /* flush I/D-cache */ i = 0; asm ("mcr p15, 0, %0, c7, c7, 0": :"r" (i)); - return 0; } + /** * @page arm_boot_preparation Linux Preparation on ARM * diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h index da84fa5f..9afcff78 100644 --- a/arch/arm/include/asm/common.h +++ b/arch/arm/include/asm/common.h @@ -1 +1 @@ -/* nothing */ +#define ARCH_SHUTDOWN diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index 2415c29b..019c0302 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -192,7 +192,7 @@ int do_bootm_linux(struct image_data *data) /* we assume that the kernel is in place */ printf("\nStarting kernel ...\n\n"); - cleanup_before_linux(); + shutdown_barebox(); theKernel (0, armlinux_architecture, armlinux_bootparams); return -1; @@ -283,7 +283,7 @@ static int do_bootz(struct command *cmdtp, int argc, char *argv[]) #endif setup_end_tag(); - cleanup_before_linux(); + shutdown_barebox(); theKernel(0, armlinux_architecture, armlinux_bootparams); return 0; @@ -325,7 +325,7 @@ static int do_bootu(struct command *cmdtp, int argc, char *argv[]) setup_commandline_tag(commandline); setup_end_tag(); - cleanup_before_linux(); + shutdown_barebox(); theKernel(0, armlinux_architecture, armlinux_bootparams); return 1; |