usb: dwc3: gadget: Remove invalid low-speed setting

None of the DWC_usb3x IPs (and all their versions) supports low-speed
setting in device mode. In the early days, our "Early Adopter Edition"
DWC_usb3 databook shows that the controller may be configured to operate
in low-speed, but it was revised on release. Let's remove this invalid
speed setting to avoid any confusion.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/258b1c7fbb966454f4c4c2c1367508998498fc30.1615509438.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Thinh Nguyen 2021-03-11 16:58:50 -08:00 committed by Greg Kroah-Hartman
parent 575b1ac410
commit 0c59f678fc
3 changed files with 0 additions and 11 deletions

View File

@ -1394,7 +1394,6 @@ static void dwc3_check_params(struct dwc3 *dwc)
/* Check the maximum_speed parameter */ /* Check the maximum_speed parameter */
switch (dwc->maximum_speed) { switch (dwc->maximum_speed) {
case USB_SPEED_LOW:
case USB_SPEED_FULL: case USB_SPEED_FULL:
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
break; break;

View File

@ -398,7 +398,6 @@
#define DWC3_DCFG_SUPERSPEED (4 << 0) #define DWC3_DCFG_SUPERSPEED (4 << 0)
#define DWC3_DCFG_HIGHSPEED (0 << 0) #define DWC3_DCFG_HIGHSPEED (0 << 0)
#define DWC3_DCFG_FULLSPEED BIT(0) #define DWC3_DCFG_FULLSPEED BIT(0)
#define DWC3_DCFG_LOWSPEED (2 << 0)
#define DWC3_DCFG_NUMP_SHIFT 17 #define DWC3_DCFG_NUMP_SHIFT 17
#define DWC3_DCFG_NUMP(n) (((n) >> DWC3_DCFG_NUMP_SHIFT) & 0x1f) #define DWC3_DCFG_NUMP(n) (((n) >> DWC3_DCFG_NUMP_SHIFT) & 0x1f)
@ -492,7 +491,6 @@
#define DWC3_DSTS_SUPERSPEED (4 << 0) #define DWC3_DSTS_SUPERSPEED (4 << 0)
#define DWC3_DSTS_HIGHSPEED (0 << 0) #define DWC3_DSTS_HIGHSPEED (0 << 0)
#define DWC3_DSTS_FULLSPEED BIT(0) #define DWC3_DSTS_FULLSPEED BIT(0)
#define DWC3_DSTS_LOWSPEED (2 << 0)
/* Device Generic Command Register */ /* Device Generic Command Register */
#define DWC3_DGCMD_SET_LMP 0x01 #define DWC3_DGCMD_SET_LMP 0x01

View File

@ -2113,9 +2113,6 @@ static void __dwc3_gadget_set_speed(struct dwc3 *dwc)
reg |= DWC3_DCFG_SUPERSPEED; reg |= DWC3_DCFG_SUPERSPEED;
} else { } else {
switch (speed) { switch (speed) {
case USB_SPEED_LOW:
reg |= DWC3_DCFG_LOWSPEED;
break;
case USB_SPEED_FULL: case USB_SPEED_FULL:
reg |= DWC3_DCFG_FULLSPEED; reg |= DWC3_DCFG_FULLSPEED;
break; break;
@ -3455,11 +3452,6 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
dwc->gadget->ep0->maxpacket = 64; dwc->gadget->ep0->maxpacket = 64;
dwc->gadget->speed = USB_SPEED_FULL; dwc->gadget->speed = USB_SPEED_FULL;
break; break;
case DWC3_DSTS_LOWSPEED:
dwc3_gadget_ep0_desc.wMaxPacketSize = cpu_to_le16(8);
dwc->gadget->ep0->maxpacket = 8;
dwc->gadget->speed = USB_SPEED_LOW;
break;
} }
dwc->eps[1]->endpoint.maxpacket = dwc->gadget->ep0->maxpacket; dwc->eps[1]->endpoint.maxpacket = dwc->gadget->ep0->maxpacket;