aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini2022-12-02 16:42:49 -0500
committerTom Rini2022-12-22 10:31:49 -0500
commit0c3a6d443f4751b681566e8a752d12e04f4369f4 (patch)
tree349b44fe7364bef1058432403b88dbbf6bf4f816 /drivers
parent8747decc9bda5512c2d7eff4c7cab178e5ad6152 (diff)
usb: Remove CONFIG_USBD_HS
This define is not enabled by the only platform which currently enables the legacy option of CONFIG_USB_DEVICE. We can drop this code. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/usbtty.c50
-rw-r--r--drivers/serial/usbtty.h4
-rw-r--r--drivers/usb/gadget/ep0.c19
3 files changed, 0 insertions, 73 deletions
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index 4f4eb02de08..07a59ec9607 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -120,20 +120,6 @@ static struct usb_device_descriptor device_descriptor = {
.bNumConfigurations = NUM_CONFIGS
};
-
-#if defined(CONFIG_USBD_HS)
-static struct usb_qualifier_descriptor qualifier_descriptor = {
- .bLength = sizeof(struct usb_qualifier_descriptor),
- .bDescriptorType = USB_DT_QUAL,
- .bcdUSB = cpu_to_le16(USB_BCD_VERSION),
- .bDeviceClass = COMMUNICATIONS_DEVICE_CLASS,
- .bDeviceSubClass = 0x00,
- .bDeviceProtocol = 0x00,
- .bMaxPacketSize0 = EP0_MAX_PACKET_SIZE,
- .bNumConfigurations = NUM_CONFIGS
-};
-#endif
-
/*
* Static CDC ACM specific descriptors
*/
@@ -639,9 +625,6 @@ static void usbtty_init_instances (void)
memset (device_instance, 0, sizeof (struct usb_device_instance));
device_instance->device_state = STATE_INIT;
device_instance->device_descriptor = &device_descriptor;
-#if defined(CONFIG_USBD_HS)
- device_instance->qualifier_descriptor = &qualifier_descriptor;
-#endif
device_instance->event = usbtty_event_handler;
device_instance->cdc_recv_setup = usbtty_cdc_setup;
device_instance->bus = bus_instance;
@@ -755,10 +738,6 @@ static void usbtty_init_terminal_type(short type)
device_descriptor.idProduct =
cpu_to_le16(CONFIG_USBD_PRODUCTID_CDCACM);
-#if defined(CONFIG_USBD_HS)
- qualifier_descriptor.bDeviceClass =
- COMMUNICATIONS_DEVICE_CLASS;
-#endif
/* Assign endpoint indices */
tx_endpoint = ACM_TX_ENDPOINT;
rx_endpoint = ACM_RX_ENDPOINT;
@@ -787,9 +766,6 @@ static void usbtty_init_terminal_type(short type)
device_descriptor.bDeviceClass = 0xFF;
device_descriptor.idProduct =
cpu_to_le16(CONFIG_USBD_PRODUCTID_GSERIAL);
-#if defined(CONFIG_USBD_HS)
- qualifier_descriptor.bDeviceClass = 0xFF;
-#endif
/* Assign endpoint indices */
tx_endpoint = GSERIAL_TX_ENDPOINT;
rx_endpoint = GSERIAL_RX_ENDPOINT;
@@ -937,9 +913,6 @@ static int usbtty_configured (void)
static void usbtty_event_handler (struct usb_device_instance *device,
usb_device_event_t event, int data)
{
-#if defined(CONFIG_USBD_HS)
- int i;
-#endif
switch (event) {
case DEVICE_RESET:
case DEVICE_BUS_INACTIVE:
@@ -950,29 +923,6 @@ static void usbtty_event_handler (struct usb_device_instance *device,
break;
case DEVICE_ADDRESS_ASSIGNED:
-#if defined(CONFIG_USBD_HS)
- /*
- * is_usbd_high_speed routine needs to be defined by
- * specific gadget driver
- * It returns true if device enumerates at High speed
- * Retuns false otherwise
- */
- for (i = 0; i < NUM_ENDPOINTS; i++) {
- if (((ep_descriptor_ptrs[i]->bmAttributes &
- USB_ENDPOINT_XFERTYPE_MASK) ==
- USB_ENDPOINT_XFER_BULK)
- && is_usbd_high_speed()) {
-
- ep_descriptor_ptrs[i]->wMaxPacketSize =
- CONFIG_USBD_SERIAL_BULK_HS_PKTSIZE;
- }
-
- endpoint_instance[i + 1].tx_packetSize =
- ep_descriptor_ptrs[i]->wMaxPacketSize;
- endpoint_instance[i + 1].rcv_packetSize =
- ep_descriptor_ptrs[i]->wMaxPacketSize;
- }
-#endif
usbtty_init_endpoints ();
default:
diff --git a/drivers/serial/usbtty.h b/drivers/serial/usbtty.h
index e27aa368c9a..ac4d22044d3 100644
--- a/drivers/serial/usbtty.h
+++ b/drivers/serial/usbtty.h
@@ -51,10 +51,6 @@
#define CONFIG_USBD_SERIAL_INT_PKTSIZE UDC_INT_PACKET_SIZE
#define CONFIG_USBD_SERIAL_BULK_PKTSIZE UDC_BULK_PACKET_SIZE
-#if defined(CONFIG_USBD_HS)
-#define CONFIG_USBD_SERIAL_BULK_HS_PKTSIZE UDC_BULK_HS_PACKET_SIZE
-#endif
-
#define USBTTY_DEVICE_CLASS COMMUNICATIONS_DEVICE_CLASS
#define USBTTY_BCD_DEVICE 0x00
diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c
index 6624f61b763..c256cc31fbd 100644
--- a/drivers/usb/gadget/ep0.c
+++ b/drivers/usb/gadget/ep0.c
@@ -371,26 +371,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device,
}
break;
case USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER:
-#if defined(CONFIG_USBD_HS)
- {
- struct usb_qualifier_descriptor *qualifier_descriptor =
- device->qualifier_descriptor;
-
- if (!qualifier_descriptor)
- return -1;
-
- /* copy descriptor for this device */
- copy_config(urb, qualifier_descriptor,
- sizeof(struct usb_qualifier_descriptor),
- max);
-
- }
- dbg_ep0(3, "copied qualifier descriptor, actual_length: 0x%x",
- urb->actual_length);
-#else
return -1;
-#endif
- break;
default:
return -1;