dmaengine: Add Synopsys eDMA IP version 0 support
authorGustavo Pimentel <Gustavo.Pimentel@synopsys.com>
Tue, 4 Jun 2019 13:29:23 +0000 (15:29 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 10 Jun 2019 07:40:39 +0000 (13:10 +0530)
commit7e4b8a4fbe2cecab0959e862604803d063f50029
tree3ed4c08f9cfae2dc866f49bd32c1dda71c80a157
parente63d79d1ffcd2201a2dbff1d7a1184b8f3ec74cf
dmaengine: Add Synopsys eDMA IP version 0 support

Add support for the eDMA IP version 0 driver for both register maps (legacy
and unroll).

The legacy register mapping was the initial implementation, which consisted
in having all registers belonging to channels multiplexed, which could be
change anytime (which could led a race-condition) by view port register
(access to only one channel available each time).

This register mapping is not very effective and efficient in a multithread
environment, which has led to the development of unroll registers mapping,
which consists of having all channels registers accessible any time by
spreading all channels registers by an offset between them.

This version supports a maximum of 16 independent channels (8 write +
8 read), which can run simultaneously.

Implements a scatter-gather transfer through a linked list, where the size
of linked list depends on the allocated memory divided equally among all
channels.

Each linked list descriptor can transfer from 1 byte to 4 Gbytes and is
alignmented to DWORD.

Both SAR (Source Address Register) and DAR (Destination Address Register)
are alignmented to byte.

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Joao Pinto <jpinto@synopsys.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dw-edma/Makefile
drivers/dma/dw-edma/dw-edma-core.c
drivers/dma/dw-edma/dw-edma-v0-core.c [new file with mode: 0644]
drivers/dma/dw-edma/dw-edma-v0-core.h [new file with mode: 0644]
drivers/dma/dw-edma/dw-edma-v0-regs.h [new file with mode: 0644]