+ set(AR9170_MAC_REG_DMA_TRIGGER, 0);
+
+ andl(AR9170_USB_REG_DMA_CTL, ~(AR9170_USB_DMA_CTL_ENABLE_TO_DEVICE |
+ AR9170_USB_DMA_CTL_ENABLE_FROM_DEVICE |
+ AR9170_USB_DMA_CTL_UP_PACKET_MODE |
+ AR9170_USB_DMA_CTL_DOWN_STREAM));
+
+ /* Do a software reset to PTA component */
+ orl(AR9170_PTA_REG_DMA_MODE_CTRL, AR9170_PTA_DMA_MODE_CTRL_RESET);
+ andl(AR9170_PTA_REG_DMA_MODE_CTRL, ~AR9170_PTA_DMA_MODE_CTRL_RESET);
+
+ orl(AR9170_PTA_REG_DMA_MODE_CTRL, AR9170_PTA_DMA_MODE_CTRL_DISABLE_USB);
+
+ set(AR9170_MAC_REG_POWER_STATE_CTRL,
+ AR9170_MAC_POWER_STATE_CTRL_RESET);
+
+ /* Reset USB FIFO */
+ set(AR9170_PWR_REG_RESET, AR9170_PWR_RESET_COMMIT_RESET_MASK |
+ AR9170_PWR_RESET_DMA_MASK |
+ AR9170_PWR_RESET_WLAN_MASK);
+ set(AR9170_PWR_REG_RESET, 0x0);
+
+ set(AR9170_PWR_REG_CLOCK_SEL, AHB_40MHZ_OSC);