]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Blackfin: replace "bfin_reset_or_hang()" with "panic()"
authorKyle Moffett <Kyle.D.Moffett@boeing.com>
Mon, 7 Mar 2011 17:37:30 +0000 (12:37 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 8 Apr 2011 04:44:27 +0000 (00:44 -0400)
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>
arch/blackfin/cpu/cpu.h
arch/blackfin/cpu/reset.c
arch/blackfin/cpu/traps.c

index ba85e0b9a5cf07808a62048e456b65ca938493b6..e70560f4de19d185869f9d4abc3ae5dd300b1ad4 100644 (file)
@@ -28,7 +28,6 @@
 #include <command.h>
 
 void board_reset(void) __attribute__((__weak__));
-void bfin_reset_or_hang(void) __attribute__((__noreturn__));
 void bfin_dump(struct pt_regs *reg);
 void bfin_panic(struct pt_regs *reg);
 void dump(struct pt_regs *regs);
index 164afde33138dd00fde5d22b99e0e2651a9f7b77..9307e9f9e2005670f28549820e82215e989cf240 100644 (file)
@@ -80,27 +80,11 @@ static void bfin_reset(void)
  * PC relative call with a 25 bit immediate.  This is not enough
  * to get us from the top of SDRAM into L1.
  */
-__attribute__ ((__noreturn__))
-static inline void bfin_reset_trampoline(void)
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        if (board_reset)
                board_reset();
        while (1)
                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;
 }
index 09388aa3d53a15ed8b34d188732ee31eded5499f..0cb833a0e43f0db3fb4daaf0b8e17a5662ac510d 100644 (file)
@@ -426,5 +426,5 @@ void bfin_panic(struct pt_regs *regs)
        unsigned long tflags;
        trace_buffer_save(tflags);
        bfin_dump(regs);
-       bfin_reset_or_hang();
+       panic("PANIC: Blackfin internal error");
 }