9
0
Fork 0

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>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2013-09-19 15:20:22 +02:00 committed by Sascha Hauer
parent 47974cac82
commit 14e8e0a421
2 changed files with 5 additions and 0 deletions

View File

@ -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();
}

View File

@ -152,6 +152,7 @@ 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