summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/udc.c
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2012-05-11 18:25:54 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-12 03:56:15 +0400
commiteb70e5ab8f95a81283623c03d2c99dfc59fcb319 (patch)
treefc20c9d10484171490cf6b69f7f5b6f934803366 /drivers/usb/chipidea/udc.c
parent758fc9860c19eceb56e5886a5225db623c521971 (diff)
downloadlinux-eb70e5ab8f95a81283623c03d2c99dfc59fcb319.tar.xz
usb: chipidea: add host role
This adds EHCI host support to the chipidea driver. We want it to be part of the hdrc driver and not a standalone (sub-)driver module, as the structure of ehci-hcd.c suggests, so for chipidea controller we hack it to not provide platform-related code, but only the ehci hcd. The ehci-platform driver won't work for us here too, because the controller uses the same registers for both device and host mode and also otg-related bits, so it's not really possible to put ehci registers into a separate resource. This is not a pretty solution, but the alternative is exporting symbols from the chipidea driver to a ehci-chipidea driver and doing all the module refcounting. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r--drivers/usb/chipidea/udc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 290946d618d8..fb0a91158006 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1,5 +1,5 @@
/*
- * udc.h - ChipIdea UDC driver
+ * udc.c - ChipIdea UDC driver
*
* Copyright (C) 2008 Chipidea - MIPS Technologies, Inc. All rights reserved.
*
@@ -1396,7 +1396,7 @@ static int ci13xxx_vbus_session(struct usb_gadget *_gadget, int is_active)
if (gadget_ready) {
if (is_active) {
pm_runtime_get_sync(&_gadget->dev);
- hw_device_reset(udc);
+ hw_device_reset(udc, USBMODE_CM_DC);
hw_device_state(udc, udc->ep0out->qh.dma);
} else {
hw_device_state(udc, 0);
@@ -1540,7 +1540,7 @@ static int ci13xxx_start(struct usb_gadget *gadget,
if (udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS) {
if (udc->vbus_active) {
if (udc->udc_driver->flags & CI13XXX_REGS_SHARED)
- hw_device_reset(udc);
+ hw_device_reset(udc, USBMODE_CM_DC);
} else {
pm_runtime_put_sync(&udc->gadget.dev);
goto done;
@@ -1720,7 +1720,7 @@ static int udc_start(struct ci13xxx *udc)
}
if (!(udc->udc_driver->flags & CI13XXX_REGS_SHARED)) {
- retval = hw_device_reset(udc);
+ retval = hw_device_reset(udc, USBMODE_CM_DC);
if (retval)
goto put_transceiver;
}