@@ -27,7 +27,6 @@
#include <command.h>
-void board_reset(void) __attribute__((__weak__));
void bfin_dump(struct pt_regs *reg);
void bfin_panic(struct pt_regs *reg);
void dump(struct pt_regs *regs);
@@ -80,10 +80,8 @@ 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.
*/
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int __arch_restart(void)
{
- if (board_reset)
- board_reset();
while (1)
asm("jump (%0);" : : "a" (bfin_reset));
}
@@ -43,11 +43,14 @@ int checkboard(void)
return 0;
}
-void board_reset(void)
+int __board_restart(void)
{
/* workaround for weak pull ups on ssel */
if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
bfin_reset_boot_spi_cs(GPIO_PF10);
+
+ /* Fall through to the architecture reset handler */
+ return 0;
}
#ifdef CONFIG_BFIN_MAC
The BlackFin port uses the exact same restart code on all supported CPUs, so that do_reset() function is simply altered to use the new prototype for __arch_restart(). Reading the code and CPU documentation does not make it entirely clear whether or not the implementation is safe to use when the CPU may be in a bad or undefined state, but it *appears* to be OK. As a result no separate __arch_emergency_restart() function should be needed. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Mike Frysinger <vapier@gentoo.org> --- arch/blackfin/cpu/cpu.h | 1 - arch/blackfin/cpu/reset.c | 4 +--- board/bf537-stamp/bf537-stamp.c | 5 ++++- 3 files changed, 5 insertions(+), 5 deletions(-)