Loading drivers/usb/dwc3/core.c +6 −15 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ #include <linux/usb/otg.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> #include <linux/usb/of.h> #include "core.h" #include "gadget.h" Loading @@ -60,10 +61,6 @@ #include "debug.h" static char *maximum_speed = "super"; module_param(maximum_speed, charp, 0); MODULE_PARM_DESC(maximum_speed, "Maximum supported speed."); /* -------------------------------------------------------------------------- */ void dwc3_set_mode(struct dwc3 *dwc, u32 mode) Loading Loading @@ -545,6 +542,7 @@ static int dwc3_probe(struct platform_device *pdev) dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize"); host_only_mode = of_property_read_bool(node, "host-only-mode"); dwc->maximum_speed = of_usb_get_maximum_speed(node); /* host only mode doesnt use PHY xcvr; define nop ones */ if (host_only_mode) { Loading @@ -569,6 +567,10 @@ static int dwc3_probe(struct platform_device *pdev) } } /* default to superspeed if no maximum_speed passed */ if (dwc->maximum_speed == USB_SPEED_UNKNOWN) dwc->maximum_speed = USB_SPEED_SUPER; if (IS_ERR(dwc->usb2_phy)) { ret = PTR_ERR(dwc->usb2_phy); Loading Loading @@ -613,17 +615,6 @@ static int dwc3_probe(struct platform_device *pdev) dev->dma_parms = dev->parent->dma_parms; dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask); if (!strncmp("super", maximum_speed, 5)) dwc->maximum_speed = DWC3_DCFG_SUPERSPEED; else if (!strncmp("high", maximum_speed, 4)) dwc->maximum_speed = DWC3_DCFG_HIGHSPEED; else if (!strncmp("full", maximum_speed, 4)) dwc->maximum_speed = DWC3_DCFG_FULLSPEED1; else if (!strncmp("low", maximum_speed, 3)) dwc->maximum_speed = DWC3_DCFG_LOWSPEED; else dwc->maximum_speed = DWC3_DCFG_SUPERSPEED; pm_runtime_no_callbacks(dev); pm_runtime_set_active(dev); pm_runtime_enable(dev); Loading drivers/usb/dwc3/gadget.c +18 −3 Original line number Diff line number Diff line Loading @@ -1868,10 +1868,25 @@ static int dwc3_gadget_start(struct usb_gadget *g, * STAR#9000525659: Clock Domain Crossing on DCTL in * USB 2.0 Mode */ if (dwc->revision < DWC3_REVISION_220A) if (dwc->revision < DWC3_REVISION_220A) { reg |= DWC3_DCFG_SUPERSPEED; else reg |= dwc->maximum_speed; } else { switch (dwc->maximum_speed) { case USB_SPEED_LOW: reg |= DWC3_DSTS_LOWSPEED; break; case USB_SPEED_FULL: reg |= DWC3_DSTS_FULLSPEED1; break; case USB_SPEED_HIGH: reg |= DWC3_DSTS_HIGHSPEED; break; case USB_SPEED_SUPER: /* FALLTHROUGH */ case USB_SPEED_UNKNOWN: /* FALTHROUGH */ default: reg |= DWC3_DSTS_SUPERSPEED; } } dwc3_writel(dwc->regs, DWC3_DCFG, reg); dwc->start_config_issued = false; Loading Loading
drivers/usb/dwc3/core.c +6 −15 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ #include <linux/usb/otg.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> #include <linux/usb/of.h> #include "core.h" #include "gadget.h" Loading @@ -60,10 +61,6 @@ #include "debug.h" static char *maximum_speed = "super"; module_param(maximum_speed, charp, 0); MODULE_PARM_DESC(maximum_speed, "Maximum supported speed."); /* -------------------------------------------------------------------------- */ void dwc3_set_mode(struct dwc3 *dwc, u32 mode) Loading Loading @@ -545,6 +542,7 @@ static int dwc3_probe(struct platform_device *pdev) dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize"); host_only_mode = of_property_read_bool(node, "host-only-mode"); dwc->maximum_speed = of_usb_get_maximum_speed(node); /* host only mode doesnt use PHY xcvr; define nop ones */ if (host_only_mode) { Loading @@ -569,6 +567,10 @@ static int dwc3_probe(struct platform_device *pdev) } } /* default to superspeed if no maximum_speed passed */ if (dwc->maximum_speed == USB_SPEED_UNKNOWN) dwc->maximum_speed = USB_SPEED_SUPER; if (IS_ERR(dwc->usb2_phy)) { ret = PTR_ERR(dwc->usb2_phy); Loading Loading @@ -613,17 +615,6 @@ static int dwc3_probe(struct platform_device *pdev) dev->dma_parms = dev->parent->dma_parms; dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask); if (!strncmp("super", maximum_speed, 5)) dwc->maximum_speed = DWC3_DCFG_SUPERSPEED; else if (!strncmp("high", maximum_speed, 4)) dwc->maximum_speed = DWC3_DCFG_HIGHSPEED; else if (!strncmp("full", maximum_speed, 4)) dwc->maximum_speed = DWC3_DCFG_FULLSPEED1; else if (!strncmp("low", maximum_speed, 3)) dwc->maximum_speed = DWC3_DCFG_LOWSPEED; else dwc->maximum_speed = DWC3_DCFG_SUPERSPEED; pm_runtime_no_callbacks(dev); pm_runtime_set_active(dev); pm_runtime_enable(dev); Loading
drivers/usb/dwc3/gadget.c +18 −3 Original line number Diff line number Diff line Loading @@ -1868,10 +1868,25 @@ static int dwc3_gadget_start(struct usb_gadget *g, * STAR#9000525659: Clock Domain Crossing on DCTL in * USB 2.0 Mode */ if (dwc->revision < DWC3_REVISION_220A) if (dwc->revision < DWC3_REVISION_220A) { reg |= DWC3_DCFG_SUPERSPEED; else reg |= dwc->maximum_speed; } else { switch (dwc->maximum_speed) { case USB_SPEED_LOW: reg |= DWC3_DSTS_LOWSPEED; break; case USB_SPEED_FULL: reg |= DWC3_DSTS_FULLSPEED1; break; case USB_SPEED_HIGH: reg |= DWC3_DSTS_HIGHSPEED; break; case USB_SPEED_SUPER: /* FALLTHROUGH */ case USB_SPEED_UNKNOWN: /* FALTHROUGH */ default: reg |= DWC3_DSTS_SUPERSPEED; } } dwc3_writel(dwc->regs, DWC3_DCFG, reg); dwc->start_config_issued = false; Loading