diff options
author | Herve Codina <Herve.CODINA@celad.com> | 2015-07-06 09:36:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-13 08:28:19 +0200 |
commit | 0fd5944d521207171d08def9e0a8a1ee49e6359e (patch) | |
tree | be3b0df0a0a8ed59367f3a1afc887e3039ae94cd | |
parent | 74438aa4dc1d5d8788a2d7e327c280d8836c8cca (diff) | |
download | barebox-0fd5944d521207171d08def9e0a8a1ee49e6359e.tar.gz barebox-0fd5944d521207171d08def9e0a8a1ee49e6359e.tar.xz |
exitcall: move board_shutdown to exitcall infrastructure
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/boards/animeo_ip/init.c | 2 | ||||
-rw-r--r-- | common/startup.c | 5 | ||||
-rw-r--r-- | include/common.h | 1 |
3 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c index 0fda01363c..2069ab3764 100644 --- a/arch/arm/boards/animeo_ip/init.c +++ b/arch/arm/boards/animeo_ip/init.c @@ -346,6 +346,7 @@ static void animeo_ip_shutdown(void) animeo_ip_shutdown_uart(IOMEM(AT91SAM9260_BASE_US0)); animeo_ip_shutdown_uart(IOMEM(AT91SAM9260_BASE_US1)); } +postdevshutdown_exitcall(animeo_ip_shutdown); static int animeo_ip_console_init(void) { @@ -353,7 +354,6 @@ static int animeo_ip_console_init(void) usart0 = at91_register_uart(1, ATMEL_UART_RTS); usart1 = at91_register_uart(2, ATMEL_UART_RTS); - board_shutdown = animeo_ip_shutdown; barebox_set_model("Somfy Animeo IP"); barebox_set_hostname("animeoip"); diff --git a/common/startup.c b/common/startup.c index 10770e76b2..802b90e0e8 100644 --- a/common/startup.c +++ b/common/startup.c @@ -135,8 +135,6 @@ void __noreturn hang (void) for (;;); } -void (*board_shutdown)(void); - /* Everything needed to cleanly shutdown barebox. * Should be called before starting an OS to get * the devices into a clean state @@ -150,7 +148,4 @@ void shutdown_barebox(void) pr_debug("exitcall-> %pS\n", *exitcall); (*exitcall)(); } - - if (board_shutdown) - board_shutdown(); } diff --git a/include/common.h b/include/common.h index 6766c0239b..6b9dd4d799 100644 --- a/include/common.h +++ b/include/common.h @@ -116,7 +116,6 @@ extern int (*barebox_main)(void); void __noreturn start_barebox(void); void shutdown_barebox(void); -extern void (*board_shutdown)(void); /* * architectures which have special calling conventions for |