X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Fmain.c;h=35f5d29c88d770541440edbcf57623f4442fa1c3;hb=0f370216f7d50a6c8ffebfb1ba49b196e869d0ec;hp=bdb68babd58a79bbf583b3314573256cf6fe3a9f;hpb=a062c2ed9af0b5c9a9f64424ce929cbb6e46dbe2;p=carl9170fw.git diff --git a/carlfw/src/main.c b/carlfw/src/main.c index bdb68ba..35f5d29 100644 --- a/carlfw/src/main.c +++ b/carlfw/src/main.c @@ -43,15 +43,14 @@ static void init(void) /* 25/50/100ms timer (depends on cpu clock) */ timer_init(0, 50000); - /* turn off all leds */ - led_set(0); + /* USB init */ + usb_init(); + + memset(&dma_mem, 0, sizeof(dma_mem)); /* fill DMA rings */ dma_init_descriptors(); - /* USB init */ - usb_init(); - /* clear all interrupt */ set(AR9170_MAC_REG_INT_CTRL, 0xffff); @@ -115,7 +114,6 @@ void __attribute__((noreturn)) start(void) { /* initialize firmware context and DMA memory */ memset(&fw, 0, sizeof(fw)); - memset(&dma_mem, 0, sizeof(dma_mem)); /* watchdog magic pattern check */ if ((get(AR9170_PWR_REG_WATCH_DOG_MAGIC) & 0xffff0000) == 0x12340000) {