Skip to contentSkip to conversation

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

PATCH New Suman Tripathi 4 participants 11 messages Dec 15, 2014 – Dec 16, 2014 3 messages 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.

---

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 |  17 ++
 arch/arm64/boot/dts/apm-storm.dtsi                 |   5 +
 drivers/iommu/Kconfig                              |  10 +
 drivers/iommu/Makefile                             |   1 +
 drivers/iommu/xgene-ahbc-iommu.c                   | 336 +++++++++++++++++++++
 5 files changed, 369 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

--
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

A message that is not in the archive (sent off-list or not yet received): 1418662523-8458-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            |  10 ++
 drivers/iommu/Makefile           |   1 +
 drivers/iommu/xgene-ahbc-iommu.c | 336 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 347 insertions(+)
 create mode 100644 drivers/iommu/xgene-ahbc-iommu.c
drivers/iommu/Kconfig +10 -0
index dd51122..c0f5f23 100644
@@ -302,4 +302,14 @@ 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
+	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 16edef7..ae3b663 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 +336 -0

336 lines not on this page · raw message

--
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

#3 lore raw

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

Quoted 21 lines · On Monday 15 December 2014 22:25:21 Suman Tripathi wrote:
drivers/iommu/xgene-ahbc-iommu.c new file +20 -0
+       return 0;
+}
+
+static struct of_device_id xgene_ahbc_mmu_of_match[] = {
+       { .compatible = "apm,xgene-ahbc-iommu"},
+       { },
+};
+MODULE_DEVICE_TABLE(of, xgene_ahbc_mmu_of_match);
+
+static struct platform_driver xgene_ahbc_mmu_driver = {
+       .probe          = xgene_ahbc_mmu_probe,
+       .remove         = xgene_ahbc_mmu_remove,
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "xgene-ahbc",
+               .of_match_table = of_match_ptr(xgene_ahbc_mmu_of_match),
+       },
+};
+
+static int xgene_ahbc_mmu_init(void)

drivers/iommu/xgene-ahbc-iommu.c line 332

Quoted 10 lines
drivers/iommu/xgene-ahbc-iommu.c new file +10 -0
+{
+       return platform_driver_register(&xgene_ahbc_mmu_driver);
+}
+subsys_initcall(xgene_ahbc_mmu_init);
+
+static void __exit xgene_ahbc_mmu_exit(void)
+{
+       platform_driver_unregister(&xgene_ahbc_mmu_driver);
+}
+module_exit(xgene_ahbc_mmu_exit);

This should use the newly added of_iommu infrastructure that we added for 3.19. Otherwise you are just duplicating common code.

Arnd

#4 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.

---
 arch/arm64/boot/dts/apm-storm.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/apm-storm.dtsi +5 -0
index c0aceef..f0a6b71 100644
@@ -389,6 +389,11 @@
 			phy-names = "sata-phy";
 		};
 
+		ahbc_iommu: ahbc_iommu@0x1f2a0080 {
+			compatible = "apm,xgene-ahbc-iommu";
+			reg = <0x0 0x1f2a0080 0x0 0x90>;
+		};
+
 		rtc: rtc@10510000 {
 			compatible = "apm,xgene-rtc";
 			reg = <0x0 0x10510000 0x0 0x400>;

--
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

#5 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      | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iommu/xgene,ahbc-iommu.txt
Documentation/devicetree/bindings/iommu/xgene,ahbc-iommu.txt new file +17 -0
new file mode 100644
index 0000000..d46af54
@@ -0,0 +1,17 @@
+*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
+
+Example:
+
+		ahbc_iommu: ahbc_iommu@0x1f2a0080 {
+			compatible = "apm,xgene-ahbc-iommu";
+			reg = <0x0 0x1f2a0080 0x0 0x90>;
+		};

--
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

#6 lore raw

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

Quoted 18 lines · On Monday 15 December 2014 22:25:23 Suman Tripathi wrote:
Documentation/devicetree/bindings/iommu/xgene,ahbc-iommu.txt new file +17 -1
+*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
+
+Example:
+
+               ahbc_iommu: ahbc_iommu at 0x1f2a0080 {
+                       compatible = "apm,xgene-ahbc-iommu";
+                       reg = <0x0 0x1f2a0080 0x0 0x90>;
+               };
--
Quoted 2 lines

1.8.2.1

This is incompatible with the iommu binding from
Documentation/devicetree/bindings/iommu/iommu.txt

Please fix.

Arnd

#7 lore raw

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

In reply to Suman Tripathi

You should be cc-ing Mark Langsdorf, not myself, for Xgene kernel support.

also note: I'm already on the IOMMU mailing list, so I'll see such patches via that list.

- Don

Quoted 23 lines · Suman Tripathi

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

---

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 |  17 ++
  arch/arm64/boot/dts/apm-storm.dtsi                 |   5 +
  drivers/iommu/Kconfig                              |  10 +
  drivers/iommu/Makefile                             |   1 +
  drivers/iommu/xgene-ahbc-iommu.c                   | 336 +++++++++++++++++++++
  5 files changed, 369 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

#8 lore raw

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

In reply to Suman Tripathi
Quoted 17 lines · Suman Tripathi

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

---

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 |  17 ++
  arch/arm64/boot/dts/apm-storm.dtsi                 |   5 +
  drivers/iommu/Kconfig                              |  10 +
  drivers/iommu/Makefile                             |   1 +
  drivers/iommu/xgene-ahbc-iommu.c                   | 336 +++++++++++++++++++++
  5 files changed, 369 insertions(+)
Quoted 6 lines

create mode 100644 Documentation/devicetree/bindings/iommu/xgene,ahbc-iommu.txt create mode 100644 drivers/iommu/xgene-ahbc-iommu.c

--
1.8.2.1

Have you tested this with a kernel that uses 64K page size ?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw

No not yet

Quoted 24 lines · Don Dutile
Quoted 22 lines · Suman Tripathi

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

---

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 |  17 ++
  arch/arm64/boot/dts/apm-storm.dtsi                 |   5 +
  drivers/iommu/Kconfig                              |  10 +
  drivers/iommu/Makefile                             |   1 +
  drivers/iommu/xgene-ahbc-iommu.c                   | 336
+++++++++++++++++++++
  5 files changed, 369 insertions(+)

create mode 100644 Documentation/devicetree/bindings/iommu/xgene,ahbc-
iommu.txt
create mode 100644 drivers/iommu/xgene-ahbc-iommu.c

Quoted 7 lines
Quoted 4 lines

--
1.8.2.1

Have you tested this with a kernel that uses 64K page size ?

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and contains information
that is confidential and proprietary to Applied Micro Circuits Corporation or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. All unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

maintainer
#11 lore raw

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

Hi Suman,

Quoted 15 lines · Suman Tripathi

On Dec 16, 2014 1:25 AM, "Don Dutile" <[email protected]> wrote:

On 12/15/2014 11:55 AM, Suman Tripathi wrote:

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

---

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.

Quoted 10 lines

? .../devicetree/bindings/iommu/xgene,ahbc-iommu.txt |? 17 ++ ? arch/arm64/boot/dts/apm-storm.dtsi? ? ? ? ? ? ? ? ?|? ?5 + ? drivers/iommu/Kconfig? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |? 10 + ? drivers/iommu/Makefile? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|? ?1 + ? drivers/iommu/xgene-ahbc-iommu.c? ? ? ? ? ? ? ? ? ?| 336
+++++++++++++++++++++
? 5 files changed, 369 insertions(+)
? create mode 100644 Documentation/devicetree/bindings/iommu/ xgene,ahbc-iommu.txt
? create mode 100644 drivers/iommu/xgene-ahbc-iommu.c

What are the differences between the X-Gene IOMMU and the ARM-SMMU?

Joerg

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw

Hi Joerg,

Hi Suman,

Quoted 5 lines · Suman Tripathi

On Dec 16, 2014 1:25 AM, "Don Dutile" <[email protected]> wrote:

On 12/15/2014 11:55 AM, Suman Tripathi wrote:

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

driver.

Quoted 6 lines

---

Suman Tripathi (3):
xgene-ahbc-iommu: Add support for APM X-Gene SoC AHBC IOMMU

driver.

Quoted 2 lines

arm64: dts: Add the APM X-Gene AHBC IOMMU DTS node.
Documentation: dt-bindings: Add the binding info for APM

X-Gene AHBC

Quoted 12 lines

IOMMU driver.

.../devicetree/bindings/iommu/xgene,ahbc-iommu.txt | 17 ++
arch/arm64/boot/dts/apm-storm.dtsi | 5 +
drivers/iommu/Kconfig | 10 +
drivers/iommu/Makefile | 1 +
drivers/iommu/xgene-ahbc-iommu.c | 336
+++++++++++++++++++++
5 files changed, 369 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/
xgene,ahbc-iommu.txt
create mode 100644 drivers/iommu/xgene-ahbc-iommu.c

What are the differences between the X-Gene IOMMU and the ARM-SMMU? [suman] : AHBC is IP from XGene for performing 32-bi to 64 bit and vice versa with AHBC peripherals. ARM-SMMU is IP from ARM which performs translations of different peripherals other than AHBC .

Thanks,
with regards,
suman

Quoted 33 lines · Joerg Roedel

Hi Suman,

Quoted 5 lines · Suman Tripathi

On Dec 16, 2014 1:25 AM, "Don Dutile" <[email protected]> wrote:

On 12/15/2014 11:55 AM, Suman Tripathi wrote:

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

driver.

Quoted 6 lines

---

Suman Tripathi (3):
xgene-ahbc-iommu: Add support for APM X-Gene SoC AHBC IOMMU

driver.

Quoted 2 lines

arm64: dts: Add the APM X-Gene AHBC IOMMU DTS node.
Documentation: dt-bindings: Add the binding info for APM

X-Gene AHBC

Quoted 12 lines

IOMMU driver.

.../devicetree/bindings/iommu/xgene,ahbc-iommu.txt | 17 ++
arch/arm64/boot/dts/apm-storm.dtsi | 5 +
drivers/iommu/Kconfig | 10 +
drivers/iommu/Makefile | 1 +
drivers/iommu/xgene-ahbc-iommu.c | 336
+++++++++++++++++++++
5 files changed, 369 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/
xgene,ahbc-iommu.txt
create mode 100644 drivers/iommu/xgene-ahbc-iommu.c

Quoted 6 lines

What are the differences between the X-Gene IOMMU and the ARM-SMMU?

Joerg

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and contains information
that is confidential and proprietary to Applied Micro Circuits Corporation or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. All unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.