Loading Documentation/devicetree/bindings/iommu/arm,smmu.txt +6 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,12 @@ conditions. from the mmu-masters towards memory) node for this SMMU. - calxeda,smmu-secure-config-access : Enable proper handling of buggy implementations that always use secure access to SMMU configuration registers. In this case non-secure aliases of secure registers have to be used during SMMU configuration. Example: smmu { Loading Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt 0 → 100644 +26 −0 Original line number Diff line number Diff line OMAP2+ IOMMU Required properties: - compatible : Should be one of, "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances "ti,dra7-iommu" for DRA7xx IOMMU instances - ti,hwmods : Name of the hwmod associated with the IOMMU instance - reg : Address space for the configuration registers - interrupts : Interrupt specifier for the IOMMU instance Optional properties: - ti,#tlb-entries : Number of entries in the translation look-aside buffer. Should be either 8 or 32 (default: 32) - ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing back a bus error response on MMU faults. Example: /* OMAP3 ISP MMU */ mmu_isp: mmu@480bd400 { compatible = "ti,omap2-iommu"; reg = <0x480bd400 0x80>; interrupts = <24>; ti,hwmods = "mmu_isp"; ti,#tlb-entries = <8>; }; arch/arm/mach-omap2/omap-iommu.c +5 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ #include <linux/of.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/err.h> Loading Loading @@ -58,6 +59,10 @@ static int __init omap_iommu_dev_init(struct omap_hwmod *oh, void *unused) static int __init omap_iommu_init(void) { /* If dtb is there, the devices will be created dynamically */ if (of_have_populated_dt()) return -ENODEV; return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL); } /* must be ready before omap3isp is probed */ Loading drivers/iommu/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ config SHMOBILE_IOMMU bool "IOMMU for Renesas IPMMU/IPMMUI" default n depends on ARM depends on SH_MOBILE || COMPILE_TEST depends on ARCH_SHMOBILE || COMPILE_TEST select IOMMU_API select ARM_DMA_USE_IOMMU select SHMOBILE_IPMMU Loading drivers/iommu/amd_iommu.c +4 −4 Original line number Diff line number Diff line Loading @@ -963,7 +963,7 @@ static void build_inv_iommu_pasid(struct iommu_cmd *cmd, u16 domid, int pasid, address &= ~(0xfffULL); cmd->data[0] = pasid & PASID_MASK; cmd->data[0] = pasid; cmd->data[1] = domid; cmd->data[2] = lower_32_bits(address); cmd->data[3] = upper_32_bits(address); Loading @@ -982,10 +982,10 @@ static void build_inv_iotlb_pasid(struct iommu_cmd *cmd, u16 devid, int pasid, address &= ~(0xfffULL); cmd->data[0] = devid; cmd->data[0] |= (pasid & 0xff) << 16; cmd->data[0] |= ((pasid >> 8) & 0xff) << 16; cmd->data[0] |= (qdep & 0xff) << 24; cmd->data[1] = devid; cmd->data[1] |= ((pasid >> 8) & 0xfff) << 16; cmd->data[1] |= (pasid & 0xff) << 16; cmd->data[2] = lower_32_bits(address); cmd->data[2] |= CMD_INV_IOMMU_PAGES_GN_MASK; cmd->data[3] = upper_32_bits(address); Loading @@ -1001,7 +1001,7 @@ static void build_complete_ppr(struct iommu_cmd *cmd, u16 devid, int pasid, cmd->data[0] = devid; if (gn) { cmd->data[1] = pasid & PASID_MASK; cmd->data[1] = pasid; cmd->data[2] = CMD_INV_IOMMU_PAGES_GN_MASK; } cmd->data[3] = tag & 0x1ff; Loading Loading
Documentation/devicetree/bindings/iommu/arm,smmu.txt +6 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,12 @@ conditions. from the mmu-masters towards memory) node for this SMMU. - calxeda,smmu-secure-config-access : Enable proper handling of buggy implementations that always use secure access to SMMU configuration registers. In this case non-secure aliases of secure registers have to be used during SMMU configuration. Example: smmu { Loading
Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt 0 → 100644 +26 −0 Original line number Diff line number Diff line OMAP2+ IOMMU Required properties: - compatible : Should be one of, "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances "ti,dra7-iommu" for DRA7xx IOMMU instances - ti,hwmods : Name of the hwmod associated with the IOMMU instance - reg : Address space for the configuration registers - interrupts : Interrupt specifier for the IOMMU instance Optional properties: - ti,#tlb-entries : Number of entries in the translation look-aside buffer. Should be either 8 or 32 (default: 32) - ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing back a bus error response on MMU faults. Example: /* OMAP3 ISP MMU */ mmu_isp: mmu@480bd400 { compatible = "ti,omap2-iommu"; reg = <0x480bd400 0x80>; interrupts = <24>; ti,hwmods = "mmu_isp"; ti,#tlb-entries = <8>; };
arch/arm/mach-omap2/omap-iommu.c +5 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ #include <linux/of.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/err.h> Loading Loading @@ -58,6 +59,10 @@ static int __init omap_iommu_dev_init(struct omap_hwmod *oh, void *unused) static int __init omap_iommu_init(void) { /* If dtb is there, the devices will be created dynamically */ if (of_have_populated_dt()) return -ENODEV; return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL); } /* must be ready before omap3isp is probed */ Loading
drivers/iommu/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ config SHMOBILE_IOMMU bool "IOMMU for Renesas IPMMU/IPMMUI" default n depends on ARM depends on SH_MOBILE || COMPILE_TEST depends on ARCH_SHMOBILE || COMPILE_TEST select IOMMU_API select ARM_DMA_USE_IOMMU select SHMOBILE_IPMMU Loading
drivers/iommu/amd_iommu.c +4 −4 Original line number Diff line number Diff line Loading @@ -963,7 +963,7 @@ static void build_inv_iommu_pasid(struct iommu_cmd *cmd, u16 domid, int pasid, address &= ~(0xfffULL); cmd->data[0] = pasid & PASID_MASK; cmd->data[0] = pasid; cmd->data[1] = domid; cmd->data[2] = lower_32_bits(address); cmd->data[3] = upper_32_bits(address); Loading @@ -982,10 +982,10 @@ static void build_inv_iotlb_pasid(struct iommu_cmd *cmd, u16 devid, int pasid, address &= ~(0xfffULL); cmd->data[0] = devid; cmd->data[0] |= (pasid & 0xff) << 16; cmd->data[0] |= ((pasid >> 8) & 0xff) << 16; cmd->data[0] |= (qdep & 0xff) << 24; cmd->data[1] = devid; cmd->data[1] |= ((pasid >> 8) & 0xfff) << 16; cmd->data[1] |= (pasid & 0xff) << 16; cmd->data[2] = lower_32_bits(address); cmd->data[2] |= CMD_INV_IOMMU_PAGES_GN_MASK; cmd->data[3] = upper_32_bits(address); Loading @@ -1001,7 +1001,7 @@ static void build_complete_ppr(struct iommu_cmd *cmd, u16 devid, int pasid, cmd->data[0] = devid; if (gn) { cmd->data[1] = pasid & PASID_MASK; cmd->data[1] = pasid; cmd->data[2] = CMD_INV_IOMMU_PAGES_GN_MASK; } cmd->data[3] = tag & 0x1ff; Loading