diff mbox series

[PATCH/RFC] iommu/ipmmu-vmsa: R-Car E3 SYS-DMAC whitelist prototype

Message ID 153717398326.578.15513023441673714711.sendpatchset@octo (mailing list archive)
State RFC
Delegated to: Geert Uytterhoeven
Headers show
Series [PATCH/RFC] iommu/ipmmu-vmsa: R-Car E3 SYS-DMAC whitelist prototype | expand

Commit Message

Magnus Damm Sept. 17, 2018, 8:46 a.m. UTC
From: Magnus Damm <damm@opensource.se>

For testing purpose enable IPMMU for SYS-DMAC0, SYS-DMAC1 and SYS-DMAC2
on R-Car E3. Not for upstream merge.

Not-Yet-Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Applies on top of renesas-devel-20180914-v4.19-rc3

 drivers/iommu/ipmmu-vmsa.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

--- 0001/drivers/iommu/ipmmu-vmsa.c
+++ work/drivers/iommu/ipmmu-vmsa.c	2018-09-17 17:09:36.083484128 +0900
@@ -756,6 +756,18 @@  static int ipmmu_init_platform_device(st
 
 static bool ipmmu_slave_whitelist(struct device *dev)
 {
+	/* R-Car E3 SYS-DMAC0 (Channel 0-15) */
+	if (!strcmp(dev_name(dev), "e6700000.dma-controller"))
+		return true;
+
+	/* R-Car E3 SYS-DMAC1 (Channel 16-31) */
+	if (!strcmp(dev_name(dev), "e7300000.dma-controller"))
+		return true;
+
+	/* R-Car E3 SYS-DMAC2 (Channel 32-47) */
+	if (!strcmp(dev_name(dev), "e7310000.dma-controller"))
+		return true;
+
 	/* By default, do not allow use of IPMMU */
 	return false;
 }