1
0
Fork 0
Commit Graph

4 Commits (redonkable)

Author SHA1 Message Date
Jun Nie 067fdeb2f3 dmaengine: zx: fix build warning
Fix build warning that related to PAGE_SIZE. The maximum DMA
length has nothing to do with PAGE_SIZE, just use a fix number
for the definition.

drivers/dma/zx_dma.c: In function 'zx_dma_prep_memcpy':
drivers/dma/zx_dma.c:523:8: warning: division by zero [-Wdiv-by-zero]
drivers/dma/zx_dma.c: In function 'zx_dma_prep_slave_sg':
drivers/dma/zx_dma.c:567:11: warning: division by zero [-Wdiv-by-zero]

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2017-01-25 15:33:45 +05:30
Shawn Guo 156ae09245 dmaengine: zx: fix residue calculation
The dma residue is defined as the free space to end of transfer buffer,
which could be multiple segments chained together.  So the residue
calculation in zx_dma_tx_status() works for both slave_sg and cyclic
case.  But unfortunately, the 'index' is wrong.  It should plus one,
because the current segment is already occupied and shouldn't be counted
into free space.

This fixes the HDMI audio noise issue we see on ZX296718 with SPDIF
interface.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2017-01-02 10:53:48 +05:30
Shawn Guo fc318d64f3 dmaengine: zx: set DMA_CYCLIC cap_mask bit
The zx_dma driver supports cyclic transfer mode.  Let's set DMA_CYCLIC
cap_mask bit to make that clear, and avoid unnecessary failure when
clients request channel via dma_request_chan_by_mask() with DMA_CYCLIC
bit set in mask.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2017-01-02 10:53:48 +05:30
Shawn Guo 253f9f4412 dmaengine: zx: rename zx296702_dma.c to zx_dma.c
ZTE ZX dma driver is not ZX296702 specific.  It works for not only
ZX296702 but also other ZTE ZX family platforms like ZX296718.  Let's
rename the file to reflect that.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2017-01-02 10:53:48 +05:30