dmaengine: sh: rz-dmac: Add device_synchronize callback
authorBiju Das <biju.das.jz@bp.renesas.com>
Fri, 22 Jul 2022 08:44:30 +0000 (09:44 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 26 Jul 2022 12:57:50 +0000 (18:27 +0530)
commit7d3a3aaaa9cc8ec53e9ef4f3e1711827107f76c5
treec62c10b20fb00099ce03f4dc5ba5cbd2e84303b3
parent1e42f82cbec7b2cc4873751e7791e6611901c5fc
dmaengine: sh: rz-dmac: Add device_synchronize callback

Some on-chip peripheral modules(for eg:- rspi) on RZ/G2L SoC
use the same signal for both interrupt and DMA transfer requests.
The signal works as a DMA transfer request signal by setting
DMARS, and subsequent interrupt requests to the interrupt controller
are masked.

We can re-enable the interrupt by clearing the DMARS.

This patch adds device_synchronize callback for clearing
DMARS and thereby allowing DMA consumers to switch to
interrupt mode.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220722084430.969333-1-biju.das.jz@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rz-dmac.c