From 14e8e0a421004ae6fc3d9351fb44eb402e5da77a Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 19 Sep 2013 15:20:22 +0200 Subject: shutdown: add board call back so if we need to do something switch in the board we can fill this function pointer (as example on Animeo IP shutdown some rs232 & rs485) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- common/startup.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/startup.c') diff --git a/common/startup.c b/common/startup.c index 9b33a92c86..ece852cdd4 100644 --- a/common/startup.c +++ b/common/startup.c @@ -159,6 +159,8 @@ 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 @@ -169,4 +171,6 @@ void shutdown_barebox(void) #ifdef ARCH_SHUTDOWN arch_shutdown(); #endif + if (board_shutdown) + board_shutdown(); } -- cgit v1.2.3