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:
parent
47974cac82
commit
14e8e0a421
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue