diff options
-rw-r--r-- | drivers/usb/chipidea/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/dwc3/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/Kconfig | 25 | ||||
-rw-r--r-- | drivers/usb/gadget/composite.c | 9 | ||||
-rw-r--r-- | drivers/usb/gadget/inode.c | 15 | ||||
-rw-r--r-- | drivers/usb/gadget/u_ether.c | 7 | ||||
-rw-r--r-- | drivers/usb/musb/Kconfig | 1 | ||||
-rw-r--r-- | include/linux/usb/gadget.h | 19 |
8 files changed, 7 insertions, 72 deletions
diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index 8337fb5d988d..272109ff5aa3 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig | |||
@@ -13,7 +13,6 @@ if USB_CHIPIDEA | |||
13 | config USB_CHIPIDEA_UDC | 13 | config USB_CHIPIDEA_UDC |
14 | bool "ChipIdea device controller" | 14 | bool "ChipIdea device controller" |
15 | depends on USB_GADGET | 15 | depends on USB_GADGET |
16 | select USB_GADGET_DUALSPEED | ||
17 | help | 16 | help |
18 | Say Y here to enable device controller functionality of the | 17 | Say Y here to enable device controller functionality of the |
19 | ChipIdea driver. | 18 | ChipIdea driver. |
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index d13c60f42139..f6a6e070c2ac 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig | |||
@@ -2,8 +2,6 @@ config USB_DWC3 | |||
2 | tristate "DesignWare USB3 DRD Core Support" | 2 | tristate "DesignWare USB3 DRD Core Support" |
3 | depends on (USB && USB_GADGET) | 3 | depends on (USB && USB_GADGET) |
4 | select USB_OTG_UTILS | 4 | select USB_OTG_UTILS |
5 | select USB_GADGET_DUALSPEED | ||
6 | select USB_GADGET_SUPERSPEED | ||
7 | select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD | 5 | select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD |
8 | help | 6 | help |
9 | Say Y or M here if your system has a Dual Role SuperSpeed | 7 | Say Y or M here if your system has a Dual Role SuperSpeed |
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 51ab5fd5d468..2ba0d0e2eed6 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -154,7 +154,6 @@ config USB_LPC32XX | |||
154 | 154 | ||
155 | config USB_ATMEL_USBA | 155 | config USB_ATMEL_USBA |
156 | tristate "Atmel USBA" | 156 | tristate "Atmel USBA" |
157 | select USB_GADGET_DUALSPEED | ||
158 | depends on AVR32 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 | 157 | depends on AVR32 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 |
159 | help | 158 | help |
160 | USBA is the integrated high-speed USB Device controller on | 159 | USBA is the integrated high-speed USB Device controller on |
@@ -163,7 +162,6 @@ config USB_ATMEL_USBA | |||
163 | config USB_FSL_USB2 | 162 | config USB_FSL_USB2 |
164 | tristate "Freescale Highspeed USB DR Peripheral Controller" | 163 | tristate "Freescale Highspeed USB DR Peripheral Controller" |
165 | depends on FSL_SOC || ARCH_MXC | 164 | depends on FSL_SOC || ARCH_MXC |
166 | select USB_GADGET_DUALSPEED | ||
167 | select USB_FSL_MPH_DR_OF if OF | 165 | select USB_FSL_MPH_DR_OF if OF |
168 | help | 166 | help |
169 | Some of Freescale PowerPC and i.MX processors have a High Speed | 167 | Some of Freescale PowerPC and i.MX processors have a High Speed |
@@ -179,7 +177,6 @@ config USB_FSL_USB2 | |||
179 | config USB_FUSB300 | 177 | config USB_FUSB300 |
180 | tristate "Faraday FUSB300 USB Peripheral Controller" | 178 | tristate "Faraday FUSB300 USB Peripheral Controller" |
181 | depends on !PHYS_ADDR_T_64BIT | 179 | depends on !PHYS_ADDR_T_64BIT |
182 | select USB_GADGET_DUALSPEED | ||
183 | help | 180 | help |
184 | Faraday usb device controller FUSB300 driver | 181 | Faraday usb device controller FUSB300 driver |
185 | 182 | ||
@@ -227,7 +224,6 @@ config USB_PXA25X_SMALL | |||
227 | 224 | ||
228 | config USB_R8A66597 | 225 | config USB_R8A66597 |
229 | tristate "Renesas R8A66597 USB Peripheral Controller" | 226 | tristate "Renesas R8A66597 USB Peripheral Controller" |
230 | select USB_GADGET_DUALSPEED | ||
231 | help | 227 | help |
232 | R8A66597 is a discrete USB host and peripheral controller chip that | 228 | R8A66597 is a discrete USB host and peripheral controller chip that |
233 | supports both full and high speed USB 2.0 data transfers. | 229 | supports both full and high speed USB 2.0 data transfers. |
@@ -240,7 +236,6 @@ config USB_R8A66597 | |||
240 | config USB_RENESAS_USBHS_UDC | 236 | config USB_RENESAS_USBHS_UDC |
241 | tristate 'Renesas USBHS controller' | 237 | tristate 'Renesas USBHS controller' |
242 | depends on USB_RENESAS_USBHS | 238 | depends on USB_RENESAS_USBHS |
243 | select USB_GADGET_DUALSPEED | ||
244 | help | 239 | help |
245 | Renesas USBHS is a discrete USB host and peripheral controller chip | 240 | Renesas USBHS is a discrete USB host and peripheral controller chip |
246 | that supports both full and high speed USB 2.0 data transfers. | 241 | that supports both full and high speed USB 2.0 data transfers. |
@@ -268,7 +263,6 @@ config USB_PXA27X | |||
268 | config USB_S3C_HSOTG | 263 | config USB_S3C_HSOTG |
269 | tristate "S3C HS/OtG USB Device controller" | 264 | tristate "S3C HS/OtG USB Device controller" |
270 | depends on S3C_DEV_USB_HSOTG | 265 | depends on S3C_DEV_USB_HSOTG |
271 | select USB_GADGET_DUALSPEED | ||
272 | help | 266 | help |
273 | The Samsung S3C64XX USB2.0 high-speed gadget controller | 267 | The Samsung S3C64XX USB2.0 high-speed gadget controller |
274 | integrated into the S3C64XX series SoC. | 268 | integrated into the S3C64XX series SoC. |
@@ -305,7 +299,6 @@ config USB_S3C2410_DEBUG | |||
305 | config USB_S3C_HSUDC | 299 | config USB_S3C_HSUDC |
306 | tristate "S3C2416, S3C2443 and S3C2450 USB Device Controller" | 300 | tristate "S3C2416, S3C2443 and S3C2450 USB Device Controller" |
307 | depends on ARCH_S3C24XX | 301 | depends on ARCH_S3C24XX |
308 | select USB_GADGET_DUALSPEED | ||
309 | help | 302 | help |
310 | Samsung's S3C2416, S3C2443 and S3C2450 is an ARM9 based SoC | 303 | Samsung's S3C2416, S3C2443 and S3C2450 is an ARM9 based SoC |
311 | integrated with dual speed USB 2.0 device controller. It has | 304 | integrated with dual speed USB 2.0 device controller. It has |
@@ -315,7 +308,6 @@ config USB_S3C_HSUDC | |||
315 | 308 | ||
316 | config USB_MV_UDC | 309 | config USB_MV_UDC |
317 | tristate "Marvell USB2.0 Device Controller" | 310 | tristate "Marvell USB2.0 Device Controller" |
318 | select USB_GADGET_DUALSPEED | ||
319 | help | 311 | help |
320 | Marvell Socs (including PXA and MMP series) include a high speed | 312 | Marvell Socs (including PXA and MMP series) include a high speed |
321 | USB2.0 OTG controller, which can be configured as high speed or | 313 | USB2.0 OTG controller, which can be configured as high speed or |
@@ -338,14 +330,12 @@ config USB_MV_U3D | |||
338 | config USB_GADGET_MUSB_HDRC | 330 | config USB_GADGET_MUSB_HDRC |
339 | tristate "Inventra HDRC USB Peripheral (TI, ADI, ...)" | 331 | tristate "Inventra HDRC USB Peripheral (TI, ADI, ...)" |
340 | depends on USB_MUSB_HDRC | 332 | depends on USB_MUSB_HDRC |
341 | select USB_GADGET_DUALSPEED | ||
342 | help | 333 | help |
343 | This OTG-capable silicon IP is used in dual designs including | 334 | This OTG-capable silicon IP is used in dual designs including |
344 | the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin | 335 | the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin |
345 | 336 | ||
346 | config USB_M66592 | 337 | config USB_M66592 |
347 | tristate "Renesas M66592 USB Peripheral Controller" | 338 | tristate "Renesas M66592 USB Peripheral Controller" |
348 | select USB_GADGET_DUALSPEED | ||
349 | help | 339 | help |
350 | M66592 is a discrete USB peripheral controller chip that | 340 | M66592 is a discrete USB peripheral controller chip that |
351 | supports both full and high speed USB 2.0 data transfers. | 341 | supports both full and high speed USB 2.0 data transfers. |
@@ -362,7 +352,6 @@ config USB_M66592 | |||
362 | config USB_AMD5536UDC | 352 | config USB_AMD5536UDC |
363 | tristate "AMD5536 UDC" | 353 | tristate "AMD5536 UDC" |
364 | depends on PCI | 354 | depends on PCI |
365 | select USB_GADGET_DUALSPEED | ||
366 | help | 355 | help |
367 | The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge. | 356 | The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge. |
368 | It is a USB Highspeed DMA capable USB device controller. Beside ep0 | 357 | It is a USB Highspeed DMA capable USB device controller. Beside ep0 |
@@ -389,7 +378,6 @@ config USB_FSL_QE | |||
389 | 378 | ||
390 | config USB_NET2272 | 379 | config USB_NET2272 |
391 | tristate "PLX NET2272" | 380 | tristate "PLX NET2272" |
392 | select USB_GADGET_DUALSPEED | ||
393 | help | 381 | help |
394 | PLX NET2272 is a USB peripheral controller which supports | 382 | PLX NET2272 is a USB peripheral controller which supports |
395 | both full and high speed USB 2.0 data transfers. | 383 | both full and high speed USB 2.0 data transfers. |
@@ -413,7 +401,6 @@ config USB_NET2272_DMA | |||
413 | config USB_NET2280 | 401 | config USB_NET2280 |
414 | tristate "NetChip 228x" | 402 | tristate "NetChip 228x" |
415 | depends on PCI | 403 | depends on PCI |
416 | select USB_GADGET_DUALSPEED | ||
417 | help | 404 | help |
418 | NetChip 2280 / 2282 is a PCI based USB peripheral controller which | 405 | NetChip 2280 / 2282 is a PCI based USB peripheral controller which |
419 | supports both full and high speed USB 2.0 data transfers. | 406 | supports both full and high speed USB 2.0 data transfers. |
@@ -443,7 +430,6 @@ config USB_GOKU | |||
443 | config USB_EG20T | 430 | config USB_EG20T |
444 | tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC" | 431 | tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC" |
445 | depends on PCI | 432 | depends on PCI |
446 | select USB_GADGET_DUALSPEED | ||
447 | help | 433 | help |
448 | This is a USB device driver for EG20T PCH. | 434 | This is a USB device driver for EG20T PCH. |
449 | EG20T PCH is the platform controller hub that is used in Intel's | 435 | EG20T PCH is the platform controller hub that is used in Intel's |
@@ -470,8 +456,6 @@ config USB_EG20T | |||
470 | config USB_DUMMY_HCD | 456 | config USB_DUMMY_HCD |
471 | tristate "Dummy HCD (DEVELOPMENT)" | 457 | tristate "Dummy HCD (DEVELOPMENT)" |
472 | depends on USB=y || (USB=m && USB_GADGET=m) | 458 | depends on USB=y || (USB=m && USB_GADGET=m) |
473 | select USB_GADGET_DUALSPEED | ||
474 | select USB_GADGET_SUPERSPEED | ||
475 | help | 459 | help |
476 | This host controller driver emulates USB, looping all data transfer | 460 | This host controller driver emulates USB, looping all data transfer |
477 | requests back to a USB "gadget driver" in the same host. The host | 461 | requests back to a USB "gadget driver" in the same host. The host |
@@ -496,15 +480,6 @@ config USB_DUMMY_HCD | |||
496 | 480 | ||
497 | endmenu | 481 | endmenu |
498 | 482 | ||
499 | # Selected by UDC drivers that support high-speed operation. | ||
500 | config USB_GADGET_DUALSPEED | ||
501 | bool | ||
502 | |||
503 | # Selected by UDC drivers that support super-speed opperation | ||
504 | config USB_GADGET_SUPERSPEED | ||
505 | bool | ||
506 | depends on USB_GADGET_DUALSPEED | ||
507 | |||
508 | # | 483 | # |
509 | # USB Gadget Drivers | 484 | # USB Gadget Drivers |
510 | # | 485 | # |
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 2cb1030203b5..91411a6d741b 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -1586,12 +1586,6 @@ composite_resume(struct usb_gadget *gadget) | |||
1586 | /*-------------------------------------------------------------------------*/ | 1586 | /*-------------------------------------------------------------------------*/ |
1587 | 1587 | ||
1588 | static struct usb_gadget_driver composite_driver = { | 1588 | static struct usb_gadget_driver composite_driver = { |
1589 | #ifdef CONFIG_USB_GADGET_SUPERSPEED | ||
1590 | .max_speed = USB_SPEED_SUPER, | ||
1591 | #else | ||
1592 | .max_speed = USB_SPEED_HIGH, | ||
1593 | #endif | ||
1594 | |||
1595 | .unbind = composite_unbind, | 1589 | .unbind = composite_unbind, |
1596 | 1590 | ||
1597 | .setup = composite_setup, | 1591 | .setup = composite_setup, |
@@ -1636,8 +1630,7 @@ int usb_composite_probe(struct usb_composite_driver *driver, | |||
1636 | driver->iProduct = driver->name; | 1630 | driver->iProduct = driver->name; |
1637 | composite_driver.function = (char *) driver->name; | 1631 | composite_driver.function = (char *) driver->name; |
1638 | composite_driver.driver.name = driver->name; | 1632 | composite_driver.driver.name = driver->name; |
1639 | composite_driver.max_speed = | 1633 | composite_driver.max_speed = driver->max_speed; |
1640 | min_t(u8, composite_driver.max_speed, driver->max_speed); | ||
1641 | composite = driver; | 1634 | composite = driver; |
1642 | composite_gadget_bind = bind; | 1635 | composite_gadget_bind = bind; |
1643 | 1636 | ||
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index e58b16442971..ae13a106fb96 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -828,7 +828,6 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
828 | if (value == 0) | 828 | if (value == 0) |
829 | data->state = STATE_EP_ENABLED; | 829 | data->state = STATE_EP_ENABLED; |
830 | break; | 830 | break; |
831 | #ifdef CONFIG_USB_GADGET_DUALSPEED | ||
832 | case USB_SPEED_HIGH: | 831 | case USB_SPEED_HIGH: |
833 | /* fails if caller didn't provide that descriptor... */ | 832 | /* fails if caller didn't provide that descriptor... */ |
834 | ep->desc = &data->hs_desc; | 833 | ep->desc = &data->hs_desc; |
@@ -836,7 +835,6 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
836 | if (value == 0) | 835 | if (value == 0) |
837 | data->state = STATE_EP_ENABLED; | 836 | data->state = STATE_EP_ENABLED; |
838 | break; | 837 | break; |
839 | #endif | ||
840 | default: | 838 | default: |
841 | DBG(data->dev, "unconnected, %s init abandoned\n", | 839 | DBG(data->dev, "unconnected, %s init abandoned\n", |
842 | data->name); | 840 | data->name); |
@@ -1324,7 +1322,6 @@ static const struct file_operations ep0_io_operations = { | |||
1324 | * Unrecognized ep0 requests may be handled in user space. | 1322 | * Unrecognized ep0 requests may be handled in user space. |
1325 | */ | 1323 | */ |
1326 | 1324 | ||
1327 | #ifdef CONFIG_USB_GADGET_DUALSPEED | ||
1328 | static void make_qualifier (struct dev_data *dev) | 1325 | static void make_qualifier (struct dev_data *dev) |
1329 | { | 1326 | { |
1330 | struct usb_qualifier_descriptor qual; | 1327 | struct usb_qualifier_descriptor qual; |
@@ -1347,7 +1344,6 @@ static void make_qualifier (struct dev_data *dev) | |||
1347 | 1344 | ||
1348 | memcpy (dev->rbuf, &qual, sizeof qual); | 1345 | memcpy (dev->rbuf, &qual, sizeof qual); |
1349 | } | 1346 | } |
1350 | #endif | ||
1351 | 1347 | ||
1352 | static int | 1348 | static int |
1353 | config_buf (struct dev_data *dev, u8 type, unsigned index) | 1349 | config_buf (struct dev_data *dev, u8 type, unsigned index) |
@@ -1427,7 +1423,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
1427 | dev->dev->bMaxPacketSize0 = dev->gadget->ep0->maxpacket; | 1423 | dev->dev->bMaxPacketSize0 = dev->gadget->ep0->maxpacket; |
1428 | req->buf = dev->dev; | 1424 | req->buf = dev->dev; |
1429 | break; | 1425 | break; |
1430 | #ifdef CONFIG_USB_GADGET_DUALSPEED | ||
1431 | case USB_DT_DEVICE_QUALIFIER: | 1426 | case USB_DT_DEVICE_QUALIFIER: |
1432 | if (!dev->hs_config) | 1427 | if (!dev->hs_config) |
1433 | break; | 1428 | break; |
@@ -1437,7 +1432,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
1437 | break; | 1432 | break; |
1438 | case USB_DT_OTHER_SPEED_CONFIG: | 1433 | case USB_DT_OTHER_SPEED_CONFIG: |
1439 | // FALLTHROUGH | 1434 | // FALLTHROUGH |
1440 | #endif | ||
1441 | case USB_DT_CONFIG: | 1435 | case USB_DT_CONFIG: |
1442 | value = config_buf (dev, | 1436 | value = config_buf (dev, |
1443 | w_value >> 8, | 1437 | w_value >> 8, |
@@ -1763,11 +1757,6 @@ gadgetfs_suspend (struct usb_gadget *gadget) | |||
1763 | } | 1757 | } |
1764 | 1758 | ||
1765 | static struct usb_gadget_driver gadgetfs_driver = { | 1759 | static struct usb_gadget_driver gadgetfs_driver = { |
1766 | #ifdef CONFIG_USB_GADGET_DUALSPEED | ||
1767 | .max_speed = USB_SPEED_HIGH, | ||
1768 | #else | ||
1769 | .max_speed = USB_SPEED_FULL, | ||
1770 | #endif | ||
1771 | .function = (char *) driver_desc, | 1760 | .function = (char *) driver_desc, |
1772 | .unbind = gadgetfs_unbind, | 1761 | .unbind = gadgetfs_unbind, |
1773 | .setup = gadgetfs_setup, | 1762 | .setup = gadgetfs_setup, |
@@ -1900,6 +1889,10 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
1900 | 1889 | ||
1901 | /* triggers gadgetfs_bind(); then we can enumerate. */ | 1890 | /* triggers gadgetfs_bind(); then we can enumerate. */ |
1902 | spin_unlock_irq (&dev->lock); | 1891 | spin_unlock_irq (&dev->lock); |
1892 | if (dev->hs_config) | ||
1893 | gadgetfs_driver.max_speed = USB_SPEED_HIGH; | ||
1894 | else | ||
1895 | gadgetfs_driver.max_speed = USB_SPEED_FULL; | ||
1903 | value = usb_gadget_probe_driver(&gadgetfs_driver, gadgetfs_bind); | 1896 | value = usb_gadget_probe_driver(&gadgetfs_driver, gadgetfs_bind); |
1904 | if (value != 0) { | 1897 | if (value != 0) { |
1905 | kfree (dev->buf); | 1898 | kfree (dev->buf); |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 90e82e288eb9..1154a99dc8db 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -83,17 +83,10 @@ struct eth_dev { | |||
83 | 83 | ||
84 | #define DEFAULT_QLEN 2 /* double buffering by default */ | 84 | #define DEFAULT_QLEN 2 /* double buffering by default */ |
85 | 85 | ||
86 | |||
87 | #ifdef CONFIG_USB_GADGET_DUALSPEED | ||
88 | |||
89 | static unsigned qmult = 5; | 86 | static unsigned qmult = 5; |
90 | module_param(qmult, uint, S_IRUGO|S_IWUSR); | 87 | module_param(qmult, uint, S_IRUGO|S_IWUSR); |
91 | MODULE_PARM_DESC(qmult, "queue length multiplier at high/super speed"); | 88 | MODULE_PARM_DESC(qmult, "queue length multiplier at high/super speed"); |
92 | 89 | ||
93 | #else /* full speed (low speed doesn't do bulk) */ | ||
94 | #define qmult 1 | ||
95 | #endif | ||
96 | |||
97 | /* for dual-speed hardware, use deeper queues at high/super speed */ | 90 | /* for dual-speed hardware, use deeper queues at high/super speed */ |
98 | static inline int qlen(struct usb_gadget *gadget) | 91 | static inline int qlen(struct usb_gadget *gadget) |
99 | { | 92 | { |
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index ef0c3f9f0947..1b9f005ae9a5 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
@@ -12,7 +12,6 @@ config USB_MUSB_HDRC | |||
12 | select TWL4030_USB if MACH_OMAP_3430SDP | 12 | select TWL4030_USB if MACH_OMAP_3430SDP |
13 | select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA | 13 | select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA |
14 | select USB_OTG_UTILS | 14 | select USB_OTG_UTILS |
15 | select USB_GADGET_DUALSPEED | ||
16 | help | 15 | help |
17 | Say Y here if your system has a dual role high speed USB | 16 | Say Y here if your system has a dual role high speed USB |
18 | controller based on the Mentor Graphics silicon IP. Then | 17 | controller based on the Mentor Graphics silicon IP. Then |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 9517466ababb..d05b220f0fd3 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -558,14 +558,7 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev) | |||
558 | */ | 558 | */ |
559 | static inline int gadget_is_dualspeed(struct usb_gadget *g) | 559 | static inline int gadget_is_dualspeed(struct usb_gadget *g) |
560 | { | 560 | { |
561 | #ifdef CONFIG_USB_GADGET_DUALSPEED | 561 | return g->max_speed >= USB_SPEED_HIGH; |
562 | /* runtime test would check "g->max_speed" ... that might be | ||
563 | * useful to work around hardware bugs, but is mostly pointless | ||
564 | */ | ||
565 | return 1; | ||
566 | #else | ||
567 | return 0; | ||
568 | #endif | ||
569 | } | 562 | } |
570 | 563 | ||
571 | /** | 564 | /** |
@@ -575,15 +568,7 @@ static inline int gadget_is_dualspeed(struct usb_gadget *g) | |||
575 | */ | 568 | */ |
576 | static inline int gadget_is_superspeed(struct usb_gadget *g) | 569 | static inline int gadget_is_superspeed(struct usb_gadget *g) |
577 | { | 570 | { |
578 | #ifdef CONFIG_USB_GADGET_SUPERSPEED | 571 | return g->max_speed >= USB_SPEED_SUPER; |
579 | /* | ||
580 | * runtime test would check "g->max_speed" ... that might be | ||
581 | * useful to work around hardware bugs, but is mostly pointless | ||
582 | */ | ||
583 | return 1; | ||
584 | #else | ||
585 | return 0; | ||
586 | #endif | ||
587 | } | 572 | } |
588 | 573 | ||
589 | /** | 574 | /** |