summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/tegra_udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/tegra_udc.c')
-rw-r--r--drivers/usb/gadget/tegra_udc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/gadget/tegra_udc.c b/drivers/usb/gadget/tegra_udc.c
index 9af22ebe8b58..c130dae3a8e9 100644
--- a/drivers/usb/gadget/tegra_udc.c
+++ b/drivers/usb/gadget/tegra_udc.c
@@ -635,7 +635,7 @@ static int tegra_ep_disable(struct usb_ep *_ep)
ep_num = ep_index(ep);
/* Touch the registers if cable is connected and phy is on */
- if (vbus_enabled(udc)) {
+ if (udc->vbus_active) {
epctrl = udc_readl(udc, EP_CONTROL_REG_OFFSET + (ep_num * 4));
if (ep_is_in(ep))
epctrl &= ~EPCTRL_TX_ENABLE;
@@ -995,7 +995,7 @@ static int tegra_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
ep_num = ep_index(ep);
/* Touch the registers if cable is connected and phy is on */
- if (vbus_enabled(udc)) {
+ if (udc->vbus_active) {
epctrl = udc_readl(udc, EP_CONTROL_REG_OFFSET + (ep_num * 4));
if (ep_is_in(ep))
epctrl &= ~EPCTRL_TX_ENABLE;
@@ -1046,7 +1046,7 @@ static int tegra_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
/* Enable EP */
out:
/* Touch the registers if cable is connected and phy is on */
- if (vbus_enabled(udc)) {
+ if (udc->vbus_active) {
epctrl = udc_readl(udc, EP_CONTROL_REG_OFFSET + (ep_num * 4));
if (ep_is_in(ep))
epctrl |= EPCTRL_TX_ENABLE;
@@ -1168,7 +1168,7 @@ static void tegra_ep_fifo_flush(struct usb_ep *_ep)
bits = 1 << ep_num;
/* Touch the registers if cable is connected and phy is on */
- if (!vbus_enabled(udc))
+ if (!udc->vbus_active)
return;
timeout = jiffies + UDC_FLUSH_TIMEOUT_MS;
@@ -2363,14 +2363,13 @@ static int tegra_udc_start(struct usb_gadget_driver *driver,
goto out;
}
-
/* Enable DR IRQ reg and Set usbcmd reg Run bit */
if (vbus_enabled(udc)) {
dr_controller_run(udc);
udc->usb_state = USB_STATE_ATTACHED;
udc->ep0_state = WAIT_FOR_SETUP;
udc->ep0_dir = 0;
- udc->vbus_active = vbus_enabled(udc);
+ udc->vbus_active = 1;
}
printk(KERN_INFO "%s: bind to driver %s\n",