dmaengine: rcar-dmac: Add support for R-Car V3U
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 28 Jan 2021 08:44:55 +0000 (09:44 +0100)
committerVinod Koul <vkoul@kernel.org>
Mon, 1 Feb 2021 05:48:59 +0000 (11:18 +0530)
commite5bfbbb916a43a80801458e10369cf02229278eb
tree40bdd91e7eb63ca3ff1b2b20b4c5c5b7a8f95aeb
parent245bbd16b72cffe86d9216b26ac182bf850bec2b
dmaengine: rcar-dmac: Add support for R-Car V3U

The DMACs (both SYS-DMAC and RT-DMAC) on R-Car V3U differ slightly from
the DMACs on R-Car Gen2 and other R-Car Gen3 SoCs:
  1. The per-channel registers are located in a second register block.
     Add support for mapping the second block, using the appropriate
     offsets and stride.
  2. The common Channel Clear Register (DMACHCLR) was replaced by a
     per-channel register.
     Update rcar_dmac_chan_clear{,_all}() to handle this.
     As rcar_dmac_init() needs to clear the status before the individual
     channels are probed, channel index and base address initialization
     are moved forward.

Inspired by a patch in the BSP by Phong Hoang
<phong.hoang.wz@renesas.com>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20210128084455.2237256-5-geert+renesas@glider.be
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rcar-dmac.c