mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-23 07:31:32 +00:00
Blackfin: replace "bfin_reset_or_hang()" with "panic()"
The bfin_reset_or_hang function unnecessarily duplicates the panic() logic based on CONFIG_PANIC_HANG. This patch deletes 20 lines of code and just calls panic() instead. This also makes the following generic-restart conversion patch simpler. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
a91eb2c56a
commit
eed1a7b1cf
3 changed files with 2 additions and 19 deletions
|
@ -28,7 +28,6 @@
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
|
||||||
void board_reset(void) __attribute__((__weak__));
|
void board_reset(void) __attribute__((__weak__));
|
||||||
void bfin_reset_or_hang(void) __attribute__((__noreturn__));
|
|
||||||
void bfin_dump(struct pt_regs *reg);
|
void bfin_dump(struct pt_regs *reg);
|
||||||
void bfin_panic(struct pt_regs *reg);
|
void bfin_panic(struct pt_regs *reg);
|
||||||
void dump(struct pt_regs *regs);
|
void dump(struct pt_regs *regs);
|
||||||
|
|
|
@ -80,27 +80,11 @@ static void bfin_reset(void)
|
||||||
* PC relative call with a 25 bit immediate. This is not enough
|
* PC relative call with a 25 bit immediate. This is not enough
|
||||||
* to get us from the top of SDRAM into L1.
|
* to get us from the top of SDRAM into L1.
|
||||||
*/
|
*/
|
||||||
__attribute__ ((__noreturn__))
|
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||||
static inline void bfin_reset_trampoline(void)
|
|
||||||
{
|
{
|
||||||
if (board_reset)
|
if (board_reset)
|
||||||
board_reset();
|
board_reset();
|
||||||
while (1)
|
while (1)
|
||||||
asm("jump (%0);" : : "a" (bfin_reset));
|
asm("jump (%0);" : : "a" (bfin_reset));
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__ ((__noreturn__))
|
|
||||||
void bfin_reset_or_hang(void)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_PANIC_HANG
|
|
||||||
hang();
|
|
||||||
#else
|
|
||||||
bfin_reset_trampoline();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|
||||||
{
|
|
||||||
bfin_reset_trampoline();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,5 +426,5 @@ void bfin_panic(struct pt_regs *regs)
|
||||||
unsigned long tflags;
|
unsigned long tflags;
|
||||||
trace_buffer_save(tflags);
|
trace_buffer_save(tflags);
|
||||||
bfin_dump(regs);
|
bfin_dump(regs);
|
||||||
bfin_reset_or_hang();
|
panic("PANIC: Blackfin internal error");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue