diff options
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/usb-imx31.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/usb-imx31.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c index 8682cff7c7..2011d0c633 100644 --- a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c | |||
@@ -89,7 +89,7 @@ void usb_enable(bool on) | |||
89 | { | 89 | { |
90 | /* Module clock should be on since since this could be called with | 90 | /* Module clock should be on since since this could be called with |
91 | * OFF initially and writing module registers would hardlock otherwise. */ | 91 | * OFF initially and writing module registers would hardlock otherwise. */ |
92 | imx31_clkctl_module_clock_gating(CG_USBOTG, CGM_ON_ALL); | 92 | ccm_module_clock_gating(CG_USBOTG, CGM_ON_RUN_WAIT); |
93 | enable_transceiver(true); | 93 | enable_transceiver(true); |
94 | 94 | ||
95 | if (on) | 95 | if (on) |
@@ -100,7 +100,7 @@ void usb_enable(bool on) | |||
100 | { | 100 | { |
101 | usb_core_exit(); | 101 | usb_core_exit(); |
102 | enable_transceiver(false); | 102 | enable_transceiver(false); |
103 | imx31_clkctl_module_clock_gating(CG_USBOTG, CGM_OFF); | 103 | ccm_module_clock_gating(CG_USBOTG, CGM_OFF); |
104 | } | 104 | } |
105 | } | 105 | } |
106 | 106 | ||
@@ -117,9 +117,14 @@ static void __attribute__((interrupt("IRQ"))) USB_OTG_HANDLER(void) | |||
117 | void usb_drv_int_enable(bool enable) | 117 | void usb_drv_int_enable(bool enable) |
118 | { | 118 | { |
119 | if (enable) | 119 | if (enable) |
120 | avic_enable_int(USB_OTG, IRQ, 7, USB_OTG_HANDLER); | 120 | { |
121 | else | 121 | avic_enable_int(INT_USB_OTG, INT_TYPE_IRQ, INT_PRIO_DEFAULT, |
122 | avic_disable_int(USB_OTG); | 122 | USB_OTG_HANDLER); |
123 | } | ||
124 | else | ||
125 | { | ||
126 | avic_disable_int(INT_USB_OTG); | ||
127 | } | ||
123 | } | 128 | } |
124 | 129 | ||
125 | /* Called during the bus reset interrupt when in detect mode */ | 130 | /* Called during the bus reset interrupt when in detect mode */ |