Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: rcar-dmac: Add support for R-Car S4-8

Add support for R-Car S4-8. We can reuse R-Car V3U code so that
renames variable names as "gen4".

Note that some registers of R-Car V3U do not exist on R-Car S4-8,
but none of them are used by the driver for now.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20211222114507.1252947-3-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Yoshihiro Shimoda and committed by
Vinod Koul
2fe6777b 401c1511

+10 -7
+10 -7
drivers/dma/sh/rcar-dmac.c
··· 236 236 #define RCAR_DMAOR_PRI_ROUND_ROBIN (3 << 8) 237 237 #define RCAR_DMAOR_AE (1 << 2) 238 238 #define RCAR_DMAOR_DME (1 << 0) 239 - #define RCAR_DMACHCLR 0x0080 /* Not on R-Car V3U */ 239 + #define RCAR_DMACHCLR 0x0080 /* Not on R-Car Gen4 */ 240 240 #define RCAR_DMADPSEC 0x00a0 241 241 242 242 #define RCAR_DMASAR 0x0000 ··· 299 299 #define RCAR_DMAFIXDAR 0x0014 300 300 #define RCAR_DMAFIXDPBASE 0x0060 301 301 302 - /* For R-Car V3U */ 303 - #define RCAR_V3U_DMACHCLR 0x0100 302 + /* For R-Car Gen4 */ 303 + #define RCAR_GEN4_DMACHCLR 0x0100 304 304 305 305 /* Hardcode the MEMCPY transfer size to 4 bytes. */ 306 306 #define RCAR_DMAC_MEMCPY_XFER_SIZE 4 ··· 345 345 struct rcar_dmac_chan *chan) 346 346 { 347 347 if (dmac->chan_base) 348 - rcar_dmac_chan_write(chan, RCAR_V3U_DMACHCLR, 1); 348 + rcar_dmac_chan_write(chan, RCAR_GEN4_DMACHCLR, 1); 349 349 else 350 350 rcar_dmac_write(dmac, RCAR_DMACHCLR, BIT(chan->index)); 351 351 } ··· 357 357 358 358 if (dmac->chan_base) { 359 359 for_each_rcar_dmac_chan(i, dmac, chan) 360 - rcar_dmac_chan_write(chan, RCAR_V3U_DMACHCLR, 1); 360 + rcar_dmac_chan_write(chan, RCAR_GEN4_DMACHCLR, 1); 361 361 } else { 362 362 rcar_dmac_write(dmac, RCAR_DMACHCLR, dmac->channels_mask); 363 363 } ··· 2009 2009 .chan_offset_stride = 0x80, 2010 2010 }; 2011 2011 2012 - static const struct rcar_dmac_of_data rcar_v3u_dmac_data = { 2012 + static const struct rcar_dmac_of_data rcar_gen4_dmac_data = { 2013 2013 .chan_offset_base = 0x0, 2014 2014 .chan_offset_stride = 0x1000, 2015 2015 }; ··· 2019 2019 .compatible = "renesas,rcar-dmac", 2020 2020 .data = &rcar_dmac_data, 2021 2021 }, { 2022 + .compatible = "renesas,rcar-gen4-dmac", 2023 + .data = &rcar_gen4_dmac_data, 2024 + }, { 2022 2025 .compatible = "renesas,dmac-r8a779a0", 2023 - .data = &rcar_v3u_dmac_data, 2026 + .data = &rcar_gen4_dmac_data, 2024 2027 }, 2025 2028 { /* Sentinel */ } 2026 2029 };