diff options
author | Peter Chen <peter.chen@nxp.com> | 2020-09-01 05:33:52 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-10-02 09:57:40 +0300 |
commit | b21cf9371c2e659dbd0b7099b936b67f424fb555 (patch) | |
tree | 9814d11b1f539e38d0e7a1527a9d69e3764785a3 /drivers/usb/cdns3/gadget.c | |
parent | 9f650135945fb5dba6bd6340ce834570fe0686f2 (diff) | |
download | linux-b21cf9371c2e659dbd0b7099b936b67f424fb555.tar.xz |
usb: cdns3: gadget: move wait configuration operation
After commit f4cfe5ce607d ("usb: cdns3: gadget: improve the
set_configuration handling"), the software will inform the
hardware the request has finished at cdns3_ep0_complete_setup.
The configuration set bit is only set after request has finished,
so it needs to move waiting operation after that. Meanwhile,
if it is timeout, it will show warning message and return error.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/gadget.c')
-rw-r--r-- | drivers/usb/cdns3/gadget.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 4c939dad9c33..aca347b7da57 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -1310,7 +1310,6 @@ void cdns3_set_hw_configuration(struct cdns3_device *priv_dev) { struct cdns3_endpoint *priv_ep; struct usb_ep *ep; - int val; if (priv_dev->hw_configured_flag) return; @@ -1320,10 +1319,6 @@ void cdns3_set_hw_configuration(struct cdns3_device *priv_dev) cdns3_set_register_bit(&priv_dev->regs->usb_conf, USB_CONF_U1EN | USB_CONF_U2EN); - /* wait until configuration set */ - readl_poll_timeout_atomic(&priv_dev->regs->usb_sts, val, - val & USB_STS_CFGSTS_MASK, 1, 100); - priv_dev->hw_configured_flag = 1; list_for_each_entry(ep, &priv_dev->gadget.ep_list, ep_list) { |