summaryrefslogtreecommitdiffstats
path: root/common/startup.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-09-19 15:20:22 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-09-24 09:21:40 +0200
commit14e8e0a421004ae6fc3d9351fb44eb402e5da77a (patch)
tree9e5078486d6f90c8f97dd570fb45520ca9cb5077 /common/startup.c
parent47974cac82a59427972373a6d0e6c23eda81ba3b (diff)
downloadbarebox-14e8e0a421004ae6fc3d9351fb44eb402e5da77a.tar.gz
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 <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/startup.c')
-rw-r--r--common/startup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/startup.c b/common/startup.c
index 9b33a92..ece852c 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();
}