diff options
author | Herve Codina <Herve.CODINA@celad.com> | 2015-07-06 09:36:45 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-13 08:28:19 +0200 |
commit | 74438aa4dc1d5d8788a2d7e327c280d8836c8cca (patch) | |
tree | ba29448a38a42d4a10808f7d88eb8778de68ab71 /arch | |
parent | a59a48b684f9173f30ba407ca2d64a9c12e7c2e5 (diff) | |
download | barebox-74438aa4dc1d5d8788a2d7e327c280d8836c8cca.tar.gz barebox-74438aa4dc1d5d8788a2d7e327c280d8836c8cca.tar.xz |
exitcall: move arch_shutdown to exitcall infrastructure
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/cpu.c | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/common.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/common.h | 6 | ||||
-rw-r--r-- | arch/blackfin/lib/board.c | 6 | ||||
-rw-r--r-- | arch/nios2/lib/board.c | 4 | ||||
-rw-r--r-- | arch/openrisc/lib/board.c | 4 |
6 files changed, 8 insertions, 17 deletions
diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c index badd676b0d..5e708023e4 100644 --- a/arch/arm/cpu/cpu.c +++ b/arch/arm/cpu/cpu.c @@ -93,7 +93,7 @@ void mmu_disable(void) * This function is called by shutdown_barebox to get a clean * memory/cache state. */ -void arch_shutdown(void) +static void arch_shutdown(void) { uint32_t r; @@ -108,6 +108,7 @@ void arch_shutdown(void) r |= PSR_I_BIT; __asm__ __volatile__("msr cpsr, %0" : : "r"(r)); } +archshutdown_exitcall(arch_shutdown); extern unsigned long arm_stack_top; diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h index 9ff3b19c7b..07ae619cea 100644 --- a/arch/arm/include/asm/common.h +++ b/arch/arm/include/asm/common.h @@ -1,8 +1,6 @@ #ifndef __ASM_ARM_COMMON_H #define __ASM_ARM_COMMON_H -#define ARCH_SHUTDOWN - static inline unsigned long get_pc(void) { unsigned long pc; diff --git a/arch/blackfin/include/asm/common.h b/arch/blackfin/include/asm/common.h index fa58e372bb..443adf7270 100644 --- a/arch/blackfin/include/asm/common.h +++ b/arch/blackfin/include/asm/common.h @@ -1,5 +1 @@ - -/* We have to disable instruction cache before - * executing an external program - */ -#define ARCH_SHUTDOWN +/* nothing special */ diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 88ad61871a..3a04f28caf 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -38,7 +38,11 @@ void __noreturn blackfin_start_barebox(void) start_barebox(); } -void arch_shutdown(void) +/* We have to disable instruction cache before + * executing an external program + */ +static void arch_shutdown(void) { icache_disable(); } +archshutdown_exitcall(arch_shutdown); diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c index 7c4dc76e87..537675c5d4 100644 --- a/arch/nios2/lib/board.c +++ b/arch/nios2/lib/board.c @@ -30,7 +30,3 @@ void __noreturn nios_start_barebox(void) start_barebox(); } - -void arch_shutdown(void) -{ -} diff --git a/arch/openrisc/lib/board.c b/arch/openrisc/lib/board.c index 98033b42cf..25bcc0517b 100644 --- a/arch/openrisc/lib/board.c +++ b/arch/openrisc/lib/board.c @@ -29,7 +29,3 @@ void __noreturn openrisc_start_barebox(void) start_barebox(); } - -void arch_shutdown(void) -{ -} |