diff options
| author | Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> | 2026-05-26 11:46:56 +0300 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-06-04 20:58:31 +0530 |
| commit | 38d4d021228386b8e3fbef2bca5f1e91eacd4fe6 (patch) | |
| tree | 81c0b2c226d4442b7e9340181bfea63f40670d2f | |
| parent | 89975baaa9ea2490b75d69842561a32ca888b7e5 (diff) | |
| download | linux-38d4d021228386b8e3fbef2bca5f1e91eacd4fe6.tar.gz linux-38d4d021228386b8e3fbef2bca5f1e91eacd4fe6.zip | |
dmaengine: sh: rz-dmac: Use rz_dmac_disable_hw()
Use rz_dmac_disable_hw() instead of open coding it. This unifies the
code and prepares it for the addition of suspend to RAM and cyclic DMA.
The rz_dmac_disable_hw() from rz_dmac_chan_probe() was moved after
vchan_init() as it initializes the channel->vc.chan.device used in
rz_dmac_disable_hw().
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/20260526084710.3491480-5-claudiu.beznea@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
| -rw-r--r-- | drivers/dma/sh/rz-dmac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c index 1717b407ab9e..40ddf534c094 100644 --- a/drivers/dma/sh/rz-dmac.c +++ b/drivers/dma/sh/rz-dmac.c @@ -873,7 +873,7 @@ static void rz_dmac_irq_handle_channel(struct rz_dmac_chan *channel) channel->index, chstat); scoped_guard(spinlock_irqsave, &channel->vc.lock) - rz_dmac_ch_writel(channel, CHCTRL_DEFAULT, CHCTRL, 1); + rz_dmac_disable_hw(channel); return; } @@ -1000,15 +1000,15 @@ static int rz_dmac_chan_probe(struct rz_dmac *dmac, } rz_lmdesc_setup(channel, lmdesc); - /* Initialize register for each channel */ - rz_dmac_ch_writel(channel, CHCTRL_DEFAULT, CHCTRL, 1); - channel->vc.desc_free = rz_dmac_virt_desc_free; vchan_init(&channel->vc, &dmac->engine); INIT_LIST_HEAD(&channel->ld_queue); INIT_LIST_HEAD(&channel->ld_free); INIT_LIST_HEAD(&channel->ld_active); + /* Initialize register for each channel */ + rz_dmac_disable_hw(channel); + /* Request the channel interrupt. */ scnprintf(pdev_irqname, sizeof(pdev_irqname), "ch%u", index); irq = platform_get_irq_byname(pdev, pdev_irqname); |
