Currently, if we get exception, FW will print exception info, send crash
pattern to the host and reboot. We can reduce deadtime by doing cold reboot
instead of simple reboot. The difference is, that usb interface will be
reseted and usb subsystem will reinit driver. In this case we even do not need
to update host driver.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
MAGPIE_REG_USB_RX1_SWAP_DATA = 0x1;
MAGPIE_REG_USB_RX2_SWAP_DATA = 0x1;
- A_PRINTF("Jump to BOOT\n");
-
- // reboot.....
+ A_PRINTF("Cold reboot initiated.");
+#if defined(PROJECT_MAGPIE)
+ HAL_WORD_REG_WRITE(WATCH_DOG_MAGIC_PATTERN_ADDR, 0);
+#elif defined(PROJECT_K2)
+ HAL_WORD_REG_WRITE(MAGPIE_REG_RST_STATUS_ADDR, 0);
+#endif /* #if defined(PROJECT_MAGPIE) */
A_USB_JUMP_BOOT();
}