[PATCH v2 4/6] dmaengine: sh: rz_dmac: add RZ/{T2H,N2H} support

Cosmin Tanislav posted 6 patches 8 hours ago
[PATCH v2 4/6] dmaengine: sh: rz_dmac: add RZ/{T2H,N2H} support
Posted by Cosmin Tanislav 8 hours ago
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.

Add support for them.

RZ/N2H will use RZ/T2H as a fallback.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---

V2:
 * remove notes

 drivers/dma/sh/rz-dmac.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
index f94be3f8e232..c0c23c39a626 100644
--- a/drivers/dma/sh/rz-dmac.c
+++ b/drivers/dma/sh/rz-dmac.c
@@ -15,6 +15,7 @@
 #include <linux/interrupt.h>
 #include <linux/iopoll.h>
 #include <linux/irqchip/irq-renesas-rzv2h.h>
+#include <linux/irqchip/irq-renesas-rzt2h.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/of.h>
@@ -1073,12 +1074,18 @@ static const struct rz_dmac_info rz_dmac_v2h_info = {
 	.dma_req_no_default = RZV2H_ICU_DMAC_REQ_NO_DEFAULT,
 };
 
+static const struct rz_dmac_info rz_dmac_t2h_info = {
+	.register_dma_req = rzt2h_icu_register_dma_req,
+	.dma_req_no_default = RZT2H_ICU_DMAC_REQ_NO_DEFAULT,
+};
+
 static const struct rz_dmac_info rz_dmac_common_info = {
 	.dma_req_no_default = 0,
 };
 
 static const struct of_device_id of_rz_dmac_match[] = {
 	{ .compatible = "renesas,r9a09g057-dmac", .data = &rz_dmac_v2h_info },
+	{ .compatible = "renesas,r9a09g077-dmac", .data = &rz_dmac_t2h_info },
 	{ .compatible = "renesas,rz-dmac", .data = &rz_dmac_common_info },
 	{ /* Sentinel */ }
 };
-- 
2.52.0