]> git.karo-electronics.de Git - linux-beck.git/commit
dmaengine: omap-dma: Fix dynamic lch_map allocation
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 2 Jan 2017 10:07:37 +0000 (12:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 19:18:03 +0000 (20:18 +0100)
commit6c6ae8c43df99284b3260082b43b5858b701bd5e
tree1ed30b38bdc5583aecafdb7ad611c56501cac286
parent3fbaff3adc763d999fa803bc1aeb5e49c48ce5c0
dmaengine: omap-dma: Fix dynamic lch_map allocation

commit 836c3ce2566fb8c1754f8d7c9534cad9bc8a6879 upstream.

The original patch did not done what it was supposed to be doing and even
worst it broke legacy boot (OMAP1).

The lch_map size should be the number of available logical channels in sDMA
and the od->dma_requests should store the number of available DMA request
lines usable in sDMA.

In legacy mode we do not have a way to get the DMA request count, in that
case we use OMAP_SDMA_REQUESTS (127), despite the fact that OMAP1510 have
only 31 DMA request line.

Fixes: 2d1a9a946fae ("dmaengine: omap-dma: Dynamically allocate memory for lch_map")
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/omap-dma.c