dmaengine: dw: lazy allocation of dma descriptors
authorChristian Lamparter <chunkeey@googlemail.com>
Thu, 14 Apr 2016 16:11:01 +0000 (18:11 +0200)
committerVinod Koul <vinod.koul@intel.com>
Tue, 19 Apr 2016 15:44:45 +0000 (21:14 +0530)
commitab703f818ac36b9e74f61b8890f14e5446b7c012
tree7cb8fed4ecd9b3eb9044f8a3a9224685004cb8e3
parent925a7d045e6f0129bc58ccd4c3a8dcef62486345
dmaengine: dw: lazy allocation of dma descriptors

This patch changes the driver to allocate DMA descriptors when
needed. This stops memory resources to be wasted and letting
them sit idle in the free_list structure when the device doesn't
need it... This also solves the problem, that a driver has to
guess the number of how many descriptors it needs to allocate
in advance. Currently, the dma engine will just fail when put
under load by sata_dwc_460ex.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dw/core.c
drivers/dma/dw/regs.h