diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 13:23:47 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 13:23:47 -0400 |
| commit | 9fc377799bc9bfd8d5cb35d0d1ea2e2458cbdbb3 (patch) | |
| tree | fe93603b4e33dd50ff5f95ff769a0748b230cdf9 /drivers/usb/dwc3/core.c | |
| parent | 5e23ae49960d05f578a73ecd19749c45af682c2b (diff) | |
| parent | e387ef5c47ddeaeaa3cbdc54424cdb7a28dae2c0 (diff) | |
Merge tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg Kroah-Hartman:
"Here's the big USB patch set for the 3.6-rc1 merge window.
Lots of little changes in here, primarily for gadget controllers and
drivers. There's some scsi changes that I think also went in through
the scsi tree, but they merge just fine. All of these patches have
been in the linux-next tree for a while now.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fix up trivial conflicts in include/scsi/scsi_device.h (same libata
conflict that Jeff had already encountered)
* tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits)
usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams
usb: Add quirk detection based on interface information
usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h
USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer
USB: add USB_VENDOR_AND_INTERFACE_INFO() macro
USB: notify phy when root hub port connect change
USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds
USB: option: add ZTE MF821D
USB: sierra: QMI mode MC7710 moved to qcserial
USB: qcserial: adding Sierra Wireless devices
USB: qcserial: support generic Qualcomm serial ports
USB: qcserial: make probe more flexible
USB: qcserial: centralize probe exit path
USB: qcserial: consolidate usb_set_interface calls
USB: ehci-s5p: Add support for device tree
USB: ohci-exynos: Add support for device tree
USB: ehci-omap: fix compile failure(v1)
usb: host: tegra: pass correct pointer in ehci_setup()
USB: ehci-fsl: Update ifdef check to work on 64-bit ppc
USB: serial: keyspan: Removed unrequired parentheses.
...
Diffstat (limited to 'drivers/usb/dwc3/core.c')
| -rw-r--r-- | drivers/usb/dwc3/core.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 1040bdb8dc88..c34452a7304f 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
| @@ -148,6 +148,8 @@ static void dwc3_core_soft_reset(struct dwc3 *dwc) | |||
| 148 | reg &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST; | 148 | reg &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST; |
| 149 | dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); | 149 | dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); |
| 150 | 150 | ||
| 151 | mdelay(100); | ||
| 152 | |||
| 151 | /* After PHYs are stable we can take Core out of reset state */ | 153 | /* After PHYs are stable we can take Core out of reset state */ |
| 152 | reg = dwc3_readl(dwc->regs, DWC3_GCTL); | 154 | reg = dwc3_readl(dwc->regs, DWC3_GCTL); |
| 153 | reg &= ~DWC3_GCTL_CORESOFTRESET; | 155 | reg &= ~DWC3_GCTL_CORESOFTRESET; |
| @@ -255,7 +257,7 @@ static int __devinit dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length) | |||
| 255 | * | 257 | * |
| 256 | * Returns 0 on success otherwise negative errno. | 258 | * Returns 0 on success otherwise negative errno. |
| 257 | */ | 259 | */ |
| 258 | static int __devinit dwc3_event_buffers_setup(struct dwc3 *dwc) | 260 | static int dwc3_event_buffers_setup(struct dwc3 *dwc) |
| 259 | { | 261 | { |
| 260 | struct dwc3_event_buffer *evt; | 262 | struct dwc3_event_buffer *evt; |
| 261 | int n; | 263 | int n; |
| @@ -266,6 +268,8 @@ static int __devinit dwc3_event_buffers_setup(struct dwc3 *dwc) | |||
| 266 | evt->buf, (unsigned long long) evt->dma, | 268 | evt->buf, (unsigned long long) evt->dma, |
| 267 | evt->length); | 269 | evt->length); |
| 268 | 270 | ||
| 271 | evt->lpos = 0; | ||
| 272 | |||
| 269 | dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(n), | 273 | dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(n), |
| 270 | lower_32_bits(evt->dma)); | 274 | lower_32_bits(evt->dma)); |
| 271 | dwc3_writel(dwc->regs, DWC3_GEVNTADRHI(n), | 275 | dwc3_writel(dwc->regs, DWC3_GEVNTADRHI(n), |
| @@ -285,6 +289,9 @@ static void dwc3_event_buffers_cleanup(struct dwc3 *dwc) | |||
| 285 | 289 | ||
| 286 | for (n = 0; n < dwc->num_event_buffers; n++) { | 290 | for (n = 0; n < dwc->num_event_buffers; n++) { |
| 287 | evt = dwc->ev_buffs[n]; | 291 | evt = dwc->ev_buffs[n]; |
| 292 | |||
| 293 | evt->lpos = 0; | ||
| 294 | |||
| 288 | dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(n), 0); | 295 | dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(n), 0); |
| 289 | dwc3_writel(dwc->regs, DWC3_GEVNTADRHI(n), 0); | 296 | dwc3_writel(dwc->regs, DWC3_GEVNTADRHI(n), 0); |
| 290 | dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(n), 0); | 297 | dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(n), 0); |
| @@ -328,8 +335,6 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc) | |||
| 328 | } | 335 | } |
| 329 | dwc->revision = reg; | 336 | dwc->revision = reg; |
| 330 | 337 | ||
| 331 | dwc3_core_soft_reset(dwc); | ||
| 332 | |||
| 333 | /* issue device SoftReset too */ | 338 | /* issue device SoftReset too */ |
| 334 | timeout = jiffies + msecs_to_jiffies(500); | 339 | timeout = jiffies + msecs_to_jiffies(500); |
| 335 | dwc3_writel(dwc->regs, DWC3_DCTL, DWC3_DCTL_CSFTRST); | 340 | dwc3_writel(dwc->regs, DWC3_DCTL, DWC3_DCTL_CSFTRST); |
| @@ -347,6 +352,8 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc) | |||
| 347 | cpu_relax(); | 352 | cpu_relax(); |
| 348 | } while (true); | 353 | } while (true); |
| 349 | 354 | ||
| 355 | dwc3_core_soft_reset(dwc); | ||
| 356 | |||
| 350 | dwc3_cache_hwparams(dwc); | 357 | dwc3_cache_hwparams(dwc); |
| 351 | 358 | ||
| 352 | reg = dwc3_readl(dwc->regs, DWC3_GCTL); | 359 | reg = dwc3_readl(dwc->regs, DWC3_GCTL); |
