X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fusb%2Fusb.c;h=48b34183caafe949bd9e0b47b5953cb936b39a4a;hb=0f370216f7d50a6c8ffebfb1ba49b196e869d0ec;hp=49852fb70611a318d4410cf66d1e3c9855c688f8;hpb=e72388a0aa23da8bc8e24a0cbe9d523c5a9ce294;p=carl9170fw.git diff --git a/carlfw/usb/usb.c b/carlfw/usb/usb.c index 49852fb..48b3418 100644 --- a/carlfw/usb/usb.c +++ b/carlfw/usb/usb.c @@ -208,7 +208,7 @@ static void usb_pta_init(void) andl(AR9170_USB_REG_DMA_CTL, ~AR9170_DMA_CTL_UP_PACKET_MODE); /* reset maximum transfer size */ - andl(AR9170_USB_REG_DMA_CTL, ~(AR9170_DMA_CTL_UP_STREAM_MASK)); + andl(AR9170_USB_REG_DMA_CTL, ~(AR9170_DMA_CTL_UP_STREAM)); # if (CONFIG_CARL9170FW_RX_FRAME_LEN == 4096) orl(AR9170_USB_REG_DMA_CTL, AR9170_DMA_CTL_UP_STREAM_4K); @@ -231,10 +231,6 @@ static void usb_pta_init(void) orl(AR9170_USB_REG_DMA_CTL, AR9170_DMA_CTL_DOWN_STREAM); #endif /* CONFIG_CARL9170FW_USB_DOWN_STREAM */ - /* Enable up stream and down stream */ - orl(AR9170_USB_REG_DMA_CTL, AR9170_DMA_CTL_ENABLE_TO_DEVICE | - AR9170_DMA_CTL_ENABLE_FROM_DEVICE); - #ifdef CONFIG_CARL9170FW_USB_UP_STREAM /* Set the up stream mode maximum aggregate number */ set(AR9170_USB_REG_MAX_AGG_UPLOAD, 4); @@ -246,6 +242,9 @@ static void usb_pta_init(void) set(AR9170_USB_REG_UPLOAD_TIME_CTL, 0x80); #endif /* CONFIG_CARL9170FW_USB_UP_STREAM */ + /* Enable up stream and down stream */ + orl(AR9170_USB_REG_DMA_CTL, AR9170_DMA_CTL_ENABLE_TO_DEVICE | + AR9170_DMA_CTL_ENABLE_FROM_DEVICE); } #endif /* CONFIG_CARL9170FW_USB_INIT_FIRMWARE */