Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325891
b: refs/heads/master
c: 85b8614
h: refs/heads/master
i:
  325889: b40c98d
  325887: dbd92cc
v: v3
  • Loading branch information
Michal Nazarewicz authored and Felipe Balbi committed Aug 31, 2012
1 parent 3fd4061 commit 1e50719
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 73 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 86bab36662d47388102ca437a3cbfd79e0ea75cd
refs/heads/master: 85b8614d722389202af298e1bf8a599c431fef19
1 change: 0 additions & 1 deletion trunk/drivers/usb/chipidea/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if USB_CHIPIDEA
config USB_CHIPIDEA_UDC
bool "ChipIdea device controller"
depends on USB_GADGET
select USB_GADGET_DUALSPEED
help
Say Y here to enable device controller functionality of the
ChipIdea driver.
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/dwc3/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ config USB_DWC3
tristate "DesignWare USB3 DRD Core Support"
depends on (USB && USB_GADGET)
select USB_OTG_UTILS
select USB_GADGET_DUALSPEED
select USB_GADGET_SUPERSPEED
select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD
help
Say Y or M here if your system has a Dual Role SuperSpeed
Expand Down
25 changes: 0 additions & 25 deletions trunk/drivers/usb/gadget/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ config USB_LPC32XX

config USB_ATMEL_USBA
tristate "Atmel USBA"
select USB_GADGET_DUALSPEED
depends on AVR32 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
help
USBA is the integrated high-speed USB Device controller on
Expand All @@ -163,7 +162,6 @@ config USB_ATMEL_USBA
config USB_FSL_USB2
tristate "Freescale Highspeed USB DR Peripheral Controller"
depends on FSL_SOC || ARCH_MXC
select USB_GADGET_DUALSPEED
select USB_FSL_MPH_DR_OF if OF
help
Some of Freescale PowerPC and i.MX processors have a High Speed
Expand All @@ -179,7 +177,6 @@ config USB_FSL_USB2
config USB_FUSB300
tristate "Faraday FUSB300 USB Peripheral Controller"
depends on !PHYS_ADDR_T_64BIT
select USB_GADGET_DUALSPEED
help
Faraday usb device controller FUSB300 driver

Expand Down Expand Up @@ -227,7 +224,6 @@ config USB_PXA25X_SMALL

config USB_R8A66597
tristate "Renesas R8A66597 USB Peripheral Controller"
select USB_GADGET_DUALSPEED
help
R8A66597 is a discrete USB host and peripheral controller chip that
supports both full and high speed USB 2.0 data transfers.
Expand All @@ -240,7 +236,6 @@ config USB_R8A66597
config USB_RENESAS_USBHS_UDC
tristate 'Renesas USBHS controller'
depends on USB_RENESAS_USBHS
select USB_GADGET_DUALSPEED
help
Renesas USBHS is a discrete USB host and peripheral controller chip
that supports both full and high speed USB 2.0 data transfers.
Expand Down Expand Up @@ -268,7 +263,6 @@ config USB_PXA27X
config USB_S3C_HSOTG
tristate "S3C HS/OtG USB Device controller"
depends on S3C_DEV_USB_HSOTG
select USB_GADGET_DUALSPEED
help
The Samsung S3C64XX USB2.0 high-speed gadget controller
integrated into the S3C64XX series SoC.
Expand Down Expand Up @@ -305,7 +299,6 @@ config USB_S3C2410_DEBUG
config USB_S3C_HSUDC
tristate "S3C2416, S3C2443 and S3C2450 USB Device Controller"
depends on ARCH_S3C24XX
select USB_GADGET_DUALSPEED
help
Samsung's S3C2416, S3C2443 and S3C2450 is an ARM9 based SoC
integrated with dual speed USB 2.0 device controller. It has
Expand All @@ -315,7 +308,6 @@ config USB_S3C_HSUDC

config USB_MV_UDC
tristate "Marvell USB2.0 Device Controller"
select USB_GADGET_DUALSPEED
help
Marvell Socs (including PXA and MMP series) include a high speed
USB2.0 OTG controller, which can be configured as high speed or
Expand All @@ -338,14 +330,12 @@ config USB_MV_U3D
config USB_GADGET_MUSB_HDRC
tristate "Inventra HDRC USB Peripheral (TI, ADI, ...)"
depends on USB_MUSB_HDRC
select USB_GADGET_DUALSPEED
help
This OTG-capable silicon IP is used in dual designs including
the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin

config USB_M66592
tristate "Renesas M66592 USB Peripheral Controller"
select USB_GADGET_DUALSPEED
help
M66592 is a discrete USB peripheral controller chip that
supports both full and high speed USB 2.0 data transfers.
Expand All @@ -362,7 +352,6 @@ config USB_M66592
config USB_AMD5536UDC
tristate "AMD5536 UDC"
depends on PCI
select USB_GADGET_DUALSPEED
help
The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge.
It is a USB Highspeed DMA capable USB device controller. Beside ep0
Expand All @@ -389,7 +378,6 @@ config USB_FSL_QE

config USB_NET2272
tristate "PLX NET2272"
select USB_GADGET_DUALSPEED
help
PLX NET2272 is a USB peripheral controller which supports
both full and high speed USB 2.0 data transfers.
Expand All @@ -413,7 +401,6 @@ config USB_NET2272_DMA
config USB_NET2280
tristate "NetChip 228x"
depends on PCI
select USB_GADGET_DUALSPEED
help
NetChip 2280 / 2282 is a PCI based USB peripheral controller which
supports both full and high speed USB 2.0 data transfers.
Expand Down Expand Up @@ -443,7 +430,6 @@ config USB_GOKU
config USB_EG20T
tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC"
depends on PCI
select USB_GADGET_DUALSPEED
help
This is a USB device driver for EG20T PCH.
EG20T PCH is the platform controller hub that is used in Intel's
Expand All @@ -470,8 +456,6 @@ config USB_EG20T
config USB_DUMMY_HCD
tristate "Dummy HCD (DEVELOPMENT)"
depends on USB=y || (USB=m && USB_GADGET=m)
select USB_GADGET_DUALSPEED
select USB_GADGET_SUPERSPEED
help
This host controller driver emulates USB, looping all data transfer
requests back to a USB "gadget driver" in the same host. The host
Expand All @@ -496,15 +480,6 @@ config USB_DUMMY_HCD

endmenu

# Selected by UDC drivers that support high-speed operation.
config USB_GADGET_DUALSPEED
bool

# Selected by UDC drivers that support super-speed opperation
config USB_GADGET_SUPERSPEED
bool
depends on USB_GADGET_DUALSPEED

#
# USB Gadget Drivers
#
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,12 +1586,6 @@ composite_resume(struct usb_gadget *gadget)
/*-------------------------------------------------------------------------*/

static struct usb_gadget_driver composite_driver = {
#ifdef CONFIG_USB_GADGET_SUPERSPEED
.max_speed = USB_SPEED_SUPER,
#else
.max_speed = USB_SPEED_HIGH,
#endif

.unbind = composite_unbind,

.setup = composite_setup,
Expand Down Expand Up @@ -1636,8 +1630,7 @@ int usb_composite_probe(struct usb_composite_driver *driver,
driver->iProduct = driver->name;
composite_driver.function = (char *) driver->name;
composite_driver.driver.name = driver->name;
composite_driver.max_speed =
min_t(u8, composite_driver.max_speed, driver->max_speed);
composite_driver.max_speed = driver->max_speed;
composite = driver;
composite_gadget_bind = bind;

Expand Down
15 changes: 4 additions & 11 deletions trunk/drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,15 +828,13 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
if (value == 0)
data->state = STATE_EP_ENABLED;
break;
#ifdef CONFIG_USB_GADGET_DUALSPEED
case USB_SPEED_HIGH:
/* fails if caller didn't provide that descriptor... */
ep->desc = &data->hs_desc;
value = usb_ep_enable(ep);
if (value == 0)
data->state = STATE_EP_ENABLED;
break;
#endif
default:
DBG(data->dev, "unconnected, %s init abandoned\n",
data->name);
Expand Down Expand Up @@ -1324,7 +1322,6 @@ static const struct file_operations ep0_io_operations = {
* Unrecognized ep0 requests may be handled in user space.
*/

#ifdef CONFIG_USB_GADGET_DUALSPEED
static void make_qualifier (struct dev_data *dev)
{
struct usb_qualifier_descriptor qual;
Expand All @@ -1347,7 +1344,6 @@ static void make_qualifier (struct dev_data *dev)

memcpy (dev->rbuf, &qual, sizeof qual);
}
#endif

static int
config_buf (struct dev_data *dev, u8 type, unsigned index)
Expand Down Expand Up @@ -1427,7 +1423,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
dev->dev->bMaxPacketSize0 = dev->gadget->ep0->maxpacket;
req->buf = dev->dev;
break;
#ifdef CONFIG_USB_GADGET_DUALSPEED
case USB_DT_DEVICE_QUALIFIER:
if (!dev->hs_config)
break;
Expand All @@ -1437,7 +1432,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
break;
case USB_DT_OTHER_SPEED_CONFIG:
// FALLTHROUGH
#endif
case USB_DT_CONFIG:
value = config_buf (dev,
w_value >> 8,
Expand Down Expand Up @@ -1763,11 +1757,6 @@ gadgetfs_suspend (struct usb_gadget *gadget)
}

static struct usb_gadget_driver gadgetfs_driver = {
#ifdef CONFIG_USB_GADGET_DUALSPEED
.max_speed = USB_SPEED_HIGH,
#else
.max_speed = USB_SPEED_FULL,
#endif
.function = (char *) driver_desc,
.unbind = gadgetfs_unbind,
.setup = gadgetfs_setup,
Expand Down Expand Up @@ -1900,6 +1889,10 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)

/* triggers gadgetfs_bind(); then we can enumerate. */
spin_unlock_irq (&dev->lock);
if (dev->hs_config)
gadgetfs_driver.max_speed = USB_SPEED_HIGH;
else
gadgetfs_driver.max_speed = USB_SPEED_FULL;
value = usb_gadget_probe_driver(&gadgetfs_driver, gadgetfs_bind);
if (value != 0) {
kfree (dev->buf);
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/usb/gadget/u_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,10 @@ struct eth_dev {

#define DEFAULT_QLEN 2 /* double buffering by default */


#ifdef CONFIG_USB_GADGET_DUALSPEED

static unsigned qmult = 5;
module_param(qmult, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(qmult, "queue length multiplier at high/super speed");

#else /* full speed (low speed doesn't do bulk) */
#define qmult 1
#endif

/* for dual-speed hardware, use deeper queues at high/super speed */
static inline int qlen(struct usb_gadget *gadget)
{
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/musb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ config USB_MUSB_HDRC
select TWL4030_USB if MACH_OMAP_3430SDP
select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
select USB_OTG_UTILS
select USB_GADGET_DUALSPEED
help
Say Y here if your system has a dual role high speed USB
controller based on the Mentor Graphics silicon IP. Then
Expand Down
19 changes: 2 additions & 17 deletions trunk/include/linux/usb/gadget.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,7 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
*/
static inline int gadget_is_dualspeed(struct usb_gadget *g)
{
#ifdef CONFIG_USB_GADGET_DUALSPEED
/* runtime test would check "g->max_speed" ... that might be
* useful to work around hardware bugs, but is mostly pointless
*/
return 1;
#else
return 0;
#endif
return g->max_speed >= USB_SPEED_HIGH;
}

/**
Expand All @@ -575,15 +568,7 @@ static inline int gadget_is_dualspeed(struct usb_gadget *g)
*/
static inline int gadget_is_superspeed(struct usb_gadget *g)
{
#ifdef CONFIG_USB_GADGET_SUPERSPEED
/*
* runtime test would check "g->max_speed" ... that might be
* useful to work around hardware bugs, but is mostly pointless
*/
return 1;
#else
return 0;
#endif
return g->max_speed >= USB_SPEED_SUPER;
}

/**
Expand Down

0 comments on commit 1e50719

Please sign in to comment.