lib: consolidate hang()

Delete all occurrences of hang() and provide a generic function.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
[trini: Modify check around puts() in hang.c slightly]
Signed-off-by: Tom Rini <trini@ti.com>
This commit is contained in:
Andreas Bießmann
2013-04-18 22:48:50 +00:00
committed by Tom Rini
parent b0dac5b1af
commit d2eae43ba8
20 changed files with 48 additions and 150 deletions

View File

@@ -1087,13 +1087,3 @@ void board_init_f_r(void)
hang();
}
#endif /* CONFIG_X86 */
void hang(void)
{
puts("### ERROR ### Please RESET the board ###\n");
#ifdef CONFIG_SANDBOX
os_exit(0);
#else
for (;;);
#endif
}

View File

@@ -48,13 +48,6 @@ struct spl_image_info spl_image;
/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));
inline void hang(void)
{
puts("### ERROR ### Please RESET the board ###\n");
for (;;)
;
}
/*
* Default function to determine if u-boot or the OS should
* be started. This implementation always returns 1.