usb: musb: tusb6010_omap: Allocate DMA channels upfront
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 16 Jun 2017 15:41:00 +0000 (10:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jun 2017 03:45:01 +0000 (11:45 +0800)
commit4cadc711cdc7a845cc5263c594ac3882027beadf
treea8b0f5c635ed83475b8b3c984f7275d9532d5ff7
parent1df9d9ec34e809ec227c2f13ec9d8cc479f22f5e
usb: musb: tusb6010_omap: Allocate DMA channels upfront

Instead of requesting the DMA channel in tusb_omap_dma_allocate() do it
when the controller is created and in runtime work from the DMA channel
pool.

This change is needed for the DMAengine conversion of the driver since the
tusb_omap_dma_allocate() is called in interrupt context which might lead
to lock within the DMAengine API when requesting channel.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/tusb6010_omap.c