mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
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>
This commit is contained in:
parent
401c151164
commit
2fe6777b8d
@ -236,7 +236,7 @@ struct rcar_dmac_of_data {
|
||||
#define RCAR_DMAOR_PRI_ROUND_ROBIN (3 << 8)
|
||||
#define RCAR_DMAOR_AE (1 << 2)
|
||||
#define RCAR_DMAOR_DME (1 << 0)
|
||||
#define RCAR_DMACHCLR 0x0080 /* Not on R-Car V3U */
|
||||
#define RCAR_DMACHCLR 0x0080 /* Not on R-Car Gen4 */
|
||||
#define RCAR_DMADPSEC 0x00a0
|
||||
|
||||
#define RCAR_DMASAR 0x0000
|
||||
@ -299,8 +299,8 @@ struct rcar_dmac_of_data {
|
||||
#define RCAR_DMAFIXDAR 0x0014
|
||||
#define RCAR_DMAFIXDPBASE 0x0060
|
||||
|
||||
/* For R-Car V3U */
|
||||
#define RCAR_V3U_DMACHCLR 0x0100
|
||||
/* For R-Car Gen4 */
|
||||
#define RCAR_GEN4_DMACHCLR 0x0100
|
||||
|
||||
/* Hardcode the MEMCPY transfer size to 4 bytes. */
|
||||
#define RCAR_DMAC_MEMCPY_XFER_SIZE 4
|
||||
@ -345,7 +345,7 @@ static void rcar_dmac_chan_clear(struct rcar_dmac *dmac,
|
||||
struct rcar_dmac_chan *chan)
|
||||
{
|
||||
if (dmac->chan_base)
|
||||
rcar_dmac_chan_write(chan, RCAR_V3U_DMACHCLR, 1);
|
||||
rcar_dmac_chan_write(chan, RCAR_GEN4_DMACHCLR, 1);
|
||||
else
|
||||
rcar_dmac_write(dmac, RCAR_DMACHCLR, BIT(chan->index));
|
||||
}
|
||||
@ -357,7 +357,7 @@ static void rcar_dmac_chan_clear_all(struct rcar_dmac *dmac)
|
||||
|
||||
if (dmac->chan_base) {
|
||||
for_each_rcar_dmac_chan(i, dmac, chan)
|
||||
rcar_dmac_chan_write(chan, RCAR_V3U_DMACHCLR, 1);
|
||||
rcar_dmac_chan_write(chan, RCAR_GEN4_DMACHCLR, 1);
|
||||
} else {
|
||||
rcar_dmac_write(dmac, RCAR_DMACHCLR, dmac->channels_mask);
|
||||
}
|
||||
@ -2009,7 +2009,7 @@ static const struct rcar_dmac_of_data rcar_dmac_data = {
|
||||
.chan_offset_stride = 0x80,
|
||||
};
|
||||
|
||||
static const struct rcar_dmac_of_data rcar_v3u_dmac_data = {
|
||||
static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
|
||||
.chan_offset_base = 0x0,
|
||||
.chan_offset_stride = 0x1000,
|
||||
};
|
||||
@ -2018,9 +2018,12 @@ static const struct of_device_id rcar_dmac_of_ids[] = {
|
||||
{
|
||||
.compatible = "renesas,rcar-dmac",
|
||||
.data = &rcar_dmac_data,
|
||||
}, {
|
||||
.compatible = "renesas,rcar-gen4-dmac",
|
||||
.data = &rcar_gen4_dmac_data,
|
||||
}, {
|
||||
.compatible = "renesas,dmac-r8a779a0",
|
||||
.data = &rcar_v3u_dmac_data,
|
||||
.data = &rcar_gen4_dmac_data,
|
||||
},
|
||||
{ /* Sentinel */ }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user