aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-12-04 16:19:18 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-12-04 16:19:18 +0000
commitd6328b1ebb310d6cf7d77a6cf32ef426f9dc7302 (patch)
tree331b8b6796b27b40b081f1dc878d58708a89306f /target/linux/cns3xxx
parentea51c07a1753705e262b5eae8fd1b8383ef46494 (diff)
downloadupstream-d6328b1ebb310d6cf7d77a6cf32ef426f9dc7302.tar.gz
upstream-d6328b1ebb310d6cf7d77a6cf32ef426f9dc7302.tar.bz2
upstream-d6328b1ebb310d6cf7d77a6cf32ef426f9dc7302.zip
cns3xxx: fix dwc_otg driver compat with udc-core
function. This removes those from the dwc_otg driver and removes the patch that comments out the linkage of udc-core so that the dwc_otg driver can co-exist happily with other USB Device Controllers. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34475 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/cns3xxx')
-rw-r--r--target/linux/cns3xxx/files/drivers/usb/dwc/otg_pcd.c83
-rw-r--r--target/linux/cns3xxx/patches-3.3/200-dwc_otg_support.patch11
2 files changed, 0 insertions, 94 deletions
diff --git a/target/linux/cns3xxx/files/drivers/usb/dwc/otg_pcd.c b/target/linux/cns3xxx/files/drivers/usb/dwc/otg_pcd.c
index 2cf6243ad0..85c6fd9074 100644
--- a/target/linux/cns3xxx/files/drivers/usb/dwc/otg_pcd.c
+++ b/target/linux/cns3xxx/files/drivers/usb/dwc/otg_pcd.c
@@ -2416,87 +2416,4 @@ void dwc_otg_pcd_remove(struct platform_device *pdev)
otg_dev->pcd = 0;
}
-/**
- * This function registers a gadget driver with the PCD.
- *
- * When a driver is successfully registered, it will receive control
- * requests including set_configuration(), which enables non-control
- * requests. then usb traffic follows until a disconnect is reported.
- * then a host may connect again, or the driver might get unbound.
- *
- * @param driver The driver being registered
- */
-int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
- int (*bind)(struct usb_gadget *))
-{
- int retval;
-
- DWC_DEBUGPL(DBG_PCD, "registering gadget driver '%s'\n", driver->driver.name);
-
- if (!driver || driver->max_speed == USB_SPEED_UNKNOWN ||
- !bind ||
- !driver->unbind ||
- !driver->disconnect ||
- !driver->setup) {
- DWC_DEBUGPL(DBG_PCDV,"EINVAL\n");
- return -EINVAL;
- }
- if (s_pcd == 0) {
- DWC_DEBUGPL(DBG_PCDV,"ENODEV\n");
- return -ENODEV;
- }
- if (s_pcd->driver != 0) {
- DWC_DEBUGPL(DBG_PCDV,"EBUSY (%p)\n", s_pcd->driver);
- return -EBUSY;
- }
-
- /* hook up the driver */
- s_pcd->driver = driver;
- s_pcd->gadget.dev.driver = &driver->driver;
-
- DWC_DEBUGPL(DBG_PCD, "bind to driver %s\n", driver->driver.name);
- retval = bind(&s_pcd->gadget);
- if (retval) {
- DWC_ERROR("bind to driver %s --> error %d\n",
- driver->driver.name, retval);
- s_pcd->driver = 0;
- s_pcd->gadget.dev.driver = 0;
- return retval;
- }
- DWC_DEBUGPL(DBG_ANY, "registered gadget driver '%s'\n",
- driver->driver.name);
- return 0;
-}
-
-EXPORT_SYMBOL(usb_gadget_probe_driver);
-
-/**
- * This function unregisters a gadget driver
- *
- * @param driver The driver being unregistered
- */
-int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
-{
- //DWC_DEBUGPL(DBG_PCDV,"%s(%p)\n", __func__, _driver);
-
- if (s_pcd == 0) {
- DWC_DEBUGPL(DBG_ANY, "%s Return(%d): s_pcd==0\n", __func__,
- -ENODEV);
- return -ENODEV;
- }
- if (driver == 0 || driver != s_pcd->driver) {
- DWC_DEBUGPL(DBG_ANY, "%s Return(%d): driver?\n", __func__,
- -EINVAL);
- return -EINVAL;
- }
-
- driver->unbind(&s_pcd->gadget);
- s_pcd->driver = 0;
-
- DWC_DEBUGPL(DBG_ANY, "unregistered driver '%s'\n",
- driver->driver.name);
- return 0;
-}
-EXPORT_SYMBOL(usb_gadget_unregister_driver);
-
#endif /* DWC_HOST_ONLY */
diff --git a/target/linux/cns3xxx/patches-3.3/200-dwc_otg_support.patch b/target/linux/cns3xxx/patches-3.3/200-dwc_otg_support.patch
index ce15f7ccd8..361c08ae40 100644
--- a/target/linux/cns3xxx/patches-3.3/200-dwc_otg_support.patch
+++ b/target/linux/cns3xxx/patches-3.3/200-dwc_otg_support.patch
@@ -56,14 +56,3 @@
help
A USB device uses a controller to talk to its host.
Systems should have only one such upstream link.
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -3,7 +3,7 @@
- #
- ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG
-
--obj-$(CONFIG_USB_GADGET) += udc-core.o
-+#obj-$(CONFIG_USB_GADGET) += udc-core.o
- obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
- obj-$(CONFIG_USB_NET2272) += net2272.o
- obj-$(CONFIG_USB_NET2280) += net2280.o