* [PATCH v2 1/5] iommu/ipmmu-vmsa: Refactor micro-TLB lookup
2014-04-17 10:33 [PATCH v2 0/5] Renesas VMSA-compatible IPMMU DT support Laurent Pinchart
@ 2014-04-17 10:33 ` Laurent Pinchart
[not found] ` <1397730807-5993-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-04-17 10:33 UTC (permalink / raw)
To: iommu; +Cc: linux-sh
Cache the micro-TLB number in archdata allocated in the .add_device
handler instead of looking it up when the deviced is attached and
detached. This simplifies the .attach_dev and .detach_dev operations and
prepares for DT support.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/iommu/ipmmu-vmsa.c | 92 ++++++++++++++++++++++++++--------------------
1 file changed, 52 insertions(+), 40 deletions(-)
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index a8a940a..49e00f7 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -44,6 +44,11 @@ struct ipmmu_vmsa_domain {
pgd_t *pgd;
};
+struct ipmmu_vmsa_archdata {
+ struct ipmmu_vmsa_device *mmu;
+ unsigned int utlb;
+};
+
static DEFINE_SPINLOCK(ipmmu_devices_lock);
static LIST_HEAD(ipmmu_devices);
@@ -265,14 +270,19 @@ static void ipmmu_tlb_invalidate(struct ipmmu_vmsa_domain *domain)
* Enable MMU translation for the microTLB.
*/
static void ipmmu_utlb_enable(struct ipmmu_vmsa_domain *domain,
- const struct ipmmu_vmsa_master *master)
+ unsigned int utlb)
{
struct ipmmu_vmsa_device *mmu = domain->mmu;
+ /*
+ * TODO: Reference-count the microTLB as several bus masters can be
+ * connected to the same microTLB.
+ */
+
/* TODO: What should we set the ASID to ? */
- ipmmu_write(mmu, IMUASID(master->utlb), 0);
+ ipmmu_write(mmu, IMUASID(utlb), 0);
/* TODO: Do we need to flush the microTLB ? */
- ipmmu_write(mmu, IMUCTR(master->utlb),
+ ipmmu_write(mmu, IMUCTR(utlb),
IMUCTR_TTSEL_MMU(domain->context_id) | IMUCTR_FLUSH |
IMUCTR_MMUEN);
}
@@ -281,11 +291,11 @@ static void ipmmu_utlb_enable(struct ipmmu_vmsa_domain *domain,
* Disable MMU translation for the microTLB.
*/
static void ipmmu_utlb_disable(struct ipmmu_vmsa_domain *domain,
- const struct ipmmu_vmsa_master *master)
+ unsigned int utlb)
{
struct ipmmu_vmsa_device *mmu = domain->mmu;
- ipmmu_write(mmu, IMUCTR(master->utlb), 0);
+ ipmmu_write(mmu, IMUCTR(utlb), 0);
}
static void ipmmu_flush_pgtable(struct ipmmu_vmsa_device *mmu, void *addr,
@@ -674,21 +684,6 @@ static int ipmmu_handle_mapping(struct ipmmu_vmsa_domain *domain,
* IOMMU Operations
*/
-static const struct ipmmu_vmsa_master *
-ipmmu_find_master(struct ipmmu_vmsa_device *ipmmu, struct device *dev)
-{
- const struct ipmmu_vmsa_master *master = ipmmu->pdata->masters;
- const char *devname = dev_name(dev);
- unsigned int i;
-
- for (i = 0; i < ipmmu->pdata->num_masters; ++i, ++master) {
- if (strcmp(master->name, devname) == 0)
- return master;
- }
-
- return NULL;
-}
-
static int ipmmu_domain_init(struct iommu_domain *io_domain)
{
struct ipmmu_vmsa_domain *domain;
@@ -727,9 +722,9 @@ static void ipmmu_domain_destroy(struct iommu_domain *io_domain)
static int ipmmu_attach_device(struct iommu_domain *io_domain,
struct device *dev)
{
- struct ipmmu_vmsa_device *mmu = dev->archdata.iommu;
+ struct ipmmu_vmsa_archdata *archdata = dev->archdata.iommu;
+ struct ipmmu_vmsa_device *mmu = archdata->mmu;
struct ipmmu_vmsa_domain *domain = io_domain->priv;
- const struct ipmmu_vmsa_master *master;
unsigned long flags;
int ret = 0;
@@ -759,11 +754,7 @@ static int ipmmu_attach_device(struct iommu_domain *io_domain,
if (ret < 0)
return ret;
- master = ipmmu_find_master(mmu, dev);
- if (!master)
- return -EINVAL;
-
- ipmmu_utlb_enable(domain, master);
+ ipmmu_utlb_enable(domain, archdata->utlb);
return 0;
}
@@ -771,14 +762,10 @@ static int ipmmu_attach_device(struct iommu_domain *io_domain,
static void ipmmu_detach_device(struct iommu_domain *io_domain,
struct device *dev)
{
+ struct ipmmu_vmsa_archdata *archdata = dev->archdata.iommu;
struct ipmmu_vmsa_domain *domain = io_domain->priv;
- const struct ipmmu_vmsa_master *master;
- master = ipmmu_find_master(domain->mmu, dev);
- if (!master)
- return;
-
- ipmmu_utlb_disable(domain, master);
+ ipmmu_utlb_disable(domain, archdata->utlb);
/*
* TODO: Optimize by disabling the context when no device is attached.
@@ -839,11 +826,26 @@ static phys_addr_t ipmmu_iova_to_phys(struct iommu_domain *io_domain,
return __pfn_to_phys(pte_pfn(pte)) | (iova & ~PAGE_MASK);
}
+static int ipmmu_find_utlb(struct ipmmu_vmsa_device *mmu, struct device *dev)
+{
+ const struct ipmmu_vmsa_master *master = mmu->pdata->masters;
+ const char *devname = dev_name(dev);
+ unsigned int i;
+
+ for (i = 0; i < mmu->pdata->num_masters; ++i, ++master) {
+ if (strcmp(master->name, devname) == 0)
+ return master->utlb;
+ }
+
+ return -1;
+}
+
static int ipmmu_add_device(struct device *dev)
{
- const struct ipmmu_vmsa_master *master = NULL;
+ struct ipmmu_vmsa_archdata *archdata;
struct ipmmu_vmsa_device *mmu;
struct iommu_group *group;
+ int utlb = -1;
int ret;
if (dev->archdata.iommu) {
@@ -856,10 +858,10 @@ static int ipmmu_add_device(struct device *dev)
spin_lock(&ipmmu_devices_lock);
list_for_each_entry(mmu, &ipmmu_devices, list) {
- master = ipmmu_find_master(mmu, dev);
- if (master) {
+ utlb = ipmmu_find_utlb(mmu, dev);
+ if (utlb >= 0) {
/*
- * TODO Take a reference to the master to protect
+ * TODO Take a reference to the MMU to protect
* against device removal.
*/
break;
@@ -868,10 +870,10 @@ static int ipmmu_add_device(struct device *dev)
spin_unlock(&ipmmu_devices_lock);
- if (!master)
+ if (utlb < 0)
return -ENODEV;
- if (!master->utlb >= mmu->num_utlbs)
+ if (utlb >= mmu->num_utlbs)
return -EINVAL;
/* Create a device group and add the device to it. */
@@ -889,7 +891,15 @@ static int ipmmu_add_device(struct device *dev)
return ret;
}
- dev->archdata.iommu = mmu;
+ archdata = kzalloc(sizeof(*archdata), GFP_KERNEL);
+ if (!archdata) {
+ ret = -ENOMEM;
+ goto error;
+ }
+
+ archdata->mmu = mmu;
+ archdata->utlb = utlb;
+ dev->archdata.iommu = archdata;
/*
* Create the ARM mapping, used by the ARM DMA mapping core to allocate
@@ -923,6 +933,7 @@ static int ipmmu_add_device(struct device *dev)
return 0;
error:
+ kfree(dev->archdata.iommu);
dev->archdata.iommu = NULL;
iommu_group_remove_device(dev);
return ret;
@@ -932,6 +943,7 @@ static void ipmmu_remove_device(struct device *dev)
{
arm_iommu_detach_device(dev);
iommu_group_remove_device(dev);
+ kfree(dev->archdata.iommu);
dev->archdata.iommu = NULL;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread[parent not found: <1397730807-5993-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>]
* [PATCH v2 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation
[not found] ` <1397730807-5993-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
@ 2014-04-17 10:33 ` Laurent Pinchart
[not found] ` <1397730807-5993-3-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2014-04-17 10:33 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
---
.../bindings/iommu/renesas,ipmmu-vmsa.txt | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt
diff --git a/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt
new file mode 100644
index 0000000..2b16a75
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt
@@ -0,0 +1,35 @@
+* Renesas VMSA-Compatible IOMMU
+
+The IPMMU is an IOMMU implementation compatible with the ARM VMSA page tables.
+It provides address translation for bus masters outside of the CPU, each
+connected to the IPMMU through a port called micro-TLB.
+
+
+Required Properties:
+
+ - compatible: Must contain "renesas,ipmmu-vmsa".
+ - reg: Base address and size of the IPMMU registers.
+ - interrupts: Specifier for the MMU fault interrupt.
+
+
+Each bus master connected to an IPMMU must reference the IPMMU in its device
+node with the following property:
+
+ - iommus: A reference to the IPMMU in two cells. The first cell is a phandle
+ to the IPMMU and the second cell the number of the micro-TLB that the
+ device is connected to.
+
+
+Example: R8A7791 IPMMU-MX and VSP1-D0 bus master
+
+ ipmmu_mx: mmu@fe951800 {
+ compatible = "renasas,ipmmu-vmsa";
+ reg = <0 0xfe951800 0 0x800>;
+ interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ vsp1@fe928000 {
+ ...
+ iommus = <&ipmmu_mx 13>;
+ ...
+ };
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/5] iommu/ipmmu-vmsa: Add device tree support
2014-04-17 10:33 [PATCH v2 0/5] Renesas VMSA-compatible IPMMU DT support Laurent Pinchart
2014-04-17 10:33 ` [PATCH v2 1/5] iommu/ipmmu-vmsa: Refactor micro-TLB lookup Laurent Pinchart
[not found] ` <1397730807-5993-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
@ 2014-04-17 10:33 ` Laurent Pinchart
2014-04-17 10:33 ` [PATCH v2 4/5] ARM: shmobile: r8a7791: Add IPMMU DT nodes Laurent Pinchart
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-04-17 10:33 UTC (permalink / raw)
To: iommu; +Cc: linux-sh
Make platform data optional when the device is instantiated from DT and
look up the micro-TLB number in the bus master DT node.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/iommu/ipmmu-vmsa.c | 39 +++++++++++++++++++++++++++++++--------
1 file changed, 31 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index 49e00f7..d277bde 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -16,6 +16,7 @@
#include <linux/io.h>
#include <linux/iommu.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_data/ipmmu-vmsa.h>
#include <linux/platform_device.h>
#include <linux/sizes.h>
@@ -828,16 +829,33 @@ static phys_addr_t ipmmu_iova_to_phys(struct iommu_domain *io_domain,
static int ipmmu_find_utlb(struct ipmmu_vmsa_device *mmu, struct device *dev)
{
- const struct ipmmu_vmsa_master *master = mmu->pdata->masters;
- const char *devname = dev_name(dev);
- unsigned int i;
+ struct of_phandle_args args;
+ int ret;
+
+ if (mmu->pdata) {
+ const struct ipmmu_vmsa_master *master = mmu->pdata->masters;
+ const char *devname = dev_name(dev);
+ unsigned int i;
- for (i = 0; i < mmu->pdata->num_masters; ++i, ++master) {
- if (strcmp(master->name, devname) == 0)
- return master->utlb;
+ for (i = 0; i < mmu->pdata->num_masters; ++i, ++master) {
+ if (strcmp(master->name, devname) == 0)
+ return master->utlb;
+ }
+
+ return -1;
}
- return -1;
+ ret = of_parse_phandle_with_fixed_args(dev->of_node, "iommus",
+ 1, 0, &args);
+ if (ret < 0)
+ return -1;
+
+ of_node_put(args.np);
+
+ if (args.np != mmu->dev->of_node)
+ return -1;
+
+ return args.args[0];
}
static int ipmmu_add_device(struct device *dev)
@@ -980,7 +998,7 @@ static int ipmmu_probe(struct platform_device *pdev)
int irq;
int ret;
- if (!pdev->dev.platform_data) {
+ if (!IS_ENABLED(CONFIG_OF) && !pdev->dev.platform_data) {
dev_err(&pdev->dev, "missing platform data\n");
return -EINVAL;
}
@@ -1046,10 +1064,15 @@ static int ipmmu_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id ipmmu_of_ids[] = {
+ { .compatible = "renesas,ipmmu-vmsa", },
+};
+
static struct platform_driver ipmmu_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "ipmmu-vmsa",
+ .of_match_table = of_match_ptr(ipmmu_of_ids),
},
.probe = ipmmu_probe,
.remove = ipmmu_remove,
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 4/5] ARM: shmobile: r8a7791: Add IPMMU DT nodes
2014-04-17 10:33 [PATCH v2 0/5] Renesas VMSA-compatible IPMMU DT support Laurent Pinchart
` (2 preceding siblings ...)
2014-04-17 10:33 ` [PATCH v2 3/5] iommu/ipmmu-vmsa: Add device tree support Laurent Pinchart
@ 2014-04-17 10:33 ` Laurent Pinchart
2014-04-17 10:33 ` [PATCH v2 5/5] [TEST] ARM: shmobile: r8a7791: Enable IOMMU support for the VSP1 Laurent Pinchart
2014-04-17 11:12 ` [PATCH v2 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation Laurent Pinchart
5 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-04-17 10:33 UTC (permalink / raw)
To: iommu; +Cc: linux-sh
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7791.dtsi | 49 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 909d786..d1e446c 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -909,4 +909,53 @@
#size-cells = <0>;
status = "disabled";
};
+
+ ipmmu_sy0: mmu@e6280800 {
+ compatible = "renesas,ipmmu-vmsa";
+ reg = <0 0xe6280800 0 0x800>;
+ interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ ipmmu_sy1: mmu@e6290800 {
+ compatible = "renesas,ipmmu-vmsa";
+ reg = <0 0xe6290800 0 0x800>;
+ interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ ipmmu_ds: mmu@e6740800 {
+ compatible = "renesas,ipmmu-vmsa";
+ reg = <0 0xe6740800 0 0x800>;
+ interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ ipmmu_mp: mmu@ec680800 {
+ compatible = "renesas,ipmmu-vmsa";
+ reg = <0 0xec680800 0 0x800>;
+ interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ ipmmu_mx: mmu@fe951800 {
+ compatible = "renesas,ipmmu-vmsa";
+ reg = <0 0xfe951800 0 0x800>;
+ interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ ipmmu_rt: mmu@ffc80800 {
+ compatible = "renesas,ipmmu-vmsa";
+ reg = <0 0xffc80800 0 0x800>;
+ interrupts = <0 307 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ ipmmu_gp: mmu@e62a0800 {
+ compatible = "renesas,ipmmu-vmsa";
+ reg = <0 0xe62a0800 0 0x800>;
+ interrupts = <0 260 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
};
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 5/5] [TEST] ARM: shmobile: r8a7791: Enable IOMMU support for the VSP1
2014-04-17 10:33 [PATCH v2 0/5] Renesas VMSA-compatible IPMMU DT support Laurent Pinchart
` (3 preceding siblings ...)
2014-04-17 10:33 ` [PATCH v2 4/5] ARM: shmobile: r8a7791: Add IPMMU DT nodes Laurent Pinchart
@ 2014-04-17 10:33 ` Laurent Pinchart
2014-04-17 11:12 ` [PATCH v2 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation Laurent Pinchart
5 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-04-17 10:33 UTC (permalink / raw)
To: iommu; +Cc: linux-sh
Not for merge yet.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7791.dtsi | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index d1e446c..e024602 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -508,6 +508,8 @@
interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7791_CLK_VSP1_S>;
+ iommus = <&ipmmu_mx 10>;
+
renesas,has-lut;
renesas,has-sru;
renesas,#rpf = <5>;
@@ -521,6 +523,8 @@
interrupts = <0 246 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7791_CLK_VSP1_DU0>;
+ iommus = <&ipmmu_mx 13>;
+
renesas,has-lif;
renesas,has-lut;
renesas,#rpf = <4>;
@@ -534,6 +538,8 @@
interrupts = <0 247 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7791_CLK_VSP1_DU1>;
+ iommus = <&ipmmu_mx 14>;
+
renesas,has-lif;
renesas,has-lut;
renesas,#rpf = <4>;
@@ -942,7 +948,6 @@
compatible = "renesas,ipmmu-vmsa";
reg = <0 0xfe951800 0 0x800>;
interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
};
ipmmu_rt: mmu@ffc80800 {
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation
2014-04-17 10:33 [PATCH v2 0/5] Renesas VMSA-compatible IPMMU DT support Laurent Pinchart
` (4 preceding siblings ...)
2014-04-17 10:33 ` [PATCH v2 5/5] [TEST] ARM: shmobile: r8a7791: Enable IOMMU support for the VSP1 Laurent Pinchart
@ 2014-04-17 11:12 ` Laurent Pinchart
5 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-04-17 11:12 UTC (permalink / raw)
To: iommu; +Cc: linux-sh, devicetree, Will Deacon
Cc: devicetree@vger.kernel.org
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../bindings/iommu/renesas,ipmmu-vmsa.txt | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt
diff --git a/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt
new file mode 100644
index 0000000..2b16a75
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt
@@ -0,0 +1,35 @@
+* Renesas VMSA-Compatible IOMMU
+
+The IPMMU is an IOMMU implementation compatible with the ARM VMSA page tables.
+It provides address translation for bus masters outside of the CPU, each
+connected to the IPMMU through a port called micro-TLB.
+
+
+Required Properties:
+
+ - compatible: Must contain "renesas,ipmmu-vmsa".
+ - reg: Base address and size of the IPMMU registers.
+ - interrupts: Specifier for the MMU fault interrupt.
+
+
+Each bus master connected to an IPMMU must reference the IPMMU in its device
+node with the following property:
+
+ - iommus: A reference to the IPMMU in two cells. The first cell is a phandle
+ to the IPMMU and the second cell the number of the micro-TLB that the
+ device is connected to.
+
+
+Example: R8A7791 IPMMU-MX and VSP1-D0 bus master
+
+ ipmmu_mx: mmu@fe951800 {
+ compatible = "renasas,ipmmu-vmsa";
+ reg = <0 0xfe951800 0 0x800>;
+ interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ vsp1@fe928000 {
+ ...
+ iommus = <&ipmmu_mx 13>;
+ ...
+ };
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread