dmaengine: dma-jz4780: Use 4-word descriptors
authorPaul Cercueil <paul@crapouillou.net>
Wed, 29 Aug 2018 21:32:47 +0000 (23:32 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 11 Sep 2018 07:29:26 +0000 (12:59 +0530)
commit5eed7d84bcc0fac063e7c4cbd3ffc9990268049d
tree46fcb44d60ee5dcb62d4bbb3a510d64e1ba89727
parent33633583a23aff572ff6b46a6bc57808b9c9872e
dmaengine: dma-jz4780: Use 4-word descriptors

The only information we use in the 8-word version of the hardware DMA
descriptor that is not present in the 4-word version is the transfer
type, aka. the ID of the source or recipient device.

Since the transfer type will never change for a DMA channel in use,
we can just set it once for all in the corresponding DMA register
before starting any transfer.

This has several benefits:

* the driver will handle twice as many hardware DMA descriptors;

* the driver is closer to support the JZ4740, which only supports 4-word
  hardware DMA descriptors;

* the JZ4770 SoC needs the transfer type to be set in the corresponding
  DMA register anyway, even if 8-word descriptors are in use.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Mathieu Malaterre <malat@debian.org>
Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dma-jz4780.c