All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Add SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller.
@ 2015-01-27 17:20 ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-27 17:20 UTC (permalink / raw)
  To: chris, anton, arnd
  Cc: linux-mmc, linuxppc-dev, devicetree, linux-arm-kernel, ddutile,
	jcm, mlangsdo, patches, Suman Tripathi

Due to the fact that the existing of-arasan driver works with 32-bit platforms.
This patch tweaks existing of-arasan driver to work with 64-bit X-Gene
platform using IOMMU translation.

v1 change:
 * Use the CONFIG_ARM64_DMA_HAS_IOMMU for dma-mapping.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---

Suman Tripathi (2):
  mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for
    arasan SDHCI driver.
  arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.

 arch/arm64/boot/dts/apm-storm.dtsi  | 43 +++++++++++++++++++++++++++
 drivers/mmc/host/Makefile           |  2 ++
 drivers/mmc/host/sdhci-ahbc-xgene.c | 58 +++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-ahbc-xgene.h | 49 +++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-of-arasan.c  | 11 +++++++
 drivers/mmc/host/sdhci-pltfm.c      | 12 ++++++++
 6 files changed, 175 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.c
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.h

--
1.8.2.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v1 0/2] Add SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller.
@ 2015-01-27 17:20 ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-27 17:20 UTC (permalink / raw)
  To: chris, anton, arnd
  Cc: devicetree, mlangsdo, Suman Tripathi, jcm, linux-mmc, patches,
	ddutile, linuxppc-dev, linux-arm-kernel

Due to the fact that the existing of-arasan driver works with 32-bit platforms.
This patch tweaks existing of-arasan driver to work with 64-bit X-Gene
platform using IOMMU translation.

v1 change:
 * Use the CONFIG_ARM64_DMA_HAS_IOMMU for dma-mapping.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---

Suman Tripathi (2):
  mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for
    arasan SDHCI driver.
  arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.

 arch/arm64/boot/dts/apm-storm.dtsi  | 43 +++++++++++++++++++++++++++
 drivers/mmc/host/Makefile           |  2 ++
 drivers/mmc/host/sdhci-ahbc-xgene.c | 58 +++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-ahbc-xgene.h | 49 +++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-of-arasan.c  | 11 +++++++
 drivers/mmc/host/sdhci-pltfm.c      | 12 ++++++++
 6 files changed, 175 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.c
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.h

--
1.8.2.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver.
  2015-01-27 17:20 ` Suman Tripathi
@ 2015-01-27 17:20   ` Suman Tripathi
  -1 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-27 17:20 UTC (permalink / raw)
  To: chris, anton, arnd
  Cc: linux-mmc, linuxppc-dev, devicetree, linux-arm-kernel, ddutile,
	jcm, mlangsdo, patches, Suman Tripathi

Due to the fact that the existing of-arasan driver works with
32-bit platforms. This patch tweaks existing of-arasan driver
to work with 64-bit platform using IOMMU translation.

In addition it adds support for more quirks and quirks2 obtained
from device tree inside the generic sdhci-platform(sdhci-pltfm.c)
driver.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
 drivers/mmc/host/Makefile           |  2 ++
 drivers/mmc/host/sdhci-ahbc-xgene.c | 58 +++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-ahbc-xgene.h | 49 +++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-of-arasan.c  | 11 +++++++
 drivers/mmc/host/sdhci-pltfm.c      | 12 ++++++++
 5 files changed, 132 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.c
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.h

diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index b09ecfb..82de8f0 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -75,3 +75,5 @@ obj-$(CONFIG_MMC_SDHCI_ST)		+= sdhci-st.o
 ifeq ($(CONFIG_CB710_DEBUG),y)
 	CFLAGS-cb710-mmc	+= -DDEBUG
 endif
+
+obj-$(CONFIG_XGENE_AHBC_IOMMU)		+= sdhci-ahbc-xgene.o
diff --git a/drivers/mmc/host/sdhci-ahbc-xgene.c b/drivers/mmc/host/sdhci-ahbc-xgene.c
new file mode 100644
index 0000000..e23b69d98
--- /dev/null
+++ b/drivers/mmc/host/sdhci-ahbc-xgene.c
@@ -0,0 +1,58 @@
+/* sdhci-ahbc-xgene.c
+ *
+ * Copyright (c) 2014 Applied Micro Circuits Corporation.
+ * Author: Suman Tripathi <stripathi@apm.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/amba/bus.h>
+#include <linux/device.h>
+
+#include <asm/dma-iommu.h>
+
+#include "sdhci-ahbc-xgene.h"
+
+int xgene_ahbc_iommu_attach_device(struct device *dev)
+{
+	struct dma_iommu_mapping *mapping;
+	int ret;
+
+	/*
+	 * AHBC iommu don't have specific
+	 * IOMMU area. Create a mapping for
+	 * dummy area 4GB.
+	 */
+	mapping = arm64_iommu_create_mapping(&amba_bustype,
+					     XGENE_AHBC_IOMMU_DMA_START,
+					     XGENE_AHBC_IOMMU_DMA_SIZE);
+
+	if (IS_ERR(mapping))
+		return PTR_ERR(mapping);
+
+	mapping->identical_map = true;
+
+	ret = arm64_iommu_attach_device(dev, mapping);
+	if (ret < 0) {
+		dev_err(dev, "failed iommu attach\n");
+		return ret;
+	}
+
+	return 0;
+}
+
+void xgene_ahbc_iommu_detach_device(struct device *dev)
+{
+	struct dma_iommu_mapping *mapping = dev->archdata.mapping;
+
+	if (!mapping || !mapping->domain)
+		return;
+
+	arm64_iommu_detach_device(dev);
+	arm64_iommu_release_mapping(mapping);
+
+}
+
diff --git a/drivers/mmc/host/sdhci-ahbc-xgene.h b/drivers/mmc/host/sdhci-ahbc-xgene.h
new file mode 100644
index 0000000..97a2b6b
--- /dev/null
+++ b/drivers/mmc/host/sdhci-ahbc-xgene.h
@@ -0,0 +1,49 @@
+/* xgene_sdhci_ahbc.h
+ *
+ * Copyright (c) 2014 Applied Micro Circuits Corporation.
+ * Author: Suman Tripathi <stripathi@apm.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#ifndef _XGENE_SDHCI_AHBC_H_
+#define _XGENE_SDHCI_AHBC_H_
+#include <linux/err.h>
+
+#ifdef CONFIG_XGENE_AHBC_IOMMU
+
+#define XGENE_AHBC_IOMMU_DMA_START	0x00000000
+#define XGENE_AHBC_IOMMU_DMA_SIZE	0x100000000
+
+int xgene_ahbc_iommu_attach_device(struct device *dev);
+void xgene_ahbc_iommu_detach_device(struct device *dev);
+static inline bool is_xgene_ahbc_iommu_supported(struct device *dev)
+{
+#ifdef CONFIG_ARM64_DMA_USE_IOMMU
+	return dev->archdata.mapping ? true : false;
+#else
+	return false;
+#endif
+}
+
+#else
+
+static inline int xgene_ahbc_iommu_attach_device(struct device *dev)
+{
+	return -ENOSYS;
+}
+
+static inline void xgene_ahbc_iommu_detach_device(struct device *dev)
+{
+	return;
+}
+
+static inline bool is_xgene_ahbc_iommu_supported(struct device *dev)
+{
+	return false;
+}
+#endif
+#endif
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 981d66e..78de09c 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -22,6 +22,8 @@
 #include <linux/module.h>
 #include "sdhci-pltfm.h"

+#include "sdhci-ahbc-xgene.h"
+
 #define SDHCI_ARASAN_CLK_CTRL_OFFSET	0x2c

 #define CLK_CTRL_TIMEOUT_SHIFT		16
@@ -174,6 +176,13 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 	pltfm_host->priv = sdhci_arasan;
 	pltfm_host->clk = clk_xin;

+	ret = xgene_ahbc_iommu_attach_device(&pdev->dev);
+	if (ret < 0 && IS_ENABLED(CONFIG_XGENE_AHBC_IOMMU)) {
+		dev_err(&pdev->dev,
+			"unable to attach device to iommu %x\n", ret);
+		goto clk_disable_all;
+	}
+
 	ret = sdhci_add_host(host);
 	if (ret) {
 		dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
@@ -201,6 +210,8 @@ static int sdhci_arasan_remove(struct platform_device *pdev)
 	clk_disable_unprepare(pltfm_host->clk);
 	clk_disable_unprepare(sdhci_arasan->clk_ahb);

+	xgene_ahbc_iommu_detach_device(&pdev->dev);
+
 	return sdhci_pltfm_unregister(pdev);
 }

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index c5b01d6..2cf25bd 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -90,6 +90,18 @@ void sdhci_get_of_property(struct platform_device *pdev)
 		if (of_get_property(np, "broken-cd", NULL))
 			host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;

+		if (of_get_property(np, "delay-after-power", NULL))
+			host->quirks |= SDHCI_QUIRK_DELAY_AFTER_POWER;
+
+		if (of_get_property(np, "no-hispd", NULL))
+			host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT;
+
+		if (of_get_property(np, "broken-adma", NULL))
+			host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
+
+		if (of_get_property(np, "no-cmd23", NULL))
+			host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
+
 		if (of_get_property(np, "no-1-8-v", NULL))
 			host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;

--
1.8.2.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver.
@ 2015-01-27 17:20   ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-27 17:20 UTC (permalink / raw)
  To: chris, anton, arnd
  Cc: devicetree, mlangsdo, Suman Tripathi, jcm, linux-mmc, patches,
	ddutile, linuxppc-dev, linux-arm-kernel

Due to the fact that the existing of-arasan driver works with
32-bit platforms. This patch tweaks existing of-arasan driver
to work with 64-bit platform using IOMMU translation.

In addition it adds support for more quirks and quirks2 obtained
from device tree inside the generic sdhci-platform(sdhci-pltfm.c)
driver.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
 drivers/mmc/host/Makefile           |  2 ++
 drivers/mmc/host/sdhci-ahbc-xgene.c | 58 +++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-ahbc-xgene.h | 49 +++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci-of-arasan.c  | 11 +++++++
 drivers/mmc/host/sdhci-pltfm.c      | 12 ++++++++
 5 files changed, 132 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.c
 create mode 100644 drivers/mmc/host/sdhci-ahbc-xgene.h

diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index b09ecfb..82de8f0 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -75,3 +75,5 @@ obj-$(CONFIG_MMC_SDHCI_ST)		+= sdhci-st.o
 ifeq ($(CONFIG_CB710_DEBUG),y)
 	CFLAGS-cb710-mmc	+= -DDEBUG
 endif
+
+obj-$(CONFIG_XGENE_AHBC_IOMMU)		+= sdhci-ahbc-xgene.o
diff --git a/drivers/mmc/host/sdhci-ahbc-xgene.c b/drivers/mmc/host/sdhci-ahbc-xgene.c
new file mode 100644
index 0000000..e23b69d98
--- /dev/null
+++ b/drivers/mmc/host/sdhci-ahbc-xgene.c
@@ -0,0 +1,58 @@
+/* sdhci-ahbc-xgene.c
+ *
+ * Copyright (c) 2014 Applied Micro Circuits Corporation.
+ * Author: Suman Tripathi <stripathi@apm.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/amba/bus.h>
+#include <linux/device.h>
+
+#include <asm/dma-iommu.h>
+
+#include "sdhci-ahbc-xgene.h"
+
+int xgene_ahbc_iommu_attach_device(struct device *dev)
+{
+	struct dma_iommu_mapping *mapping;
+	int ret;
+
+	/*
+	 * AHBC iommu don't have specific
+	 * IOMMU area. Create a mapping for
+	 * dummy area 4GB.
+	 */
+	mapping = arm64_iommu_create_mapping(&amba_bustype,
+					     XGENE_AHBC_IOMMU_DMA_START,
+					     XGENE_AHBC_IOMMU_DMA_SIZE);
+
+	if (IS_ERR(mapping))
+		return PTR_ERR(mapping);
+
+	mapping->identical_map = true;
+
+	ret = arm64_iommu_attach_device(dev, mapping);
+	if (ret < 0) {
+		dev_err(dev, "failed iommu attach\n");
+		return ret;
+	}
+
+	return 0;
+}
+
+void xgene_ahbc_iommu_detach_device(struct device *dev)
+{
+	struct dma_iommu_mapping *mapping = dev->archdata.mapping;
+
+	if (!mapping || !mapping->domain)
+		return;
+
+	arm64_iommu_detach_device(dev);
+	arm64_iommu_release_mapping(mapping);
+
+}
+
diff --git a/drivers/mmc/host/sdhci-ahbc-xgene.h b/drivers/mmc/host/sdhci-ahbc-xgene.h
new file mode 100644
index 0000000..97a2b6b
--- /dev/null
+++ b/drivers/mmc/host/sdhci-ahbc-xgene.h
@@ -0,0 +1,49 @@
+/* xgene_sdhci_ahbc.h
+ *
+ * Copyright (c) 2014 Applied Micro Circuits Corporation.
+ * Author: Suman Tripathi <stripathi@apm.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#ifndef _XGENE_SDHCI_AHBC_H_
+#define _XGENE_SDHCI_AHBC_H_
+#include <linux/err.h>
+
+#ifdef CONFIG_XGENE_AHBC_IOMMU
+
+#define XGENE_AHBC_IOMMU_DMA_START	0x00000000
+#define XGENE_AHBC_IOMMU_DMA_SIZE	0x100000000
+
+int xgene_ahbc_iommu_attach_device(struct device *dev);
+void xgene_ahbc_iommu_detach_device(struct device *dev);
+static inline bool is_xgene_ahbc_iommu_supported(struct device *dev)
+{
+#ifdef CONFIG_ARM64_DMA_USE_IOMMU
+	return dev->archdata.mapping ? true : false;
+#else
+	return false;
+#endif
+}
+
+#else
+
+static inline int xgene_ahbc_iommu_attach_device(struct device *dev)
+{
+	return -ENOSYS;
+}
+
+static inline void xgene_ahbc_iommu_detach_device(struct device *dev)
+{
+	return;
+}
+
+static inline bool is_xgene_ahbc_iommu_supported(struct device *dev)
+{
+	return false;
+}
+#endif
+#endif
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 981d66e..78de09c 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -22,6 +22,8 @@
 #include <linux/module.h>
 #include "sdhci-pltfm.h"

+#include "sdhci-ahbc-xgene.h"
+
 #define SDHCI_ARASAN_CLK_CTRL_OFFSET	0x2c

 #define CLK_CTRL_TIMEOUT_SHIFT		16
@@ -174,6 +176,13 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 	pltfm_host->priv = sdhci_arasan;
 	pltfm_host->clk = clk_xin;

+	ret = xgene_ahbc_iommu_attach_device(&pdev->dev);
+	if (ret < 0 && IS_ENABLED(CONFIG_XGENE_AHBC_IOMMU)) {
+		dev_err(&pdev->dev,
+			"unable to attach device to iommu %x\n", ret);
+		goto clk_disable_all;
+	}
+
 	ret = sdhci_add_host(host);
 	if (ret) {
 		dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
@@ -201,6 +210,8 @@ static int sdhci_arasan_remove(struct platform_device *pdev)
 	clk_disable_unprepare(pltfm_host->clk);
 	clk_disable_unprepare(sdhci_arasan->clk_ahb);

+	xgene_ahbc_iommu_detach_device(&pdev->dev);
+
 	return sdhci_pltfm_unregister(pdev);
 }

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index c5b01d6..2cf25bd 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -90,6 +90,18 @@ void sdhci_get_of_property(struct platform_device *pdev)
 		if (of_get_property(np, "broken-cd", NULL))
 			host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;

+		if (of_get_property(np, "delay-after-power", NULL))
+			host->quirks |= SDHCI_QUIRK_DELAY_AFTER_POWER;
+
+		if (of_get_property(np, "no-hispd", NULL))
+			host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT;
+
+		if (of_get_property(np, "broken-adma", NULL))
+			host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
+
+		if (of_get_property(np, "no-cmd23", NULL))
+			host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
+
 		if (of_get_property(np, "no-1-8-v", NULL))
 			host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;

--
1.8.2.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
  2015-01-27 17:20 ` Suman Tripathi
@ 2015-01-27 17:21   ` Suman Tripathi
  -1 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-27 17:21 UTC (permalink / raw)
  To: chris, anton, arnd
  Cc: linux-mmc, linuxppc-dev, devicetree, linux-arm-kernel, ddutile,
	jcm, mlangsdo, patches, Suman Tripathi

This patch adds the arasan sdhc nodes to reuse the of-arasan
driver for APM X-Gene SoC.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
 arch/arm64/boot/dts/apm-storm.dtsi | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi
index f1ad9c2..52de7d3 100644
--- a/arch/arm64/boot/dts/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm-storm.dtsi
@@ -144,6 +144,40 @@
 				clock-output-names = "socplldiv2";
 			};

+			ahbclk: ahbclk@1f2ac000 {
+				compatible = "apm,xgene-device-clock";
+				#clock-cells = <1>;
+				clocks = <&socplldiv2 0>;
+				reg = <0x0 0x1f2ac000 0x0 0x1000
+					0x0 0x17000000 0x0 0x2000>;
+				reg-names = "csr-reg", "div-reg";
+				csr-offset = <0x0>;
+				csr-mask = <0x1>;
+				enable-offset = <0x8>;
+				enable-mask = <0x1>;
+				divider-offset = <0x164>;
+				divider-width = <0x5>;
+				divider-shift = <0x0>;
+				clock-output-names = "ahbclk";
+			};
+
+			sdioclk: sdioclk@1f2ac000 {
+				compatible = "apm,xgene-device-clock";
+				#clock-cells = <1>;
+				clocks = <&socplldiv2 0>;
+				reg = <0x0 0x1f2ac000 0x0 0x1000
+					0x0 0x17000000 0x0 0x2000>;
+				reg-names = "csr-reg", "div-reg";
+				csr-offset = <0x0>;
+				csr-mask = <0x2>;
+				enable-offset = <0x8>;
+				enable-mask = <0x2>;
+				divider-offset = <0x178>;
+				divider-width = <0x8>;
+				divider-shift = <0x0>;
+				clock-output-names = "sdioclk";
+			};
+
 			qmlclk: qmlclk {
 				compatible = "apm,xgene-device-clock";
 				#clock-cells = <1>;
@@ -595,6 +629,15 @@
 			clocks = <&rtcclk 0>;
 		};

+		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>;
+		};
+
 		menet: ethernet@17020000 {
 			compatible = "apm,xgene-enet";
 			status = "disabled";
--
1.8.2.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-27 17:21   ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-27 17:21 UTC (permalink / raw)
  To: chris, anton, arnd
  Cc: devicetree, mlangsdo, Suman Tripathi, jcm, linux-mmc, patches,
	ddutile, linuxppc-dev, linux-arm-kernel

This patch adds the arasan sdhc nodes to reuse the of-arasan
driver for APM X-Gene SoC.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
 arch/arm64/boot/dts/apm-storm.dtsi | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi
index f1ad9c2..52de7d3 100644
--- a/arch/arm64/boot/dts/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm-storm.dtsi
@@ -144,6 +144,40 @@
 				clock-output-names = "socplldiv2";
 			};

+			ahbclk: ahbclk@1f2ac000 {
+				compatible = "apm,xgene-device-clock";
+				#clock-cells = <1>;
+				clocks = <&socplldiv2 0>;
+				reg = <0x0 0x1f2ac000 0x0 0x1000
+					0x0 0x17000000 0x0 0x2000>;
+				reg-names = "csr-reg", "div-reg";
+				csr-offset = <0x0>;
+				csr-mask = <0x1>;
+				enable-offset = <0x8>;
+				enable-mask = <0x1>;
+				divider-offset = <0x164>;
+				divider-width = <0x5>;
+				divider-shift = <0x0>;
+				clock-output-names = "ahbclk";
+			};
+
+			sdioclk: sdioclk@1f2ac000 {
+				compatible = "apm,xgene-device-clock";
+				#clock-cells = <1>;
+				clocks = <&socplldiv2 0>;
+				reg = <0x0 0x1f2ac000 0x0 0x1000
+					0x0 0x17000000 0x0 0x2000>;
+				reg-names = "csr-reg", "div-reg";
+				csr-offset = <0x0>;
+				csr-mask = <0x2>;
+				enable-offset = <0x8>;
+				enable-mask = <0x2>;
+				divider-offset = <0x178>;
+				divider-width = <0x8>;
+				divider-shift = <0x0>;
+				clock-output-names = "sdioclk";
+			};
+
 			qmlclk: qmlclk {
 				compatible = "apm,xgene-device-clock";
 				#clock-cells = <1>;
@@ -595,6 +629,15 @@
 			clocks = <&rtcclk 0>;
 		};

+		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>;
+		};
+
 		menet: ethernet@17020000 {
 			compatible = "apm,xgene-enet";
 			status = "disabled";
--
1.8.2.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver.
  2015-01-27 17:20   ` Suman Tripathi
  (?)
@ 2015-01-27 20:12     ` Arnd Bergmann
  -1 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:12 UTC (permalink / raw)
  To: Suman Tripathi
  Cc: devicetree, mlangsdo, jcm, anton, linux-mmc, chris, patches,
	ddutile, linuxppc-dev, linux-arm-kernel

On Tuesday 27 January 2015 22:50:59 Suman Tripathi wrote:
> @@ -174,6 +176,13 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>         pltfm_host->priv = sdhci_arasan;
>         pltfm_host->clk = clk_xin;
> 
> +       ret = xgene_ahbc_iommu_attach_device(&pdev->dev);
> +       if (ret < 0 && IS_ENABLED(CONFIG_XGENE_AHBC_IOMMU)) {
> +               dev_err(&pdev->dev,
> +                       "unable to attach device to iommu %x\n", ret);
> +               goto clk_disable_all;
> +       }
> +
>         ret = sdhci_add_host(host);
>         if (ret) {
>                 dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
> 

This looks wrong: the iommu should be automatically configured for devices
that need it, without any interaction from the driver.

	Arnd
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver.
@ 2015-01-27 20:12     ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:12 UTC (permalink / raw)
  To: Suman Tripathi
  Cc: devicetree, mlangsdo, jcm, anton, linux-mmc, chris, patches,
	ddutile, linuxppc-dev, linux-arm-kernel

On Tuesday 27 January 2015 22:50:59 Suman Tripathi wrote:
> @@ -174,6 +176,13 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>         pltfm_host->priv = sdhci_arasan;
>         pltfm_host->clk = clk_xin;
> 
> +       ret = xgene_ahbc_iommu_attach_device(&pdev->dev);
> +       if (ret < 0 && IS_ENABLED(CONFIG_XGENE_AHBC_IOMMU)) {
> +               dev_err(&pdev->dev,
> +                       "unable to attach device to iommu %x\n", ret);
> +               goto clk_disable_all;
> +       }
> +
>         ret = sdhci_add_host(host);
>         if (ret) {
>                 dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
> 

This looks wrong: the iommu should be automatically configured for devices
that need it, without any interaction from the driver.

	Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver.
@ 2015-01-27 20:12     ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 27 January 2015 22:50:59 Suman Tripathi wrote:
> @@ -174,6 +176,13 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>         pltfm_host->priv = sdhci_arasan;
>         pltfm_host->clk = clk_xin;
> 
> +       ret = xgene_ahbc_iommu_attach_device(&pdev->dev);
> +       if (ret < 0 && IS_ENABLED(CONFIG_XGENE_AHBC_IOMMU)) {
> +               dev_err(&pdev->dev,
> +                       "unable to attach device to iommu %x\n", ret);
> +               goto clk_disable_all;
> +       }
> +
>         ret = sdhci_add_host(host);
>         if (ret) {
>                 dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
> 

This looks wrong: the iommu should be automatically configured for devices
that need it, without any interaction from the driver.

	Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
  2015-01-27 17:21   ` Suman Tripathi
  (?)
@ 2015-01-27 20:13     ` Arnd Bergmann
  -1 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:13 UTC (permalink / raw)
  To: Suman Tripathi
  Cc: chris, anton, linux-mmc, linuxppc-dev, devicetree,
	linux-arm-kernel, ddutile, jcm, mlangsdo, patches

On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
> 
> +               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>;
> +               };
> +

Here you don't provide an 'iommus' property, which means that the
device is unable to use the iommu.

	Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-27 20:13     ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:13 UTC (permalink / raw)
  To: Suman Tripathi
  Cc: devicetree, mlangsdo, jcm, anton, linux-mmc, chris, patches,
	ddutile, linuxppc-dev, linux-arm-kernel

On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
> 
> +               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>;
> +               };
> +

Here you don't provide an 'iommus' property, which means that the
device is unable to use the iommu.

	Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-27 20:13     ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-27 20:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
> 
> +               sdhc0: sdhc at 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>;
> +               };
> +

Here you don't provide an 'iommus' property, which means that the
device is unable to use the iommu.

	Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
  2015-01-27 20:13     ` Arnd Bergmann
@ 2015-01-28  4:18       ` Suman Tripathi
  -1 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-28  4:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Mark Langsdorf, Jon Masters, anton, linux-mmc, chris,
	patches, Don Dutile, linuxppc-dev, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1466 bytes --]

Hi Arnd,

On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>
> +               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>;
> +               };
> +

Here you don't provide an 'iommus' property, which means that the
device is unable to use the iommu.
I added the iommus in the IOMMU AHBC patch. Anything wrong in that ? In the
next version Also I will remove the IOMMU hacks from arasan driver


On Wed, Jan 28, 2015 at 1:43 AM, Arnd Bergmann <arnd@arndb.de> wrote:

> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
> >
> > +               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>;
> > +               };
> > +
>
> Here you don't provide an 'iommus' property, which means that the
> device is unable to use the iommu.
>
>         Arnd
>



-- 
Thanks,
with regards,
Suman Tripathi

[-- Attachment #1.2: Type: text/html, Size: 2856 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-28  4:18       ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-28  4:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Mark Langsdorf, Jon Masters, anton, linux-mmc, chris,
	patches, Don Dutile, linuxppc-dev, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

Hi Arnd,

On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>
> +               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>;
> +               };
> +

Here you don't provide an 'iommus' property, which means that the
device is unable to use the iommu.
I added the iommus in the IOMMU AHBC patch. Anything wrong in that ? In the
next version Also I will remove the IOMMU hacks from arasan driver


On Wed, Jan 28, 2015 at 1:43 AM, Arnd Bergmann <arnd@arndb.de> wrote:

> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
> >
> > +               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>;
> > +               };
> > +
>
> Here you don't provide an 'iommus' property, which means that the
> device is unable to use the iommu.
>
>         Arnd
>



-- 
Thanks,
with regards,
Suman Tripathi

[-- Attachment #2: Type: text/html, Size: 2856 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
  2015-01-28  4:18       ` Suman Tripathi
@ 2015-01-28  4:23         ` Suman Tripathi
  -1 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-28  4:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Mark Langsdorf, Jon Masters, anton, linux-mmc, chris,
	patches, Don Dutile, linuxppc-dev, linux-arm-kernel

Hi Arnd,

I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
In the next version Also I will remove the IOMMU hacks from arasan
driver

On Wed, Jan 28, 2015 at 9:48 AM, Suman Tripathi <stripathi@apm.com> wrote:
> Hi Arnd,
>
> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>>
>> +               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>;
>> +               };
>> +
>
> Here you don't provide an 'iommus' property, which means that the
> device is unable to use the iommu.
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ? In the
> next version Also I will remove the IOMMU hacks from arasan driver
>
>
> On Wed, Jan 28, 2015 at 1:43 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>> >
>> > +               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>;
>> > +               };
>> > +
>>
>> Here you don't provide an 'iommus' property, which means that the
>> device is unable to use the iommu.
>>
>>         Arnd
>
>
>
>
> --
> Thanks,
> with regards,
> Suman Tripathi



-- 
Thanks,
with regards,
Suman Tripathi

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-28  4:23         ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-28  4:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
In the next version Also I will remove the IOMMU hacks from arasan
driver

On Wed, Jan 28, 2015 at 9:48 AM, Suman Tripathi <stripathi@apm.com> wrote:
> Hi Arnd,
>
> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>>
>> +               sdhc0: sdhc at 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>;
>> +               };
>> +
>
> Here you don't provide an 'iommus' property, which means that the
> device is unable to use the iommu.
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ? In the
> next version Also I will remove the IOMMU hacks from arasan driver
>
>
> On Wed, Jan 28, 2015 at 1:43 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> On Tuesday 27 January 2015 22:51:00 Suman Tripathi wrote:
>> >
>> > +               sdhc0: sdhc at 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>;
>> > +               };
>> > +
>>
>> Here you don't provide an 'iommus' property, which means that the
>> device is unable to use the iommu.
>>
>>         Arnd
>
>
>
>
> --
> Thanks,
> with regards,
> Suman Tripathi



-- 
Thanks,
with regards,
Suman Tripathi

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
  2015-01-28  4:23         ` Suman Tripathi
@ 2015-01-28 12:46           ` Arnd Bergmann
  -1 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-28 12:46 UTC (permalink / raw)
  To: Suman Tripathi
  Cc: devicetree, Mark Langsdorf, Jon Masters, anton, linux-mmc, chris,
	patches, Don Dutile, linuxppc-dev, linux-arm-kernel

On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
> 
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
> In the next version Also I will remove the IOMMU hacks from arasan
> driver

Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.

You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.

Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.

	Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-28 12:46           ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2015-01-28 12:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
> 
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
> In the next version Also I will remove the IOMMU hacks from arasan
> driver

Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.

You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.

Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.

	Arnd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
  2015-01-28 12:46           ` Arnd Bergmann
  (?)
@ 2015-01-28 13:22             ` Suman Tripathi
  -1 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-28 13:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Mark Langsdorf, Jon Masters, anton, linux-mmc, chris,
	patches, Don Dutile, linuxppc-dev, linux-arm-kernel

On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
> In the next version Also I will remove the IOMMU hacks from arasan
> driver

Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.

You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.

One more point is the binding for IOMMU needs to be in the same patch
in which the IOMMU support is added. So to provide the binding info of
the master node we require the sdhc nodes to be merged first.

Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.

On Wed, Jan 28, 2015 at 6:16 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>>
>> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
>> In the next version Also I will remove the IOMMU hacks from arasan
>> driver
>
> Hmm, I guess you have a required ordering between the patches either
> way, which makes it hard to merge in a way that is bisectable.
>
> You are correct that you should not merge a patch with the iommu
> reference before adding the iommu device node, because it would
> otherwise break building the mmc tree.
>
> Usually, the right answer is to merged the dts changes through the
> arm-soc tree, and then you can just add the node for the sdhc device
> after the one for the iommu device.
>
>         Arnd



-- 
Thanks,
with regards,
Suman Tripathi
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-28 13:22             ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-28 13:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Mark Langsdorf, Jon Masters, anton, linux-mmc, chris,
	patches, Don Dutile, linuxppc-dev, linux-arm-kernel

On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
> In the next version Also I will remove the IOMMU hacks from arasan
> driver

Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.

You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.

One more point is the binding for IOMMU needs to be in the same patch
in which the IOMMU support is added. So to provide the binding info of
the master node we require the sdhc nodes to be merged first.

Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.

On Wed, Jan 28, 2015 at 6:16 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>>
>> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
>> In the next version Also I will remove the IOMMU hacks from arasan
>> driver
>
> Hmm, I guess you have a required ordering between the patches either
> way, which makes it hard to merge in a way that is bisectable.
>
> You are correct that you should not merge a patch with the iommu
> reference before adding the iommu device node, because it would
> otherwise break building the mmc tree.
>
> Usually, the right answer is to merged the dts changes through the
> arm-soc tree, and then you can just add the node for the sdhc device
> after the one for the iommu device.
>
>         Arnd



-- 
Thanks,
with regards,
Suman Tripathi

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
@ 2015-01-28 13:22             ` Suman Tripathi
  0 siblings, 0 replies; 21+ messages in thread
From: Suman Tripathi @ 2015-01-28 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>
> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
> In the next version Also I will remove the IOMMU hacks from arasan
> driver

Hmm, I guess you have a required ordering between the patches either
way, which makes it hard to merge in a way that is bisectable.

You are correct that you should not merge a patch with the iommu
reference before adding the iommu device node, because it would
otherwise break building the mmc tree.

One more point is the binding for IOMMU needs to be in the same patch
in which the IOMMU support is added. So to provide the binding info of
the master node we require the sdhc nodes to be merged first.

Usually, the right answer is to merged the dts changes through the
arm-soc tree, and then you can just add the node for the sdhc device
after the one for the iommu device.

On Wed, Jan 28, 2015 at 6:16 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 28 January 2015 09:53:25 Suman Tripathi wrote:
>>
>> I added the iommus in the IOMMU AHBC patch. Anything wrong in that ?
>> In the next version Also I will remove the IOMMU hacks from arasan
>> driver
>
> Hmm, I guess you have a required ordering between the patches either
> way, which makes it hard to merge in a way that is bisectable.
>
> You are correct that you should not merge a patch with the iommu
> reference before adding the iommu device node, because it would
> otherwise break building the mmc tree.
>
> Usually, the right answer is to merged the dts changes through the
> arm-soc tree, and then you can just add the node for the sdhc device
> after the one for the iommu device.
>
>         Arnd



-- 
Thanks,
with regards,
Suman Tripathi

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-01-28 13:22 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 17:20 [PATCH v1 0/2] Add SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller Suman Tripathi
2015-01-27 17:20 ` Suman Tripathi
2015-01-27 17:20 ` [PATCH v1 1/2] mmc: host: arasan: Add addition of-arasan quirks and IOMMU support for arasan SDHCI driver Suman Tripathi
2015-01-27 17:20   ` Suman Tripathi
2015-01-27 20:12   ` Arnd Bergmann
2015-01-27 20:12     ` Arnd Bergmann
2015-01-27 20:12     ` Arnd Bergmann
2015-01-27 17:21 ` [PATCH v1 2/2] arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi Suman Tripathi
2015-01-27 17:21   ` Suman Tripathi
2015-01-27 20:13   ` Arnd Bergmann
2015-01-27 20:13     ` Arnd Bergmann
2015-01-27 20:13     ` Arnd Bergmann
2015-01-28  4:18     ` Suman Tripathi
2015-01-28  4:18       ` Suman Tripathi
2015-01-28  4:23       ` Suman Tripathi
2015-01-28  4:23         ` Suman Tripathi
2015-01-28 12:46         ` Arnd Bergmann
2015-01-28 12:46           ` Arnd Bergmann
2015-01-28 13:22           ` Suman Tripathi
2015-01-28 13:22             ` Suman Tripathi
2015-01-28 13:22             ` Suman Tripathi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.