Commit Graph

6 Commits (master)

Author SHA1 Message Date
Matthijs Kooijman 050232a73c staging: dwc2: set the driver name to "dwc2"
Previously, it was "dwc_otg", but this does not correspond to the
directory name and might cause confusion with the old out-of-tree
dwc_otg driver of which many versions circulate.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11 13:27:39 -07:00
Matthijs Kooijman 6706c721b2 staging: dwc2: register common irq handler in dwc2_core_init
Before, this was initialized in pci.c, after the dwc2_hcd_init was
called and the interrupts were enabled. This opened up a small time
window where common interrupts could be triggered, but there was no
handler for them, causing them to keep triggering infinitely and locking
up the machine.

On my RT3052 board this bug could be easily reproduced by hardcoding
the console log level to 8, so that a bunch of debug output from the dwc2
driver was generated inside this time window. This caused the interrupt
lockup to occur almost every time.

By requesting the irq inside dwc2_core_init and by disabling interrupts
before calling dwc2_core_init instead of after, we can be sure the
handler is registered before the interrupts are enabled, which should
close this window.

Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11 12:58:39 -07:00
Matthijs Kooijman 7c360aa7cd staging: dwc2: don't pass IRQ_LEVEL to devm_request_irq
It seems this flag is intended to pass to irq_set_status_flags, not
request_irq, and is not available on all architectures. Its value
corresponds to IRQF_PROBE_SHARED, which shouldn't be needed for this
driver, so removing this flag should be safe.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11 12:58:39 -07:00
Paul Zimmerman ba0e60d18c staging: dwc2: fix wrong setting of DMA masks
We were setting the DMA masks in dwc2_driver_probe(), but that is
before the driver parameters have been set to their default values.
That meant the DMA masks could be set wrong. Fix it by moving the
DMA mask setting into dwc2_hcd_init(), after the driver parameters
have been set.

Reported-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 17:10:35 -07:00
Paul Zimmerman e62662c7f3 staging: dwc2: remove unneeded arguments from two functions
Remove the unneeded struct device *dev argument from dwc2_hcd_init()
and dwc2_hcd_remove(), and pass in the value through the hsotg->dev
member instead

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 17:10:35 -07:00
Paul Zimmerman 99882e3f88 staging: PCI bus interface for the DWC2 driver
This file contains the PCI bus interface "glue" for the DWC2 driver

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 18:16:37 -07:00