Skip to contentSkip to conversation

Add support for APM X-Gene SoC AHBC IOMMU driver.

PATCH New Suman Tripathi 1 participant 4 messages Jan 27, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add support for APM X-Gene SoC AHBC IOMMU driver.

This patch adds the support for the APM X-Gene SoC AHBC IOMMU driver.

v1 change:
* Change the binding info as per Arnd comments.

---

Suman Tripathi (3):
xgene-ahbc-iommu: Add support for APM X-Gene SoC AHBC IOMMU driver.
arm64: dts: Add the APM X-Gene AHBC IOMMU DTS node.
Documentation: dt-bindings: Add the binding info for APM X-Gene AHBC
IOMMU driver.

 .../devicetree/bindings/iommu/xgene,ahbc-iommu.txt |  31 ++
 arch/arm64/boot/dts/apm-storm.dtsi                 |   7 +
 drivers/iommu/Kconfig                              |  11 +
 drivers/iommu/Makefile                             |   1 +
 drivers/iommu/xgene-ahbc-iommu.c                   | 329 +++++++++++++++++++++
 5 files changed, 379 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iommu/xgene,ahbc-iommu.txt
 create mode 100644 drivers/iommu/xgene-ahbc-iommu.c

--
1.8.2.1

A message that is not in the archive (sent off-list or not yet received): 1422379554-10328-1-git-send-email-stripathi-qTEPVZfXA3Y@public.gmane.org

#2 lore raw

PATCH 1/3 xgene-ahbc-iommu: Add support for APM X-Gene SoC AHBC IOMMU driver.

This patch adds the support for the APM X-Gene SoC AHBC IOMMU driver. This driver translates the 32-bit AHB address from the dma master to 42-bit AXI address with the help of a set of AHBC inbound mapper (AIM) registers. The AHB dma master for slaves, eg: sdhci etc, will use this driver to do a dma transfer operation.

---
 drivers/iommu/Kconfig            |  11 ++
 drivers/iommu/Makefile           |   1 +
 drivers/iommu/xgene-ahbc-iommu.c | 329 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 341 insertions(+)
 create mode 100644 drivers/iommu/xgene-ahbc-iommu.c
drivers/iommu/Kconfig +11 -0
index 22f15f9..bdb2f30 100644
@@ -315,4 +315,15 @@ config ARM_SMMU
 	  Say Y here if your SoC includes an IOMMU device implementing
 	  the ARM SMMU architecture.
 
+config XGENE_AHBC_IOMMU
+	bool "X-Gene AHBC IOMMU Support"
+	default y if ARCH_XGENE
+	select IOMMU_API
+	select ARM64_DMA_USE_IOMMU if ARM64
+	help
+	  Support for AHBC translation driver for X-Gene. This driver
+	  translates the 32-bit AHB address from dma master to 42-bit
+	  AXI address with the help of some set of AHB inbound mapping
+	  registers.
+
 endif # IOMMU_SUPPORT
drivers/iommu/Makefile +1 -0
index 7b976f2..90cb201 100644
@@ -19,3 +19,4 @@ obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o
 obj-$(CONFIG_SHMOBILE_IOMMU) += shmobile-iommu.o
 obj-$(CONFIG_SHMOBILE_IPMMU) += shmobile-ipmmu.o
 obj-$(CONFIG_FSL_PAMU) += fsl_pamu.o fsl_pamu_domain.o
+obj-$(CONFIG_XGENE_AHBC_IOMMU) += xgene-ahbc-iommu.o
drivers/iommu/xgene-ahbc-iommu.c new file +329 -0

329 lines not on this page · raw message

--
1.8.2.1

#3 lore raw

PATCH 2/3 arm64: dts: Add the APM X-Gene AHBC IOMMU DTS node.

In reply to a message not in the archive

This patch adds the device tree node for APM X-Gene AHBC IOMMU and master node as SDHCI.

---
 arch/arm64/boot/dts/apm-storm.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/apm-storm.dtsi +7 -0
index 52de7d3..22bc9d1 100644
@@ -621,6 +621,12 @@
 			phy-names = "sata-phy";
 		};
 
+		ahbc_iommu: ahbc_iommu@0x1f2a0080 {
+			compatible = "apm,xgene-ahbc-iommu";
+			#iommu-cells = <0>;
+			reg = <0x0 0x1f2a0080 0x0 0x90>;
+		};
+
 		rtc: rtc@10510000 {
 			compatible = "apm,xgene-rtc";
 			reg = <0x0 0x10510000 0x0 0x400>;
@@ -636,6 +642,7 @@
 			interrupts = <0x0 0x49 0x4>;
 			clock-names = "clk_xin", "clk_ahb";
 			clocks = <&sdioclk 0>, <&ahbclk 0>;
+			iommus = <&ahbc_iommu>;
 		};
 
 		menet: ethernet@17020000 {

--
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

PATCH 3/3 Documentation: dt-bindings: Add the binding info for APM X-Gene AHBC IOMMU driver.

In reply to a message not in the archive

This patch adds the device tree binding information for X-Gene AHBC IOMMU driver.

---
 .../devicetree/bindings/iommu/xgene,ahbc-iommu.txt | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iommu/xgene,ahbc-iommu.txt
Documentation/devicetree/bindings/iommu/xgene,ahbc-iommu.txt new file +31 -0
new file mode 100644
index 0000000..37ad3a6
@@ -0,0 +1,31 @@
+*APM X-Gene AHBC IOMMU Architecture Implementation
+
+APM X-Gene SoC AHBC IOMMU translates the AHBC 32-bit address from
+dma master to 42-bit AXI address by using a set of AIM(AHB Inbound mapper)
+register.
+
+** AHBC IOMMU required properties:
+
+- compatible    : Should be "apm,xgene-ahbc-iommu"
+- reg           : Base address of the AHBC AXI mapper registers
+- iommu-cells   : It is single master IOMMU.
+
+Example:
+		/* IOMMU controller device node */
+		ahbc_iommu: ahbc_iommu@0x1f2a0080 {
+			compatible = "apm,xgene-ahbc-iommu";
+			#iommu-cells = <0>;
+			reg = <0x0 0x1f2a0080 0x0 0x90>;
+		};
+
+		/* Master node */
+		sdhc0: sdhc@1c000000 {
+			device_type = "sdhc";
+			compatible = "arasan,sdhci-8.9a";
+			reg = <0x0 0x1c000000 0x0 0x100>;
+			interrupts = <0x0 0x49 0x4>;
+			clock-names = "clk_xin", "clk_ahb";
+			clocks = <&sdioclk 0>, <&ahbclk 0>;
+			iommus = <&ahbc_iommu>;
+		};
+

--
1.8.2.1