carl9170 firmware: cleanup dma memory before reset
authorChristian Lamparter <chunkeey@googlemail.com>
Sat, 4 Dec 2010 21:39:39 +0000 (22:39 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Sat, 4 Dec 2010 21:39:39 +0000 (22:39 +0100)
While the documentation does not mention anything
in this regard. There's clearly some bootloader
action in the DMA memory region.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/usb/main.c

index fac37805be7f555a90f5ef128e258932bf1fee5e..6545ec0931180e709936c264afb8394d4ed52a14 100644 (file)
@@ -284,6 +284,9 @@ void __noreturn reboot(void)
        /* Turn off power */
        turn_power_off();
 
+       /* clean bootloader workspace */
+       memset(&dma_mem, 0, sizeof(dma_mem));
+
        /* add by ygwei for work around USB PHY chirp sequence problem */
        set(0x10f100, 0x12345678);