]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dmaengine: sh: rz_dmac: make register_dma_req() chip-specific
authorCosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Mon, 5 Jan 2026 11:44:43 +0000 (13:44 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 9 Mar 2026 11:26:30 +0000 (12:26 +0100)
commitbbb8b402d798f9f211376cee3d649d64dfc17880
treef39da9d9029b19a3bd6fcfb0fa808f81fa641ae1
parentb34f3fcae72a0afdd1a966fd68309b461bf678e6
dmaengine: sh: rz_dmac: make register_dma_req() chip-specific

The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs use a
completely different ICU unit compared to RZ/V2H, which requires a
separate implementation.

To prepare for adding support for these SoCs, add a chip-specific
structure and put a pointer to the rzv2h_icu_register_dma_req() function
in the .register_dma_req field of the chip-specific structure to allow
for other implementations. Do the same for the default request value,
RZV2H_ICU_DMAC_REQ_NO_DEFAULT, and place it into .dma_req_no_default.

While at it, factor out the logic that calls .register_dma_req() or
rz_dmac_set_dmars_register() into a separate function to remove some
code duplication.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260105114445.878262-3-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rz-dmac.c