diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2012-11-16 01:37:54 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-16 07:47:52 -0500 |
commit | 4fd24483d1de7a3c183fa862fa9ff13b49361966 (patch) | |
tree | a5607ff11ad2d38b8fcf76332d44df429778188e | |
parent | ac96511bb5cf92bad97ffc2249f75e45eb70301d (diff) |
usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
commit 392142 moved event buffer allocation out of dwc3_core_init() but
event buffer allocation uses the cached copy of hwparams to determine
the number of event buffers and the caching is done in dwc3_core_init.
So moved dwc3_cache_hwparams function before dwc3_alloc_event_buffers so
that dwc3_alloc_event_buffers sees the correct number of event buffers.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/dwc3/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e71a62a652d0..516d4007dfce 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -315,8 +315,6 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc) | |||
315 | 315 | ||
316 | dwc3_core_soft_reset(dwc); | 316 | dwc3_core_soft_reset(dwc); |
317 | 317 | ||
318 | dwc3_cache_hwparams(dwc); | ||
319 | |||
320 | reg = dwc3_readl(dwc->regs, DWC3_GCTL); | 318 | reg = dwc3_readl(dwc->regs, DWC3_GCTL); |
321 | reg &= ~DWC3_GCTL_SCALEDOWN_MASK; | 319 | reg &= ~DWC3_GCTL_SCALEDOWN_MASK; |
322 | reg &= ~DWC3_GCTL_DISSCRAMBLE; | 320 | reg &= ~DWC3_GCTL_DISSCRAMBLE; |
@@ -460,6 +458,8 @@ static int __devinit dwc3_probe(struct platform_device *pdev) | |||
460 | pm_runtime_get_sync(dev); | 458 | pm_runtime_get_sync(dev); |
461 | pm_runtime_forbid(dev); | 459 | pm_runtime_forbid(dev); |
462 | 460 | ||
461 | dwc3_cache_hwparams(dwc); | ||
462 | |||
463 | ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE); | 463 | ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE); |
464 | if (ret) { | 464 | if (ret) { |
465 | dev_err(dwc->dev, "failed to allocate event buffers\n"); | 465 | dev_err(dwc->dev, "failed to allocate event buffers\n"); |