X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fusb%2Fmain.c;h=6545ec0931180e709936c264afb8394d4ed52a14;hb=7ead3acecfdbd6f92bfd5b88909c9aa7edf03c47;hp=57f75a44162f93635161182b7a8cc5013f3d1fdd;hpb=0eb34487ee8e70ecb8e4ee2ed5092b2788eb7f26;p=carl9170fw.git diff --git a/carlfw/usb/main.c b/carlfw/usb/main.c index 57f75a4..6545ec0 100644 --- a/carlfw/usb/main.c +++ b/carlfw/usb/main.c @@ -272,16 +272,21 @@ static void turn_power_off(void) void __noreturn reboot(void) { + set(AR9170_MAC_REG_DMA_TRIGGER, 0); + /* write watchdog magic pattern for suspend */ andl(AR9170_PWR_REG_WATCH_DOG_MAGIC, 0xffff); orl(AR9170_PWR_REG_WATCH_DOG_MAGIC, 0x98760000); /* Disable watchdog */ - orl(AR9170_TIMER_REG_WATCH_DOG, 0xffff); + set(AR9170_TIMER_REG_WATCH_DOG, 0xffff); /* 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);