kernel-fxtec-pro1x/drivers/staging/dwc2
Matthijs Kooijman 642f2ecc09 staging: dwc2: Fix dma-enabled platform devices using a default dma_mask
Platform devices added through OF usually do not have any dma_mask
pointer set. If the hardware advertises DMA support, the driver will
expect DMA buffers to be passed in, but the USB core will not do this
due to lack of a dma mask, breaking all connectiviy.

To fix this, set a default dma_mask by pointing it at the
coherent_dma_mask and set their value to a 32 bit mask. This still
allows any platform code to set any more specific mask if needed, but
makes the driver work for most dma-enabled hardware.

It would be great if this patch could be included in 3.10, since it is
needed to make the dwc2 driver work on the ralink rt3052 target.

Before, the plan was to set up the dma mask in MIPS platform code, but
because of a similar change in ehci and the uglyness of the code for
that, the plan for that infrastructure was dropped. This patch makes the
setting of the dma_mask happen in the same way as the patch Stephen
Warren (set device dma_mask without reference to global data).

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-05-17 15:10:33 -07:00
..
core.c staging: dwc2: register common irq handler in dwc2_core_init 2013-04-11 12:58:39 -07:00
core.h staging: dwc2: Make dwc2_set_uninitialized more specific 2013-04-11 13:27:39 -07:00
core_intr.c staging: dwc2: add missing newlines to debug messages 2013-04-23 10:37:55 -07:00
hcd.c staging: dwc2: add platform device bindings 2013-04-23 10:37:55 -07:00
hcd.h staging: dwc2: Make dwc2_set_uninitialized more specific 2013-04-11 13:27:39 -07:00
hcd_ddma.c staging: dwc2: add missing newlines to debug messages 2013-04-23 10:37:55 -07:00
hcd_intr.c staging: dwc2: check for null pointer before dereferencing it 2013-04-23 10:37:55 -07:00
hcd_queue.c staging: dwc2: toggle periodic debugging output separately 2013-04-10 19:10:27 -07:00
hw.h
Kconfig staging: dwc2: add platform device bindings 2013-04-23 10:37:55 -07:00
Makefile staging: dwc2: add platform device bindings 2013-04-23 10:37:55 -07:00
pci.c staging: dwc2: set the driver name to "dwc2" 2013-04-11 13:27:39 -07:00
platform.c staging: dwc2: Fix dma-enabled platform devices using a default dma_mask 2013-05-17 15:10:33 -07:00