All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] PCI irq mapping fixes and cleanups
@ 2014-03-05 13:25 ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This series cleans up the PCI irq mapping for all
the ARM PCI host drivers, so they handle it in the
way defined in the common PCI bindings.

I've worked in all the feedback I received on the first
round of this series and left out the i.MX pcie driver
changes, as these need more work includig breaking
of the existing binding, which I'll send as a separate
series.

Lucas Stach (6):
  ARM: dts: tegra: add PCIe interrupt mapping properties
  PCI: tegra: use new OF interrupt mapping when possible
  PCI: rcar: use new OF interrupt mapping when possible
  ARM: dts: exynos5440: fix PCIe interrupt mapping
  ARM: dts: imx6: add PCIe interrupt mapping properties
  PCI: designware: use new OF interrupt mapping when possible

 .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt          |  8 ++++++++
 arch/arm/boot/dts/exynos5440.dtsi                            |  6 ++++--
 arch/arm/boot/dts/imx6qdl.dtsi                               |  8 ++++++++
 arch/arm/boot/dts/tegra20.dtsi                               |  4 ++++
 arch/arm/boot/dts/tegra30.dtsi                               |  4 ++++
 drivers/pci/host/pci-rcar-gen2.c                             | 12 +++++++++---
 drivers/pci/host/pci-tegra.c                                 |  7 ++++++-
 drivers/pci/host/pcie-designware.c                           | 12 +++++++++---
 8 files changed, 52 insertions(+), 9 deletions(-)

-- 
1.9.0


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

* [PATCH v2 0/6] PCI irq mapping fixes and cleanups
@ 2014-03-05 13:25 ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

This series cleans up the PCI irq mapping for all
the ARM PCI host drivers, so they handle it in the
way defined in the common PCI bindings.

I've worked in all the feedback I received on the first
round of this series and left out the i.MX pcie driver
changes, as these need more work includig breaking
of the existing binding, which I'll send as a separate
series.

Lucas Stach (6):
  ARM: dts: tegra: add PCIe interrupt mapping properties
  PCI: tegra: use new OF interrupt mapping when possible
  PCI: rcar: use new OF interrupt mapping when possible
  ARM: dts: exynos5440: fix PCIe interrupt mapping
  ARM: dts: imx6: add PCIe interrupt mapping properties
  PCI: designware: use new OF interrupt mapping when possible

 .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt          |  8 ++++++++
 arch/arm/boot/dts/exynos5440.dtsi                            |  6 ++++--
 arch/arm/boot/dts/imx6qdl.dtsi                               |  8 ++++++++
 arch/arm/boot/dts/tegra20.dtsi                               |  4 ++++
 arch/arm/boot/dts/tegra30.dtsi                               |  4 ++++
 drivers/pci/host/pci-rcar-gen2.c                             | 12 +++++++++---
 drivers/pci/host/pci-tegra.c                                 |  7 ++++++-
 drivers/pci/host/pcie-designware.c                           | 12 +++++++++---
 8 files changed, 52 insertions(+), 9 deletions(-)

-- 
1.9.0

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

* [PATCH v2 0/6] PCI irq mapping fixes and cleanups
@ 2014-03-05 13:25 ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This series cleans up the PCI irq mapping for all
the ARM PCI host drivers, so they handle it in the
way defined in the common PCI bindings.

I've worked in all the feedback I received on the first
round of this series and left out the i.MX pcie driver
changes, as these need more work includig breaking
of the existing binding, which I'll send as a separate
series.

Lucas Stach (6):
  ARM: dts: tegra: add PCIe interrupt mapping properties
  PCI: tegra: use new OF interrupt mapping when possible
  PCI: rcar: use new OF interrupt mapping when possible
  ARM: dts: exynos5440: fix PCIe interrupt mapping
  ARM: dts: imx6: add PCIe interrupt mapping properties
  PCI: designware: use new OF interrupt mapping when possible

 .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt          |  8 ++++++++
 arch/arm/boot/dts/exynos5440.dtsi                            |  6 ++++--
 arch/arm/boot/dts/imx6qdl.dtsi                               |  8 ++++++++
 arch/arm/boot/dts/tegra20.dtsi                               |  4 ++++
 arch/arm/boot/dts/tegra30.dtsi                               |  4 ++++
 drivers/pci/host/pci-rcar-gen2.c                             | 12 +++++++++---
 drivers/pci/host/pci-tegra.c                                 |  7 ++++++-
 drivers/pci/host/pcie-designware.c                           | 12 +++++++++---
 8 files changed, 52 insertions(+), 9 deletions(-)

-- 
1.9.0

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

* [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
  2014-03-05 13:25 ` Lucas Stach
  (?)
@ 2014-03-05 13:25   ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

Those are defined by the common PCI binding.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 8 ++++++++
 arch/arm/boot/dts/tegra20.dtsi                                | 4 ++++
 arch/arm/boot/dts/tegra30.dtsi                                | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
index 24cee06915c9..c300391e8d3e 100644
--- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
@@ -42,6 +42,10 @@ Required properties:
     - 0xc2000000: prefetchable memory region
   Please refer to the standard PCI bus binding document for a more detailed
   explanation.
+- #interrupt-cells: Size representation for interrupts (must be 1)
+- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
+  Please refer to the standard PCI bus binding document for a more detailed
+  explanation.
 - clocks: Must contain an entry for each entry in clock-names.
   See ../clocks/clock-bindings.txt for details.
 - clock-names: Must include the following entries:
@@ -86,6 +90,10 @@ SoC DTSI:
 		              0 99 0x04>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 480ecda3416b..52ef2cf0b142 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -552,6 +552,10 @@
 			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index ed8e7700b46d..e5ab7adbc28a 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -28,6 +28,10 @@
 			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-- 
1.9.0


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

* [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

Those are defined by the common PCI binding.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 8 ++++++++
 arch/arm/boot/dts/tegra20.dtsi                                | 4 ++++
 arch/arm/boot/dts/tegra30.dtsi                                | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
index 24cee06915c9..c300391e8d3e 100644
--- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
@@ -42,6 +42,10 @@ Required properties:
     - 0xc2000000: prefetchable memory region
   Please refer to the standard PCI bus binding document for a more detailed
   explanation.
+- #interrupt-cells: Size representation for interrupts (must be 1)
+- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
+  Please refer to the standard PCI bus binding document for a more detailed
+  explanation.
 - clocks: Must contain an entry for each entry in clock-names.
   See ../clocks/clock-bindings.txt for details.
 - clock-names: Must include the following entries:
@@ -86,6 +90,10 @@ SoC DTSI:
 		              0 99 0x04>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 480ecda3416b..52ef2cf0b142 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -552,6 +552,10 @@
 			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index ed8e7700b46d..e5ab7adbc28a 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -28,6 +28,10 @@
 			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-- 
1.9.0


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

* [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

Those are defined by the common PCI binding.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 8 ++++++++
 arch/arm/boot/dts/tegra20.dtsi                                | 4 ++++
 arch/arm/boot/dts/tegra30.dtsi                                | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
index 24cee06915c9..c300391e8d3e 100644
--- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
@@ -42,6 +42,10 @@ Required properties:
     - 0xc2000000: prefetchable memory region
   Please refer to the standard PCI bus binding document for a more detailed
   explanation.
+- #interrupt-cells: Size representation for interrupts (must be 1)
+- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
+  Please refer to the standard PCI bus binding document for a more detailed
+  explanation.
 - clocks: Must contain an entry for each entry in clock-names.
   See ../clocks/clock-bindings.txt for details.
 - clock-names: Must include the following entries:
@@ -86,6 +90,10 @@ SoC DTSI:
 		              0 99 0x04>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 480ecda3416b..52ef2cf0b142 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -552,6 +552,10 @@
 			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index ed8e7700b46d..e5ab7adbc28a 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -28,6 +28,10 @@
 			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
 		interrupt-names = "intr", "msi";
 
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
 		bus-range = <0x00 0xff>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-- 
1.9.0

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-03-05 13:25 ` Lucas Stach
  (?)
@ 2014-03-05 13:25   ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. For old devicetrees we fall back to the
previous practice.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pci/host/pci-tegra.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 330f7e3a32dd..083cf37ca047 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
 static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
 {
 	struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata);
+	int irq;
 
 	tegra_cpuidle_pcie_irqs_in_use();
 
-	return pcie->irq;
+	irq = of_irq_parse_and_map_pci(pdev, slot, pin);
+	if (!irq)
+		irq = pcie->irq;
+
+	return irq;
 }
 
 static void tegra_pcie_add_bus(struct pci_bus *bus)
-- 
1.9.0


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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

This is the recommended method of doing the IRQ
mapping. For old devicetrees we fall back to the
previous practice.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pci/host/pci-tegra.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 330f7e3a32dd..083cf37ca047 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
 static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
 {
 	struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata);
+	int irq;
 
 	tegra_cpuidle_pcie_irqs_in_use();
 
-	return pcie->irq;
+	irq = of_irq_parse_and_map_pci(pdev, slot, pin);
+	if (!irq)
+		irq = pcie->irq;
+
+	return irq;
 }
 
 static void tegra_pcie_add_bus(struct pci_bus *bus)
-- 
1.9.0


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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. For old devicetrees we fall back to the
previous practice.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pci/host/pci-tegra.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 330f7e3a32dd..083cf37ca047 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
 static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
 {
 	struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata);
+	int irq;
 
 	tegra_cpuidle_pcie_irqs_in_use();
 
-	return pcie->irq;
+	irq = of_irq_parse_and_map_pci(pdev, slot, pin);
+	if (!irq)
+		irq = pcie->irq;
+
+	return irq;
 }
 
 static void tegra_pcie_add_bus(struct pci_bus *bus)
-- 
1.9.0

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

* [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
  2014-03-05 13:25 ` Lucas Stach
  (?)
@ 2014-03-05 13:25   ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. Still fall back to the old method in order
to not break the just submitted board files.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2: pass in parent device to pci_common_init(), to
    make DT parsing work.
---
 drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index ceec147baec3..3a0914163ad0 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pci_sys_data *sys = dev->bus->sysdata;
 	struct rcar_pci_priv *priv = sys->private_data;
+	int irq;
+
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = priv->irq;
 
-	return priv->irq;
+	return irq;
 }
 
 /* PCI host controller setup */
@@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
 	void **private_data;
 	int count;
 
+	pci_common_init_dev(priv->dev, &rcar_hw_pci);
+
 	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
 		goto add_priv;
 
@@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
 	int retval;
 
 	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
-	if (!retval)
-		pci_common_init(&rcar_hw_pci);
 
 	/* Private data pointer array is not needed any more */
 	kfree(rcar_hw_pci.private_data);
-- 
1.9.0


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

* [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

This is the recommended method of doing the IRQ
mapping. Still fall back to the old method in order
to not break the just submitted board files.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2: pass in parent device to pci_common_init(), to
    make DT parsing work.
---
 drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index ceec147baec3..3a0914163ad0 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pci_sys_data *sys = dev->bus->sysdata;
 	struct rcar_pci_priv *priv = sys->private_data;
+	int irq;
+
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = priv->irq;
 
-	return priv->irq;
+	return irq;
 }
 
 /* PCI host controller setup */
@@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
 	void **private_data;
 	int count;
 
+	pci_common_init_dev(priv->dev, &rcar_hw_pci);
+
 	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
 		goto add_priv;
 
@@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
 	int retval;
 
 	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
-	if (!retval)
-		pci_common_init(&rcar_hw_pci);
 
 	/* Private data pointer array is not needed any more */
 	kfree(rcar_hw_pci.private_data);
-- 
1.9.0


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

* [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. Still fall back to the old method in order
to not break the just submitted board files.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2: pass in parent device to pci_common_init(), to
    make DT parsing work.
---
 drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index ceec147baec3..3a0914163ad0 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pci_sys_data *sys = dev->bus->sysdata;
 	struct rcar_pci_priv *priv = sys->private_data;
+	int irq;
+
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = priv->irq;
 
-	return priv->irq;
+	return irq;
 }
 
 /* PCI host controller setup */
@@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
 	void **private_data;
 	int count;
 
+	pci_common_init_dev(priv->dev, &rcar_hw_pci);
+
 	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
 		goto add_priv;
 
@@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
 	int retval;
 
 	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
-	if (!retval)
-		pci_common_init(&rcar_hw_pci);
 
 	/* Private data pointer array is not needed any more */
 	kfree(rcar_hw_pci.private_data);
-- 
1.9.0

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

* [PATCH v2 4/6] ARM: dts: exynos5440: fix PCIe interrupt mapping
  2014-03-05 13:25 ` Lucas Stach
  (?)
@ 2014-03-05 13:25   ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

So it actually works.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: fix build breakage by including arm-gic.h
---
 arch/arm/boot/dts/exynos5440.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 02a0a1226cef..7628e2edf1b6 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -9,6 +9,8 @@
  * published by the Free Software Foundation.
 */
 
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
 #include "skeleton.dtsi"
 
 / {
@@ -274,7 +276,7 @@
 			  0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
 		#interrupt-cells = <1>;
 		interrupt-map-mask = <0 0 0 0>;
-		interrupt-map = <0x0 0 &gic 53>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 		num-lanes = <4>;
 		status = "disabled";
 	};
@@ -295,7 +297,7 @@
 			  0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
 		#interrupt-cells = <1>;
 		interrupt-map-mask = <0 0 0 0>;
-		interrupt-map = <0x0 0 &gic 56>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 		num-lanes = <4>;
 		status = "disabled";
 	};
-- 
1.9.0


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

* [PATCH v2 4/6] ARM: dts: exynos5440: fix PCIe interrupt mapping
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

So it actually works.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: fix build breakage by including arm-gic.h
---
 arch/arm/boot/dts/exynos5440.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 02a0a1226cef..7628e2edf1b6 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -9,6 +9,8 @@
  * published by the Free Software Foundation.
 */
 
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
 #include "skeleton.dtsi"
 
 / {
@@ -274,7 +276,7 @@
 			  0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
 		#interrupt-cells = <1>;
 		interrupt-map-mask = <0 0 0 0>;
-		interrupt-map = <0x0 0 &gic 53>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 		num-lanes = <4>;
 		status = "disabled";
 	};
@@ -295,7 +297,7 @@
 			  0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
 		#interrupt-cells = <1>;
 		interrupt-map-mask = <0 0 0 0>;
-		interrupt-map = <0x0 0 &gic 56>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 		num-lanes = <4>;
 		status = "disabled";
 	};
-- 
1.9.0


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

* [PATCH v2 4/6] ARM: dts: exynos5440: fix PCIe interrupt mapping
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

So it actually works.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: fix build breakage by including arm-gic.h
---
 arch/arm/boot/dts/exynos5440.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 02a0a1226cef..7628e2edf1b6 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -9,6 +9,8 @@
  * published by the Free Software Foundation.
 */
 
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
 #include "skeleton.dtsi"
 
 / {
@@ -274,7 +276,7 @@
 			  0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
 		#interrupt-cells = <1>;
 		interrupt-map-mask = <0 0 0 0>;
-		interrupt-map = <0x0 0 &gic 53>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 		num-lanes = <4>;
 		status = "disabled";
 	};
@@ -295,7 +297,7 @@
 			  0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
 		#interrupt-cells = <1>;
 		interrupt-map-mask = <0 0 0 0>;
-		interrupt-map = <0x0 0 &gic 56>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 		num-lanes = <4>;
 		status = "disabled";
 	};
-- 
1.9.0

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

* [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties
  2014-03-05 13:25 ` Lucas Stach
  (?)
@ 2014-03-05 13:25   ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

As defined by the common PCI bindings.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: drop blank lines
---
 arch/arm/boot/dts/imx6qdl.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index fb28b2ecb1db..c1c06d25decc 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -10,6 +10,8 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
 #include "skeleton.dtsi"
 
 / {
@@ -127,6 +129,12 @@
 				  0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */
 			num-lanes = <1>;
 			interrupts = <0 123 0x04>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0x7>;
+			interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clks 189>, <&clks 187>, <&clks 206>, <&clks 144>;
 			clock-names = "pcie_ref_125m", "sata_ref_100m", "lvds_gate", "pcie_axi";
 			status = "disabled";
-- 
1.9.0


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

* [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

As defined by the common PCI bindings.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: drop blank lines
---
 arch/arm/boot/dts/imx6qdl.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index fb28b2ecb1db..c1c06d25decc 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -10,6 +10,8 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
 #include "skeleton.dtsi"
 
 / {
@@ -127,6 +129,12 @@
 				  0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */
 			num-lanes = <1>;
 			interrupts = <0 123 0x04>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0x7>;
+			interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clks 189>, <&clks 187>, <&clks 206>, <&clks 144>;
 			clock-names = "pcie_ref_125m", "sata_ref_100m", "lvds_gate", "pcie_axi";
 			status = "disabled";
-- 
1.9.0


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

* [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

As defined by the common PCI bindings.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: drop blank lines
---
 arch/arm/boot/dts/imx6qdl.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index fb28b2ecb1db..c1c06d25decc 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -10,6 +10,8 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
 #include "skeleton.dtsi"
 
 / {
@@ -127,6 +129,12 @@
 				  0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */
 			num-lanes = <1>;
 			interrupts = <0 123 0x04>;
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0x7>;
+			interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clks 189>, <&clks 187>, <&clks 206>, <&clks 144>;
 			clock-names = "pcie_ref_125m", "sata_ref_100m", "lvds_gate", "pcie_axi";
 			status = "disabled";
-- 
1.9.0

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
  2014-03-05 13:25 ` Lucas Stach
  (?)
@ 2014-03-05 13:25   ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. For old devicetrees we fall back to the
previous practice.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: pass in parent dev to relevant functions, to make DT parsing
    work (spotted by Tim Harvey <tharvey@gateworks.com>)
---
 drivers/pci/host/pcie-designware.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 17ce88f79d2b..98c118e04dba 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/msi.h>
 #include <linux/of_address.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/pci_regs.h>
 #include <linux/types.h>
@@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
 	dw_pci.nr_controllers = 1;
 	dw_pci.private_data = (void **)&pp;
 
-	pci_common_init(&dw_pci);
+	pci_common_init_dev(pp->dev, &dw_pci);
 	pci_assign_unassigned_resources();
 #ifdef CONFIG_PCI_DOMAINS
 	dw_pci.domain++;
@@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
 
 	if (pp) {
 		pp->root_bus_nr = sys->busnr;
-		bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops,
+		bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops,
 					sys, &sys->resources);
 	} else {
 		bus = NULL;
@@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
 static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
+	int irq;
 
-	return pp->irq;
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = pp->irq;
+
+	return irq;
 }
 
 static void dw_pcie_add_bus(struct pci_bus *bus)
-- 
1.9.0


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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

This is the recommended method of doing the IRQ
mapping. For old devicetrees we fall back to the
previous practice.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: pass in parent dev to relevant functions, to make DT parsing
    work (spotted by Tim Harvey <tharvey@gateworks.com>)
---
 drivers/pci/host/pcie-designware.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 17ce88f79d2b..98c118e04dba 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/msi.h>
 #include <linux/of_address.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/pci_regs.h>
 #include <linux/types.h>
@@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
 	dw_pci.nr_controllers = 1;
 	dw_pci.private_data = (void **)&pp;
 
-	pci_common_init(&dw_pci);
+	pci_common_init_dev(pp->dev, &dw_pci);
 	pci_assign_unassigned_resources();
 #ifdef CONFIG_PCI_DOMAINS
 	dw_pci.domain++;
@@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
 
 	if (pp) {
 		pp->root_bus_nr = sys->busnr;
-		bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops,
+		bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops,
 					sys, &sys->resources);
 	} else {
 		bus = NULL;
@@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
 static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
+	int irq;
 
-	return pp->irq;
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = pp->irq;
+
+	return irq;
 }
 
 static void dw_pcie_add_bus(struct pci_bus *bus)
-- 
1.9.0


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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-05 13:25   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-05 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. For old devicetrees we fall back to the
previous practice.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v2: pass in parent dev to relevant functions, to make DT parsing
    work (spotted by Tim Harvey <tharvey@gateworks.com>)
---
 drivers/pci/host/pcie-designware.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 17ce88f79d2b..98c118e04dba 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/msi.h>
 #include <linux/of_address.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/pci_regs.h>
 #include <linux/types.h>
@@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
 	dw_pci.nr_controllers = 1;
 	dw_pci.private_data = (void **)&pp;
 
-	pci_common_init(&dw_pci);
+	pci_common_init_dev(pp->dev, &dw_pci);
 	pci_assign_unassigned_resources();
 #ifdef CONFIG_PCI_DOMAINS
 	dw_pci.domain++;
@@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
 
 	if (pp) {
 		pp->root_bus_nr = sys->busnr;
-		bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops,
+		bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops,
 					sys, &sys->resources);
 	} else {
 		bus = NULL;
@@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
 static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
+	int irq;
 
-	return pp->irq;
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = pp->irq;
+
+	return irq;
 }
 
 static void dw_pcie_add_bus(struct pci_bus *bus)
-- 
1.9.0

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
  2014-03-05 13:25   ` Lucas Stach
  (?)
@ 2014-03-05 18:42     ` Jason Gunthorpe
  -1 siblings, 0 replies; 118+ messages in thread
From: Jason Gunthorpe @ 2014-03-05 18:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> -	return pp->irq;
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = pp->irq;

In light of the two bugs that Tim found, it might be wise to throw a
'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
path, so it doesn't continue to silently cover up errors on the OF/DT
side..

Regards,
Jason

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-05 18:42     ` Jason Gunthorpe
  0 siblings, 0 replies; 118+ messages in thread
From: Jason Gunthorpe @ 2014-03-05 18:42 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, devicetree, linux-samsung-soc, Arnd Bergmann,
	Stephen Warren, linux-sh, linux-pci, Jingoo Han, Bjorn Helgaas,
	Simon Horman, Thierry Reding, Ben Dooks, linux-tegra, Kukjin Kim,
	Shawn Guo, kernel

On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> -	return pp->irq;
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = pp->irq;

In light of the two bugs that Tim found, it might be wise to throw a
'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
path, so it doesn't continue to silently cover up errors on the OF/DT
side..

Regards,
Jason

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-05 18:42     ` Jason Gunthorpe
  0 siblings, 0 replies; 118+ messages in thread
From: Jason Gunthorpe @ 2014-03-05 18:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> -	return pp->irq;
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = pp->irq;

In light of the two bugs that Tim found, it might be wise to throw a
'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
path, so it doesn't continue to silently cover up errors on the OF/DT
side..

Regards,
Jason

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

* Re: [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-05 21:55     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-05 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> Those are defined by the common PCI binding.

It sounds like there's no dependency between pathces 1/6 and 2/6, so I
should apply 1/6 to the Tegra tree, and Bjorn apply 2/6 to the PCI tree?

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

* Re: [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-05 21:55     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-05 21:55 UTC (permalink / raw)
  To: Lucas Stach, Bjorn Helgaas
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Jingoo Han, Simon Horman,
	Shawn Guo, Ben Dooks, Kukjin Kim, Thierry Reding, Arnd Bergmann,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> Those are defined by the common PCI binding.

It sounds like there's no dependency between pathces 1/6 and 2/6, so I
should apply 1/6 to the Tegra tree, and Bjorn apply 2/6 to the PCI tree?

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

* Re: [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-05 21:55     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-05 21:55 UTC (permalink / raw)
  To: Lucas Stach, Bjorn Helgaas
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Simon Horman, Shawn Guo,
	Ben Dooks, Kukjin Kim, Thierry Reding, Arnd Bergmann, kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> Those are defined by the common PCI binding.

It sounds like there's no dependency between pathces 1/6 and 2/6, so I
should apply 1/6 to the Tegra tree, and Bjorn apply 2/6 to the PCI tree?

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

* [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-05 21:55     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-05 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> Those are defined by the common PCI binding.

It sounds like there's no dependency between pathces 1/6 and 2/6, so I
should apply 1/6 to the Tegra tree, and Bjorn apply 2/6 to the PCI tree?

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

* Re: [PATCH v2 4/6] ARM: dts: exynos5440: fix PCIe interrupt mapping
  2014-03-05 13:25   ` Lucas Stach
  (?)
@ 2014-03-06  2:38     ` Jingoo Han
  -1 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-06  2:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> 
> So it actually works.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Jingoo Han <jg1.han@samsung.com>

It works properly on Exynos platform.
Thank you.

Best regards,
Jingoo Han

> ---
> v2: fix build breakage by including arm-gic.h
> ---
>  arch/arm/boot/dts/exynos5440.dtsi | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
> index 02a0a1226cef..7628e2edf1b6 100644
> --- a/arch/arm/boot/dts/exynos5440.dtsi
> +++ b/arch/arm/boot/dts/exynos5440.dtsi
> @@ -9,6 +9,8 @@
>   * published by the Free Software Foundation.
>  */
> 
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +
>  #include "skeleton.dtsi"
> 
>  / {
> @@ -274,7 +276,7 @@
>  			  0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
>  		#interrupt-cells = <1>;
>  		interrupt-map-mask = <0 0 0 0>;
> -		interrupt-map = <0x0 0 &gic 53>;
> +		interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		num-lanes = <4>;
>  		status = "disabled";
>  	};
> @@ -295,7 +297,7 @@
>  			  0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
>  		#interrupt-cells = <1>;
>  		interrupt-map-mask = <0 0 0 0>;
> -		interrupt-map = <0x0 0 &gic 56>;
> +		interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>  		num-lanes = <4>;
>  		status = "disabled";
>  	};
> --
> 1.9.0


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

* Re: [PATCH v2 4/6] ARM: dts: exynos5440: fix PCIe interrupt mapping
@ 2014-03-06  2:38     ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-06  2:38 UTC (permalink / raw)
  To: 'Lucas Stach', linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	'Bjorn Helgaas', 'Simon Horman',
	'Shawn Guo', 'Stephen Warren',
	'Ben Dooks', 'Kukjin Kim',
	'Thierry Reding', 'Arnd Bergmann',
	kernel, 'Jingoo Han'

On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> 
> So it actually works.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Jingoo Han <jg1.han@samsung.com>

It works properly on Exynos platform.
Thank you.

Best regards,
Jingoo Han

> ---
> v2: fix build breakage by including arm-gic.h
> ---
>  arch/arm/boot/dts/exynos5440.dtsi | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
> index 02a0a1226cef..7628e2edf1b6 100644
> --- a/arch/arm/boot/dts/exynos5440.dtsi
> +++ b/arch/arm/boot/dts/exynos5440.dtsi
> @@ -9,6 +9,8 @@
>   * published by the Free Software Foundation.
>  */
> 
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +
>  #include "skeleton.dtsi"
> 
>  / {
> @@ -274,7 +276,7 @@
>  			  0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
>  		#interrupt-cells = <1>;
>  		interrupt-map-mask = <0 0 0 0>;
> -		interrupt-map = <0x0 0 &gic 53>;
> +		interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		num-lanes = <4>;
>  		status = "disabled";
>  	};
> @@ -295,7 +297,7 @@
>  			  0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
>  		#interrupt-cells = <1>;
>  		interrupt-map-mask = <0 0 0 0>;
> -		interrupt-map = <0x0 0 &gic 56>;
> +		interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>  		num-lanes = <4>;
>  		status = "disabled";
>  	};
> --
> 1.9.0


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

* [PATCH v2 4/6] ARM: dts: exynos5440: fix PCIe interrupt mapping
@ 2014-03-06  2:38     ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-06  2:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> 
> So it actually works.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Jingoo Han <jg1.han@samsung.com>

It works properly on Exynos platform.
Thank you.

Best regards,
Jingoo Han

> ---
> v2: fix build breakage by including arm-gic.h
> ---
>  arch/arm/boot/dts/exynos5440.dtsi | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
> index 02a0a1226cef..7628e2edf1b6 100644
> --- a/arch/arm/boot/dts/exynos5440.dtsi
> +++ b/arch/arm/boot/dts/exynos5440.dtsi
> @@ -9,6 +9,8 @@
>   * published by the Free Software Foundation.
>  */
> 
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +
>  #include "skeleton.dtsi"
> 
>  / {
> @@ -274,7 +276,7 @@
>  			  0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
>  		#interrupt-cells = <1>;
>  		interrupt-map-mask = <0 0 0 0>;
> -		interrupt-map = <0x0 0 &gic 53>;
> +		interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>  		num-lanes = <4>;
>  		status = "disabled";
>  	};
> @@ -295,7 +297,7 @@
>  			  0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
>  		#interrupt-cells = <1>;
>  		interrupt-map-mask = <0 0 0 0>;
> -		interrupt-map = <0x0 0 &gic 56>;
> +		interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>  		num-lanes = <4>;
>  		status = "disabled";
>  	};
> --
> 1.9.0

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
  2014-03-05 13:25   ` Lucas Stach
  (?)
@ 2014-03-06  2:47     ` Jingoo Han
  -1 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-06  2:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> 
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

(+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
       Kishon Vijay Abraham I)

Acked-by: Jingoo Han <jg1.han@samsung.com>

It works properly on Exynos platform.
Thank you.

Best regards,
Jingoo Han

> ---
> v2: pass in parent dev to relevant functions, to make DT parsing
>     work (spotted by Tim Harvey <tharvey@gateworks.com>)
> ---
>  drivers/pci/host/pcie-designware.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 17ce88f79d2b..98c118e04dba 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -17,6 +17,7 @@
>  #include <linux/module.h>
>  #include <linux/msi.h>
>  #include <linux/of_address.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/pci_regs.h>
>  #include <linux/types.h>
> @@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
>  	dw_pci.nr_controllers = 1;
>  	dw_pci.private_data = (void **)&pp;
> 
> -	pci_common_init(&dw_pci);
> +	pci_common_init_dev(pp->dev, &dw_pci);
>  	pci_assign_unassigned_resources();
>  #ifdef CONFIG_PCI_DOMAINS
>  	dw_pci.domain++;
> @@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
> 
>  	if (pp) {
>  		pp->root_bus_nr = sys->busnr;
> -		bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops,
> +		bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops,
>  					sys, &sys->resources);
>  	} else {
>  		bus = NULL;
> @@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
>  static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
> +	int irq;
> 
> -	return pp->irq;
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = pp->irq;
> +
> +	return irq;
>  }
> 
>  static void dw_pcie_add_bus(struct pci_bus *bus)
> --
> 1.9.0


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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-06  2:47     ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-06  2:47 UTC (permalink / raw)
  To: 'Lucas Stach', linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	'Bjorn Helgaas', 'Simon Horman',
	'Shawn Guo', 'Stephen Warren',
	'Ben Dooks', 'Kukjin Kim',
	'Thierry Reding', 'Arnd Bergmann',
	kernel, 'Jingoo Han', 'Mohit KUMAR DCG',
	'Pratyush Anand', 'Richard Zhu',
	'Marek Vasut', 'Kishon Vijay Abraham I'

On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> 
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

(+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
       Kishon Vijay Abraham I)

Acked-by: Jingoo Han <jg1.han@samsung.com>

It works properly on Exynos platform.
Thank you.

Best regards,
Jingoo Han

> ---
> v2: pass in parent dev to relevant functions, to make DT parsing
>     work (spotted by Tim Harvey <tharvey@gateworks.com>)
> ---
>  drivers/pci/host/pcie-designware.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 17ce88f79d2b..98c118e04dba 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -17,6 +17,7 @@
>  #include <linux/module.h>
>  #include <linux/msi.h>
>  #include <linux/of_address.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/pci_regs.h>
>  #include <linux/types.h>
> @@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
>  	dw_pci.nr_controllers = 1;
>  	dw_pci.private_data = (void **)&pp;
> 
> -	pci_common_init(&dw_pci);
> +	pci_common_init_dev(pp->dev, &dw_pci);
>  	pci_assign_unassigned_resources();
>  #ifdef CONFIG_PCI_DOMAINS
>  	dw_pci.domain++;
> @@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
> 
>  	if (pp) {
>  		pp->root_bus_nr = sys->busnr;
> -		bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops,
> +		bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops,
>  					sys, &sys->resources);
>  	} else {
>  		bus = NULL;
> @@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
>  static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
> +	int irq;
> 
> -	return pp->irq;
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = pp->irq;
> +
> +	return irq;
>  }
> 
>  static void dw_pcie_add_bus(struct pci_bus *bus)
> --
> 1.9.0

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-06  2:47     ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-06  2:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> 
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

(+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
       Kishon Vijay Abraham I)

Acked-by: Jingoo Han <jg1.han@samsung.com>

It works properly on Exynos platform.
Thank you.

Best regards,
Jingoo Han

> ---
> v2: pass in parent dev to relevant functions, to make DT parsing
>     work (spotted by Tim Harvey <tharvey@gateworks.com>)
> ---
>  drivers/pci/host/pcie-designware.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 17ce88f79d2b..98c118e04dba 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -17,6 +17,7 @@
>  #include <linux/module.h>
>  #include <linux/msi.h>
>  #include <linux/of_address.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/pci_regs.h>
>  #include <linux/types.h>
> @@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
>  	dw_pci.nr_controllers = 1;
>  	dw_pci.private_data = (void **)&pp;
> 
> -	pci_common_init(&dw_pci);
> +	pci_common_init_dev(pp->dev, &dw_pci);
>  	pci_assign_unassigned_resources();
>  #ifdef CONFIG_PCI_DOMAINS
>  	dw_pci.domain++;
> @@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
> 
>  	if (pp) {
>  		pp->root_bus_nr = sys->busnr;
> -		bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops,
> +		bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops,
>  					sys, &sys->resources);
>  	} else {
>  		bus = NULL;
> @@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
>  static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
> +	int irq;
> 
> -	return pp->irq;
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = pp->irq;
> +
> +	return irq;
>  }
> 
>  static void dw_pcie_add_bus(struct pci_bus *bus)
> --
> 1.9.0

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

* Re: [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
  2014-03-05 13:25   ` Lucas Stach
  (?)
@ 2014-03-06  4:12     ` Simon Horman
  -1 siblings, 0 replies; 118+ messages in thread
From: Simon Horman @ 2014-03-06  4:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:48PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. Still fall back to the old method in order
> to not break the just submitted board files.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Assuming that it does what it says on the wrapper:

Acked-by: Simon Horman <horms+renesas@verge.net.au>


> ---
> v2: pass in parent device to pci_common_init(), to
>     make DT parsing work.
> ---
>  drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147baec3..3a0914163ad0 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -15,6 +15,7 @@
>  #include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pci_sys_data *sys = dev->bus->sysdata;
>  	struct rcar_pci_priv *priv = sys->private_data;
> +	int irq;
> +
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = priv->irq;
>  
> -	return priv->irq;
> +	return irq;
>  }
>  
>  /* PCI host controller setup */
> @@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
>  	void **private_data;
>  	int count;
>  
> +	pci_common_init_dev(priv->dev, &rcar_hw_pci);
> +
>  	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
>  		goto add_priv;
>  
> @@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
>  	int retval;
>  
>  	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
> -	if (!retval)
> -		pci_common_init(&rcar_hw_pci);
>  
>  	/* Private data pointer array is not needed any more */
>  	kfree(rcar_hw_pci.private_data);
> -- 
> 1.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-03-06  4:12     ` Simon Horman
  0 siblings, 0 replies; 118+ messages in thread
From: Simon Horman @ 2014-03-06  4:12 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Bjorn Helgaas, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

On Wed, Mar 05, 2014 at 02:25:48PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. Still fall back to the old method in order
> to not break the just submitted board files.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Assuming that it does what it says on the wrapper:

Acked-by: Simon Horman <horms+renesas@verge.net.au>


> ---
> v2: pass in parent device to pci_common_init(), to
>     make DT parsing work.
> ---
>  drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147baec3..3a0914163ad0 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -15,6 +15,7 @@
>  #include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pci_sys_data *sys = dev->bus->sysdata;
>  	struct rcar_pci_priv *priv = sys->private_data;
> +	int irq;
> +
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = priv->irq;
>  
> -	return priv->irq;
> +	return irq;
>  }
>  
>  /* PCI host controller setup */
> @@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
>  	void **private_data;
>  	int count;
>  
> +	pci_common_init_dev(priv->dev, &rcar_hw_pci);
> +
>  	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
>  		goto add_priv;
>  
> @@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
>  	int retval;
>  
>  	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
> -	if (!retval)
> -		pci_common_init(&rcar_hw_pci);
>  
>  	/* Private data pointer array is not needed any more */
>  	kfree(rcar_hw_pci.private_data);
> -- 
> 1.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-03-06  4:12     ` Simon Horman
  0 siblings, 0 replies; 118+ messages in thread
From: Simon Horman @ 2014-03-06  4:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:48PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. Still fall back to the old method in order
> to not break the just submitted board files.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Assuming that it does what it says on the wrapper:

Acked-by: Simon Horman <horms+renesas@verge.net.au>


> ---
> v2: pass in parent device to pci_common_init(), to
>     make DT parsing work.
> ---
>  drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147baec3..3a0914163ad0 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -15,6 +15,7 @@
>  #include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pci_sys_data *sys = dev->bus->sysdata;
>  	struct rcar_pci_priv *priv = sys->private_data;
> +	int irq;
> +
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = priv->irq;
>  
> -	return priv->irq;
> +	return irq;
>  }
>  
>  /* PCI host controller setup */
> @@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
>  	void **private_data;
>  	int count;
>  
> +	pci_common_init_dev(priv->dev, &rcar_hw_pci);
> +
>  	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
>  		goto add_priv;
>  
> @@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
>  	int retval;
>  
>  	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
> -	if (!retval)
> -		pci_common_init(&rcar_hw_pci);
>  
>  	/* Private data pointer array is not needed any more */
>  	kfree(rcar_hw_pci.private_data);
> -- 
> 1.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
  2014-03-05 21:55     ` Stephen Warren
  (?)
@ 2014-03-06  9:33       ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-06  9:33 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, den 05.03.2014, 14:55 -0700 schrieb Stephen Warren:
> On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > Those are defined by the common PCI binding.
> 
> It sounds like there's no dependency between pathces 1/6 and 2/6, so I
> should apply 1/6 to the Tegra tree, and Bjorn apply 2/6 to the PCI tree?

Right, that's why I split the patches between driver and DT changes. As
this change should be fully backward compatible to old DTs there
shouldn't be any harm.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* Re: [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-06  9:33       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-06  9:33 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Bjorn Helgaas, devicetree, linux-samsung-soc, kernel,
	Arnd Bergmann, linux-sh, linux-pci, Jingoo Han, Simon Horman,
	Thierry Reding, Ben Dooks, linux-tegra, Kukjin Kim, Shawn Guo,
	linux-arm-kernel

Am Mittwoch, den 05.03.2014, 14:55 -0700 schrieb Stephen Warren:
> On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > Those are defined by the common PCI binding.
> 
> It sounds like there's no dependency between pathces 1/6 and 2/6, so I
> should apply 1/6 to the Tegra tree, and Bjorn apply 2/6 to the PCI tree?

Right, that's why I split the patches between driver and DT changes. As
this change should be fully backward compatible to old DTs there
shouldn't be any harm.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-06  9:33       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-06  9:33 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, den 05.03.2014, 14:55 -0700 schrieb Stephen Warren:
> On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > Those are defined by the common PCI binding.
> 
> It sounds like there's no dependency between pathces 1/6 and 2/6, so I
> should apply 1/6 to the Tegra tree, and Bjorn apply 2/6 to the PCI tree?

Right, that's why I split the patches between driver and DT changes. As
this change should be fully backward compatible to old DTs there
shouldn't be any harm.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-06 15:33       ` Marek Vasut
  0 siblings, 0 replies; 118+ messages in thread
From: Marek Vasut @ 2014-03-06 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>        Kishon Vijay Abraham I)
> 
> Acked-by: Jingoo Han <jg1.han@samsung.com>
> 
> It works properly on Exynos platform.
> Thank you.

Looks reasonable,

Reviewed-by: Marek Vasut <marex@denx.de>

+CC Troy if he wants to test it on SL/N6X .

Best regards,
Marek Vasut

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-06 15:33       ` Marek Vasut
  0 siblings, 0 replies; 118+ messages in thread
From: Marek Vasut @ 2014-03-06 15:33 UTC (permalink / raw)
  To: Jingoo Han, Troy Kisky
  Cc: 'Lucas Stach',
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, 'Bjorn Helgaas',
	'Simon Horman', 'Shawn Guo',
	'Stephen Warren', 'Ben Dooks',
	'Kukjin Kim', 'Thierry Reding',
	'Arnd Bergmann',
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, 'Mohit KUMAR DCG',
	'Pratyush Anand', 'Richard Zhu',
	'Kishon Vijay Abraham I'

On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> > 
> > Signed-off-by: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> 
> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>        Kishon Vijay Abraham I)
> 
> Acked-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> 
> It works properly on Exynos platform.
> Thank you.

Looks reasonable,

Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>

+CC Troy if he wants to test it on SL/N6X .

Best regards,
Marek Vasut

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-06 15:33       ` Marek Vasut
  0 siblings, 0 replies; 118+ messages in thread
From: Marek Vasut @ 2014-03-06 15:33 UTC (permalink / raw)
  To: Jingoo Han, Troy Kisky
  Cc: 'Lucas Stach',
	linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, 'Bjorn Helgaas',
	'Simon Horman', 'Shawn Guo',
	'Stephen Warren', 'Ben Dooks',
	'Kukjin Kim', 'Thierry Reding',
	'Arnd Bergmann', kernel, 'Mohit KUMAR DCG',
	'Pratyush Anand', 'Richard Zhu',
	'Kishon Vijay Abraham I'

On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>        Kishon Vijay Abraham I)
> 
> Acked-by: Jingoo Han <jg1.han@samsung.com>
> 
> It works properly on Exynos platform.
> Thank you.

Looks reasonable,

Reviewed-by: Marek Vasut <marex@denx.de>

+CC Troy if he wants to test it on SL/N6X .

Best regards,
Marek Vasut

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-06 15:33       ` Marek Vasut
  0 siblings, 0 replies; 118+ messages in thread
From: Marek Vasut @ 2014-03-06 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>        Kishon Vijay Abraham I)
> 
> Acked-by: Jingoo Han <jg1.han@samsung.com>
> 
> It works properly on Exynos platform.
> Thank you.

Looks reasonable,

Reviewed-by: Marek Vasut <marex@denx.de>

+CC Troy if he wants to test it on SL/N6X .

Best regards,
Marek Vasut

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-03-05 13:25   ` Lucas Stach
  (?)
@ 2014-03-06 17:36     ` Stephen Warren
  -1 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-06 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.

Tested-by: Stephen Warren <swarren@nvidia.com>

I tested both with and without patch 1/6, and the PCIe-based NIC on
Beaver worked fine either way. Without patch 1/6, I do see:

pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22

... but that seems reasonable given that the DT that of_irq_parse_pci()
parses is missing, and did correctly trigger the fallback path, so
everything still worked.

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-06 17:36     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-06 17:36 UTC (permalink / raw)
  To: Lucas Stach, linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo, Ben Dooks,
	Kukjin Kim, Thierry Reding, Arnd Bergmann, kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.

Tested-by: Stephen Warren <swarren@nvidia.com>

I tested both with and without patch 1/6, and the PCIe-based NIC on
Beaver worked fine either way. Without patch 1/6, I do see:

pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22

... but that seems reasonable given that the DT that of_irq_parse_pci()
parses is missing, and did correctly trigger the fallback path, so
everything still worked.

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-06 17:36     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-06 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.

Tested-by: Stephen Warren <swarren@nvidia.com>

I tested both with and without patch 1/6, and the PCIe-based NIC on
Beaver worked fine either way. Without patch 1/6, I do see:

pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22

... but that seems reasonable given that the DT that of_irq_parse_pci()
parses is missing, and did correctly trigger the fallback path, so
everything still worked.

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-03-06 17:36     ` Stephen Warren
  (?)
@ 2014-03-06 17:39       ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-06 17:39 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> 
> Tested-by: Stephen Warren <swarren@nvidia.com>
> 
> I tested both with and without patch 1/6, and the PCIe-based NIC on
> Beaver worked fine either way. Without patch 1/6, I do see:
> 
> pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> 
> ... but that seems reasonable given that the DT that of_irq_parse_pci()
> parses is missing, and did correctly trigger the fallback path, so
> everything still worked.

Yes, this should be normal. It spits this error for old DTs, but keeps
doing the right thing. I'm not sure if we should downgrade this to info
or dbg.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-06 17:39       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-06 17:39 UTC (permalink / raw)
  To: Stephen Warren
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Bjorn Helgaas, Simon Horman,
	Shawn Guo, Ben Dooks, Kukjin Kim, Thierry Reding, Arnd Bergmann,
	kernel

Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> 
> Tested-by: Stephen Warren <swarren@nvidia.com>
> 
> I tested both with and without patch 1/6, and the PCIe-based NIC on
> Beaver worked fine either way. Without patch 1/6, I do see:
> 
> pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> 
> ... but that seems reasonable given that the DT that of_irq_parse_pci()
> parses is missing, and did correctly trigger the fallback path, so
> everything still worked.

Yes, this should be normal. It spits this error for old DTs, but keeps
doing the right thing. I'm not sure if we should downgrade this to info
or dbg.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-06 17:39       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-06 17:39 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> 
> Tested-by: Stephen Warren <swarren@nvidia.com>
> 
> I tested both with and without patch 1/6, and the PCIe-based NIC on
> Beaver worked fine either way. Without patch 1/6, I do see:
> 
> pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> 
> ... but that seems reasonable given that the DT that of_irq_parse_pci()
> parses is missing, and did correctly trigger the fallback path, so
> everything still worked.

Yes, this should be normal. It spits this error for old DTs, but keeps
doing the right thing. I'm not sure if we should downgrade this to info
or dbg.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
  2014-03-05 13:25   ` Lucas Stach
  (?)
@ 2014-03-06 17:41     ` Stephen Warren
  -1 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-06 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> Those are defined by the common PCI binding.

I've applied this to Tegra's for-3.15/dt branch.

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

* Re: [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-06 17:41     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-06 17:41 UTC (permalink / raw)
  To: Lucas Stach, linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo, Ben Dooks,
	Kukjin Kim, Thierry Reding, Arnd Bergmann, kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> Those are defined by the common PCI binding.

I've applied this to Tegra's for-3.15/dt branch.

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

* [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties
@ 2014-03-06 17:41     ` Stephen Warren
  0 siblings, 0 replies; 118+ messages in thread
From: Stephen Warren @ 2014-03-06 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/05/2014 06:25 AM, Lucas Stach wrote:
> Those are defined by the common PCI binding.

I've applied this to Tegra's for-3.15/dt branch.

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-07  0:25         ` Arnd Bergmann
  0 siblings, 0 replies; 118+ messages in thread
From: Arnd Bergmann @ 2014-03-07  0:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 06 March 2014, Lucas Stach wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> > On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > > This is the recommended method of doing the IRQ
> > > mapping. For old devicetrees we fall back to the
> > > previous practice.
> > 
> > Tested-by: Stephen Warren <swarren@nvidia.com>
> > 
> > I tested both with and without patch 1/6, and the PCIe-based NIC on
> > Beaver worked fine either way. Without patch 1/6, I do see:
> > 
> > pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> > 
> > ... but that seems reasonable given that the DT that of_irq_parse_pci()
> > parses is missing, and did correctly trigger the fallback path, so
> > everything still worked.
> 
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

No, I think printing an error like this is appropriate: it is an incentive
to update the dts files, but doesn't look too urgent as long as everything
still works.

	Arnd

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-07  0:25         ` Arnd Bergmann
  0 siblings, 0 replies; 118+ messages in thread
From: Arnd Bergmann @ 2014-03-07  0:25 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Stephen Warren,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Jingoo Han, Bjorn Helgaas,
	Simon Horman, Shawn Guo, Ben Dooks, Kukjin Kim, Thierry Reding,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ

On Thursday 06 March 2014, Lucas Stach wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> > On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > > This is the recommended method of doing the IRQ
> > > mapping. For old devicetrees we fall back to the
> > > previous practice.
> > 
> > Tested-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > 
> > I tested both with and without patch 1/6, and the PCIe-based NIC on
> > Beaver worked fine either way. Without patch 1/6, I do see:
> > 
> > pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> > 
> > ... but that seems reasonable given that the DT that of_irq_parse_pci()
> > parses is missing, and did correctly trigger the fallback path, so
> > everything still worked.
> 
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

No, I think printing an error like this is appropriate: it is an incentive
to update the dts files, but doesn't look too urgent as long as everything
still works.

	Arnd

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-07  0:25         ` Arnd Bergmann
  0 siblings, 0 replies; 118+ messages in thread
From: Arnd Bergmann @ 2014-03-07  0:25 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Stephen Warren, linux-arm-kernel, linux-sh, linux-samsung-soc,
	linux-tegra, linux-pci, devicetree, Jingoo Han, Bjorn Helgaas,
	Simon Horman, Shawn Guo, Ben Dooks, Kukjin Kim, Thierry Reding,
	kernel

On Thursday 06 March 2014, Lucas Stach wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> > On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > > This is the recommended method of doing the IRQ
> > > mapping. For old devicetrees we fall back to the
> > > previous practice.
> > 
> > Tested-by: Stephen Warren <swarren@nvidia.com>
> > 
> > I tested both with and without patch 1/6, and the PCIe-based NIC on
> > Beaver worked fine either way. Without patch 1/6, I do see:
> > 
> > pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> > 
> > ... but that seems reasonable given that the DT that of_irq_parse_pci()
> > parses is missing, and did correctly trigger the fallback path, so
> > everything still worked.
> 
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

No, I think printing an error like this is appropriate: it is an incentive
to update the dts files, but doesn't look too urgent as long as everything
still works.

	Arnd

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-07  0:25         ` Arnd Bergmann
  0 siblings, 0 replies; 118+ messages in thread
From: Arnd Bergmann @ 2014-03-07  0:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 06 March 2014, Lucas Stach wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> > On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > > This is the recommended method of doing the IRQ
> > > mapping. For old devicetrees we fall back to the
> > > previous practice.
> > 
> > Tested-by: Stephen Warren <swarren@nvidia.com>
> > 
> > I tested both with and without patch 1/6, and the PCIe-based NIC on
> > Beaver worked fine either way. Without patch 1/6, I do see:
> > 
> > pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> > 
> > ... but that seems reasonable given that the DT that of_irq_parse_pci()
> > parses is missing, and did correctly trigger the fallback path, so
> > everything still worked.
> 
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

No, I think printing an error like this is appropriate: it is an incentive
to update the dts files, but doesn't look too urgent as long as everything
still works.

	Arnd

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-03-07  0:25         ` Arnd Bergmann
  (?)
@ 2014-03-07  3:31           ` Jingoo Han
  -1 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-07  3:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, March 07, 2014 9:25 AM, Arnd Bergmann wrote:
> On Thursday 06 March 2014, Lucas Stach wrote:
> > Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> > > On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > > > This is the recommended method of doing the IRQ
> > > > mapping. For old devicetrees we fall back to the
> > > > previous practice.
> > >
> > > Tested-by: Stephen Warren <swarren@nvidia.com>
> > >
> > > I tested both with and without patch 1/6, and the PCIe-based NIC on
> > > Beaver worked fine either way. Without patch 1/6, I do see:
> > >
> > > pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> > >
> > > ... but that seems reasonable given that the DT that of_irq_parse_pci()
> > > parses is missing, and did correctly trigger the fallback path, so
> > > everything still worked.
> >
> > Yes, this should be normal. It spits this error for old DTs, but keeps
> > doing the right thing. I'm not sure if we should downgrade this to info
> > or dbg.
> 
> No, I think printing an error like this is appropriate: it is an incentive
> to update the dts files, but doesn't look too urgent as long as everything
> still works.

+1

I agree with Arnd's opinion. I think that all dts files should be
updated properly. This error message can be the good way to do it.
Thank you.

Best regards,
Jingoo Han


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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-07  3:31           ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-07  3:31 UTC (permalink / raw)
  To: 'Arnd Bergmann', 'Lucas Stach'
  Cc: 'Stephen Warren',
	linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, 'Bjorn Helgaas',
	'Simon Horman', 'Shawn Guo', 'Ben Dooks',
	'Kukjin Kim', 'Thierry Reding',
	kernel, 'Jingoo Han'

On Friday, March 07, 2014 9:25 AM, Arnd Bergmann wrote:
> On Thursday 06 March 2014, Lucas Stach wrote:
> > Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> > > On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > > > This is the recommended method of doing the IRQ
> > > > mapping. For old devicetrees we fall back to the
> > > > previous practice.
> > >
> > > Tested-by: Stephen Warren <swarren@nvidia.com>
> > >
> > > I tested both with and without patch 1/6, and the PCIe-based NIC on
> > > Beaver worked fine either way. Without patch 1/6, I do see:
> > >
> > > pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> > >
> > > ... but that seems reasonable given that the DT that of_irq_parse_pci()
> > > parses is missing, and did correctly trigger the fallback path, so
> > > everything still worked.
> >
> > Yes, this should be normal. It spits this error for old DTs, but keeps
> > doing the right thing. I'm not sure if we should downgrade this to info
> > or dbg.
> 
> No, I think printing an error like this is appropriate: it is an incentive
> to update the dts files, but doesn't look too urgent as long as everything
> still works.

+1

I agree with Arnd's opinion. I think that all dts files should be
updated properly. This error message can be the good way to do it.
Thank you.

Best regards,
Jingoo Han

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-03-07  3:31           ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-03-07  3:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, March 07, 2014 9:25 AM, Arnd Bergmann wrote:
> On Thursday 06 March 2014, Lucas Stach wrote:
> > Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
> > > On 03/05/2014 06:25 AM, Lucas Stach wrote:
> > > > This is the recommended method of doing the IRQ
> > > > mapping. For old devicetrees we fall back to the
> > > > previous practice.
> > >
> > > Tested-by: Stephen Warren <swarren@nvidia.com>
> > >
> > > I tested both with and without patch 1/6, and the PCIe-based NIC on
> > > Beaver worked fine either way. Without patch 1/6, I do see:
> > >
> > > pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
> > >
> > > ... but that seems reasonable given that the DT that of_irq_parse_pci()
> > > parses is missing, and did correctly trigger the fallback path, so
> > > everything still worked.
> >
> > Yes, this should be normal. It spits this error for old DTs, but keeps
> > doing the right thing. I'm not sure if we should downgrade this to info
> > or dbg.
> 
> No, I think printing an error like this is appropriate: it is an incentive
> to update the dts files, but doesn't look too urgent as long as everything
> still works.

+1

I agree with Arnd's opinion. I think that all dts files should be
updated properly. This error message can be the good way to do it.
Thank you.

Best regards,
Jingoo Han

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

* Re: [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties
  2014-03-05 13:25   ` Lucas Stach
  (?)
  (?)
@ 2014-03-10  3:09     ` Shawn Guo
  -1 siblings, 0 replies; 118+ messages in thread
From: Shawn Guo @ 2014-03-10  3:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:50PM +0100, Lucas Stach wrote:
> As defined by the common PCI bindings.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.


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

* Re: [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties
@ 2014-03-10  3:09     ` Shawn Guo
  0 siblings, 0 replies; 118+ messages in thread
From: Shawn Guo @ 2014-03-10  3:09 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Bjorn Helgaas, Simon Horman,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

On Wed, Mar 05, 2014 at 02:25:50PM +0100, Lucas Stach wrote:
> As defined by the common PCI bindings.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.


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

* Re: [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties
@ 2014-03-10  3:09     ` Shawn Guo
  0 siblings, 0 replies; 118+ messages in thread
From: Shawn Guo @ 2014-03-10  3:09 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Bjorn Helgaas, Simon Horman,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

On Wed, Mar 05, 2014 at 02:25:50PM +0100, Lucas Stach wrote:
> As defined by the common PCI bindings.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.


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

* [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties
@ 2014-03-10  3:09     ` Shawn Guo
  0 siblings, 0 replies; 118+ messages in thread
From: Shawn Guo @ 2014-03-10  3:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:50PM +0100, Lucas Stach wrote:
> As defined by the common PCI bindings.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-13 17:41         ` Tim Harvey
  0 siblings, 0 replies; 118+ messages in thread
From: Tim Harvey @ 2014-03-13 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 6, 2014 at 7:33 AM, Marek Vasut <marex@denx.de> wrote:
> On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
>> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>> >
>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> > Acked-by: Arnd Bergmann <arnd@arndb.de>
>>
>> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>>        Kishon Vijay Abraham I)
>>
>> Acked-by: Jingoo Han <jg1.han@samsung.com>
>>
>> It works properly on Exynos platform.
>> Thank you.
>
> Looks reasonable,
>
> Reviewed-by: Marek Vasut <marex@denx.de>
>

I've tested this on the Gateworks Ventana products with P2P bridges
and with the patch I just submitted here:
http://thread.gmane.org/gmane.linux.kernel.pci/30017

Tested-by: Tim Harvey <tharvey@gateworks.com>

Tim

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-13 17:41         ` Tim Harvey
  0 siblings, 0 replies; 118+ messages in thread
From: Tim Harvey @ 2014-03-13 17:41 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Jingoo Han, Troy Kisky, Lucas Stach,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-sh,
	linux-samsung-soc, linux-tegra, linux-pci-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Bjorn Helgaas, Simon Horman,
	Shawn Guo, Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, Sascha Hauer, Mohit KUMAR DCG, Pratyush Anand,
	Richard Zhu

On Thu, Mar 6, 2014 at 7:33 AM, Marek Vasut <marex-ynQEQJNshbs@public.gmane.org> wrote:
> On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
>> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>> >
>> > Signed-off-by: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
>> > Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
>>
>> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>>        Kishon Vijay Abraham I)
>>
>> Acked-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>>
>> It works properly on Exynos platform.
>> Thank you.
>
> Looks reasonable,
>
> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
>

I've tested this on the Gateworks Ventana products with P2P bridges
and with the patch I just submitted here:
http://thread.gmane.org/gmane.linux.kernel.pci/30017

Tested-by: Tim Harvey <tharvey-UMMOYl/HMS+akBO8gow8eQ@public.gmane.org>

Tim

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-13 17:41         ` Tim Harvey
  0 siblings, 0 replies; 118+ messages in thread
From: Tim Harvey @ 2014-03-13 17:41 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Jingoo Han, Troy Kisky, Lucas Stach, linux-arm-kernel, linux-sh,
	linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Bjorn Helgaas, Simon Horman, Shawn Guo, Stephen Warren,
	Ben Dooks, Kukjin Kim, Thierry Reding, Arnd Bergmann,
	Sascha Hauer, Mohit KUMAR DCG, Pratyush Anand, Richard Zhu,
	Kishon Vijay Abraham I

On Thu, Mar 6, 2014 at 7:33 AM, Marek Vasut <marex@denx.de> wrote:
> On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
>> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>> >
>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> > Acked-by: Arnd Bergmann <arnd@arndb.de>
>>
>> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>>        Kishon Vijay Abraham I)
>>
>> Acked-by: Jingoo Han <jg1.han@samsung.com>
>>
>> It works properly on Exynos platform.
>> Thank you.
>
> Looks reasonable,
>
> Reviewed-by: Marek Vasut <marex@denx.de>
>

I've tested this on the Gateworks Ventana products with P2P bridges
and with the patch I just submitted here:
http://thread.gmane.org/gmane.linux.kernel.pci/30017

Tested-by: Tim Harvey <tharvey@gateworks.com>

Tim

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-03-13 17:41         ` Tim Harvey
  0 siblings, 0 replies; 118+ messages in thread
From: Tim Harvey @ 2014-03-13 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 6, 2014 at 7:33 AM, Marek Vasut <marex@denx.de> wrote:
> On Thursday, March 06, 2014 at 03:47:03 AM, Jingoo Han wrote:
>> On Wednesday, March 05, 2014 10:26 PM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>> >
>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> > Acked-by: Arnd Bergmann <arnd@arndb.de>
>>
>> (+cc Mohit KUMAR, Richard Zhu, Pratyush Anand, Marek Vasut,
>>        Kishon Vijay Abraham I)
>>
>> Acked-by: Jingoo Han <jg1.han@samsung.com>
>>
>> It works properly on Exynos platform.
>> Thank you.
>
> Looks reasonable,
>
> Reviewed-by: Marek Vasut <marex@denx.de>
>

I've tested this on the Gateworks Ventana products with P2P bridges
and with the patch I just submitted here:
http://thread.gmane.org/gmane.linux.kernel.pci/30017

Tested-by: Tim Harvey <tharvey@gateworks.com>

Tim

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

* Re: [PATCH v2 0/6] PCI irq mapping fixes and cleanups
  2014-03-05 13:25 ` Lucas Stach
  (?)
  (?)
@ 2014-03-28 15:47   ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-28 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

Friendly ping.

Bjorn could you please pick the patches labeled "PCI: ..." up? Both the
Tegra and i.MX dts changes are already queued up for 3.15 and I think
all patches gathered enough acks and tested-bys for this to be low risk.

Regards,
Lucas

Am Mittwoch, den 05.03.2014, 14:25 +0100 schrieb Lucas Stach:
> This series cleans up the PCI irq mapping for all
> the ARM PCI host drivers, so they handle it in the
> way defined in the common PCI bindings.
> 
> I've worked in all the feedback I received on the first
> round of this series and left out the i.MX pcie driver
> changes, as these need more work includig breaking
> of the existing binding, which I'll send as a separate
> series.
> 
> Lucas Stach (6):
>   ARM: dts: tegra: add PCIe interrupt mapping properties
>   PCI: tegra: use new OF interrupt mapping when possible
>   PCI: rcar: use new OF interrupt mapping when possible
>   ARM: dts: exynos5440: fix PCIe interrupt mapping
>   ARM: dts: imx6: add PCIe interrupt mapping properties
>   PCI: designware: use new OF interrupt mapping when possible
> 
>  .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt          |  8 ++++++++
>  arch/arm/boot/dts/exynos5440.dtsi                            |  6 ++++--
>  arch/arm/boot/dts/imx6qdl.dtsi                               |  8 ++++++++
>  arch/arm/boot/dts/tegra20.dtsi                               |  4 ++++
>  arch/arm/boot/dts/tegra30.dtsi                               |  4 ++++
>  drivers/pci/host/pci-rcar-gen2.c                             | 12 +++++++++---
>  drivers/pci/host/pci-tegra.c                                 |  7 ++++++-
>  drivers/pci/host/pcie-designware.c                           | 12 +++++++++---
>  8 files changed, 52 insertions(+), 9 deletions(-)
> 

-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* Re: [PATCH v2 0/6] PCI irq mapping fixes and cleanups
@ 2014-03-28 15:47   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-28 15:47 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

Friendly ping.

Bjorn could you please pick the patches labeled "PCI: ..." up? Both the
Tegra and i.MX dts changes are already queued up for 3.15 and I think
all patches gathered enough acks and tested-bys for this to be low risk.

Regards,
Lucas

Am Mittwoch, den 05.03.2014, 14:25 +0100 schrieb Lucas Stach:
> This series cleans up the PCI irq mapping for all
> the ARM PCI host drivers, so they handle it in the
> way defined in the common PCI bindings.
> 
> I've worked in all the feedback I received on the first
> round of this series and left out the i.MX pcie driver
> changes, as these need more work includig breaking
> of the existing binding, which I'll send as a separate
> series.
> 
> Lucas Stach (6):
>   ARM: dts: tegra: add PCIe interrupt mapping properties
>   PCI: tegra: use new OF interrupt mapping when possible
>   PCI: rcar: use new OF interrupt mapping when possible
>   ARM: dts: exynos5440: fix PCIe interrupt mapping
>   ARM: dts: imx6: add PCIe interrupt mapping properties
>   PCI: designware: use new OF interrupt mapping when possible
> 
>  .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt          |  8 ++++++++
>  arch/arm/boot/dts/exynos5440.dtsi                            |  6 ++++--
>  arch/arm/boot/dts/imx6qdl.dtsi                               |  8 ++++++++
>  arch/arm/boot/dts/tegra20.dtsi                               |  4 ++++
>  arch/arm/boot/dts/tegra30.dtsi                               |  4 ++++
>  drivers/pci/host/pci-rcar-gen2.c                             | 12 +++++++++---
>  drivers/pci/host/pci-tegra.c                                 |  7 ++++++-
>  drivers/pci/host/pcie-designware.c                           | 12 +++++++++---
>  8 files changed, 52 insertions(+), 9 deletions(-)
> 

-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* Re: [PATCH v2 0/6] PCI irq mapping fixes and cleanups
@ 2014-03-28 15:47   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-28 15:47 UTC (permalink / raw)
  To: linux-arm-kernel, Bjorn Helgaas
  Cc: linux-sh, linux-samsung-soc, linux-tegra, linux-pci, devicetree,
	Jingoo Han, Bjorn Helgaas, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

Friendly ping.

Bjorn could you please pick the patches labeled "PCI: ..." up? Both the
Tegra and i.MX dts changes are already queued up for 3.15 and I think
all patches gathered enough acks and tested-bys for this to be low risk.

Regards,
Lucas

Am Mittwoch, den 05.03.2014, 14:25 +0100 schrieb Lucas Stach:
> This series cleans up the PCI irq mapping for all
> the ARM PCI host drivers, so they handle it in the
> way defined in the common PCI bindings.
> 
> I've worked in all the feedback I received on the first
> round of this series and left out the i.MX pcie driver
> changes, as these need more work includig breaking
> of the existing binding, which I'll send as a separate
> series.
> 
> Lucas Stach (6):
>   ARM: dts: tegra: add PCIe interrupt mapping properties
>   PCI: tegra: use new OF interrupt mapping when possible
>   PCI: rcar: use new OF interrupt mapping when possible
>   ARM: dts: exynos5440: fix PCIe interrupt mapping
>   ARM: dts: imx6: add PCIe interrupt mapping properties
>   PCI: designware: use new OF interrupt mapping when possible
> 
>  .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt          |  8 ++++++++
>  arch/arm/boot/dts/exynos5440.dtsi                            |  6 ++++--
>  arch/arm/boot/dts/imx6qdl.dtsi                               |  8 ++++++++
>  arch/arm/boot/dts/tegra20.dtsi                               |  4 ++++
>  arch/arm/boot/dts/tegra30.dtsi                               |  4 ++++
>  drivers/pci/host/pci-rcar-gen2.c                             | 12 +++++++++---
>  drivers/pci/host/pci-tegra.c                                 |  7 ++++++-
>  drivers/pci/host/pcie-designware.c                           | 12 +++++++++---
>  8 files changed, 52 insertions(+), 9 deletions(-)
> 

-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* [PATCH v2 0/6] PCI irq mapping fixes and cleanups
@ 2014-03-28 15:47   ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-03-28 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

Friendly ping.

Bjorn could you please pick the patches labeled "PCI: ..." up? Both the
Tegra and i.MX dts changes are already queued up for 3.15 and I think
all patches gathered enough acks and tested-bys for this to be low risk.

Regards,
Lucas

Am Mittwoch, den 05.03.2014, 14:25 +0100 schrieb Lucas Stach:
> This series cleans up the PCI irq mapping for all
> the ARM PCI host drivers, so they handle it in the
> way defined in the common PCI bindings.
> 
> I've worked in all the feedback I received on the first
> round of this series and left out the i.MX pcie driver
> changes, as these need more work includig breaking
> of the existing binding, which I'll send as a separate
> series.
> 
> Lucas Stach (6):
>   ARM: dts: tegra: add PCIe interrupt mapping properties
>   PCI: tegra: use new OF interrupt mapping when possible
>   PCI: rcar: use new OF interrupt mapping when possible
>   ARM: dts: exynos5440: fix PCIe interrupt mapping
>   ARM: dts: imx6: add PCIe interrupt mapping properties
>   PCI: designware: use new OF interrupt mapping when possible
> 
>  .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt          |  8 ++++++++
>  arch/arm/boot/dts/exynos5440.dtsi                            |  6 ++++--
>  arch/arm/boot/dts/imx6qdl.dtsi                               |  8 ++++++++
>  arch/arm/boot/dts/tegra20.dtsi                               |  4 ++++
>  arch/arm/boot/dts/tegra30.dtsi                               |  4 ++++
>  drivers/pci/host/pci-rcar-gen2.c                             | 12 +++++++++---
>  drivers/pci/host/pci-tegra.c                                 |  7 ++++++-
>  drivers/pci/host/pcie-designware.c                           | 12 +++++++++---
>  8 files changed, 52 insertions(+), 9 deletions(-)
> 

-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-03-05 13:25   ` Lucas Stach
  (?)
@ 2014-04-04 16:55     ` Bjorn Helgaas
  -1 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 16:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
rebase and rename it after v3.15-rc1, and I think we can squeeze it into
v3.15 shortly after that.  Thanks.

> ---
>  drivers/pci/host/pci-tegra.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 330f7e3a32dd..083cf37ca047 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
>  static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
>  {
>  	struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata);
> +	int irq;
>  
>  	tegra_cpuidle_pcie_irqs_in_use();
>  
> -	return pcie->irq;
> +	irq = of_irq_parse_and_map_pci(pdev, slot, pin);
> +	if (!irq)
> +		irq = pcie->irq;
> +
> +	return irq;
>  }
>  
>  static void tegra_pcie_add_bus(struct pci_bus *bus)
> -- 
> 1.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-04 16:55     ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 16:55 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
rebase and rename it after v3.15-rc1, and I think we can squeeze it into
v3.15 shortly after that.  Thanks.

> ---
>  drivers/pci/host/pci-tegra.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 330f7e3a32dd..083cf37ca047 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
>  static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
>  {
>  	struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata);
> +	int irq;
>  
>  	tegra_cpuidle_pcie_irqs_in_use();
>  
> -	return pcie->irq;
> +	irq = of_irq_parse_and_map_pci(pdev, slot, pin);
> +	if (!irq)
> +		irq = pcie->irq;
> +
> +	return irq;
>  }
>  
>  static void tegra_pcie_add_bus(struct pci_bus *bus)
> -- 
> 1.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-04 16:55     ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 16:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. For old devicetrees we fall back to the
> previous practice.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Arnd Bergmann <arnd@arndb.de>

Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
rebase and rename it after v3.15-rc1, and I think we can squeeze it into
v3.15 shortly after that.  Thanks.

> ---
>  drivers/pci/host/pci-tegra.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 330f7e3a32dd..083cf37ca047 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
>  static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
>  {
>  	struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata);
> +	int irq;
>  
>  	tegra_cpuidle_pcie_irqs_in_use();
>  
> -	return pcie->irq;
> +	irq = of_irq_parse_and_map_pci(pdev, slot, pin);
> +	if (!irq)
> +		irq = pcie->irq;
> +
> +	return irq;
>  }
>  
>  static void tegra_pcie_add_bus(struct pci_bus *bus)
> -- 
> 1.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-04-04 17:01     ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:48PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. Still fall back to the old method in order
> to not break the just submitted board files.

Hi Lucas, can you rebase this to Linus' current tree?  This doesn't apply
anymore because of conflicts with 546cadda3575 ("PCI: rcar: Register each
instance independently").  Thanks!

> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> v2: pass in parent device to pci_common_init(), to
>     make DT parsing work.
> ---
>  drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147baec3..3a0914163ad0 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -15,6 +15,7 @@
>  #include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pci_sys_data *sys = dev->bus->sysdata;
>  	struct rcar_pci_priv *priv = sys->private_data;
> +	int irq;
> +
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = priv->irq;
>  
> -	return priv->irq;
> +	return irq;
>  }
>  
>  /* PCI host controller setup */
> @@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
>  	void **private_data;
>  	int count;
>  
> +	pci_common_init_dev(priv->dev, &rcar_hw_pci);
> +
>  	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
>  		goto add_priv;
>  
> @@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
>  	int retval;
>  
>  	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
> -	if (!retval)
> -		pci_common_init(&rcar_hw_pci);
>  
>  	/* Private data pointer array is not needed any more */
>  	kfree(rcar_hw_pci.private_data);
> -- 
> 1.9.0
> 

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

* Re: [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-04-04 17:01     ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:01 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Jingoo Han, Simon Horman,
	Shawn Guo, Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel-bIcnvbaLZ9MEGnE8C9+IrQ

On Wed, Mar 05, 2014 at 02:25:48PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. Still fall back to the old method in order
> to not break the just submitted board files.

Hi Lucas, can you rebase this to Linus' current tree?  This doesn't apply
anymore because of conflicts with 546cadda3575 ("PCI: rcar: Register each
instance independently").  Thanks!

> Signed-off-by: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> v2: pass in parent device to pci_common_init(), to
>     make DT parsing work.
> ---
>  drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147baec3..3a0914163ad0 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -15,6 +15,7 @@
>  #include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pci_sys_data *sys = dev->bus->sysdata;
>  	struct rcar_pci_priv *priv = sys->private_data;
> +	int irq;
> +
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = priv->irq;
>  
> -	return priv->irq;
> +	return irq;
>  }
>  
>  /* PCI host controller setup */
> @@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
>  	void **private_data;
>  	int count;
>  
> +	pci_common_init_dev(priv->dev, &rcar_hw_pci);
> +
>  	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
>  		goto add_priv;
>  
> @@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
>  	int retval;
>  
>  	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
> -	if (!retval)
> -		pci_common_init(&rcar_hw_pci);
>  
>  	/* Private data pointer array is not needed any more */
>  	kfree(rcar_hw_pci.private_data);
> -- 
> 1.9.0
> 

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

* Re: [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-04-04 17:01     ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:01 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

On Wed, Mar 05, 2014 at 02:25:48PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. Still fall back to the old method in order
> to not break the just submitted board files.

Hi Lucas, can you rebase this to Linus' current tree?  This doesn't apply
anymore because of conflicts with 546cadda3575 ("PCI: rcar: Register each
instance independently").  Thanks!

> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> v2: pass in parent device to pci_common_init(), to
>     make DT parsing work.
> ---
>  drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147baec3..3a0914163ad0 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -15,6 +15,7 @@
>  #include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pci_sys_data *sys = dev->bus->sysdata;
>  	struct rcar_pci_priv *priv = sys->private_data;
> +	int irq;
> +
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = priv->irq;
>  
> -	return priv->irq;
> +	return irq;
>  }
>  
>  /* PCI host controller setup */
> @@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
>  	void **private_data;
>  	int count;
>  
> +	pci_common_init_dev(priv->dev, &rcar_hw_pci);
> +
>  	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
>  		goto add_priv;
>  
> @@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
>  	int retval;
>  
>  	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
> -	if (!retval)
> -		pci_common_init(&rcar_hw_pci);
>  
>  	/* Private data pointer array is not needed any more */
>  	kfree(rcar_hw_pci.private_data);
> -- 
> 1.9.0
> 

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

* [PATCH v2 3/6] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-04-04 17:01     ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 02:25:48PM +0100, Lucas Stach wrote:
> This is the recommended method of doing the IRQ
> mapping. Still fall back to the old method in order
> to not break the just submitted board files.

Hi Lucas, can you rebase this to Linus' current tree?  This doesn't apply
anymore because of conflicts with 546cadda3575 ("PCI: rcar: Register each
instance independently").  Thanks!

> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> v2: pass in parent device to pci_common_init(), to
>     make DT parsing work.
> ---
>  drivers/pci/host/pci-rcar-gen2.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147baec3..3a0914163ad0 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -15,6 +15,7 @@
>  #include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of_pci.h>
>  #include <linux/pci.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
>  	struct pci_sys_data *sys = dev->bus->sysdata;
>  	struct rcar_pci_priv *priv = sys->private_data;
> +	int irq;
> +
> +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> +	if (!irq)
> +		irq = priv->irq;
>  
> -	return priv->irq;
> +	return irq;
>  }
>  
>  /* PCI host controller setup */
> @@ -249,6 +255,8 @@ static int __init rcar_pci_add_controller(struct rcar_pci_priv *priv)
>  	void **private_data;
>  	int count;
>  
> +	pci_common_init_dev(priv->dev, &rcar_hw_pci);
> +
>  	if (rcar_hw_pci.nr_controllers < rcar_pci_count)
>  		goto add_priv;
>  
> @@ -322,8 +330,6 @@ static int __init rcar_pci_init(void)
>  	int retval;
>  
>  	retval = platform_driver_probe(&rcar_pci_driver, rcar_pci_probe);
> -	if (!retval)
> -		pci_common_init(&rcar_hw_pci);
>  
>  	/* Private data pointer array is not needed any more */
>  	kfree(rcar_hw_pci.private_data);
> -- 
> 1.9.0
> 

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
  2014-03-05 18:42     ` Jason Gunthorpe
  (?)
@ 2014-04-04 17:03       ` Bjorn Helgaas
  -1 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > -	return pp->irq;
> > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > +	if (!irq)
> > +		irq = pp->irq;
> 
> In light of the two bugs that Tim found, it might be wise to throw a
> 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> path, so it doesn't continue to silently cover up errors on the OF/DT
> side..

This sounds like a reasonable thing to do, but I didn't see a response to
this comment.  Should I merge it as-is, or do you want to add the message?

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-04 17:03       ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:03 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Lucas Stach, linux-arm-kernel, devicetree, linux-samsung-soc,
	Arnd Bergmann, Stephen Warren, linux-sh, linux-pci, Jingoo Han,
	Simon Horman, Thierry Reding, Ben Dooks, linux-tegra, Kukjin Kim,
	Shawn Guo, kernel

On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > -	return pp->irq;
> > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > +	if (!irq)
> > +		irq = pp->irq;
> 
> In light of the two bugs that Tim found, it might be wise to throw a
> 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> path, so it doesn't continue to silently cover up errors on the OF/DT
> side..

This sounds like a reasonable thing to do, but I didn't see a response to
this comment.  Should I merge it as-is, or do you want to add the message?

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-04 17:03       ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > -	return pp->irq;
> > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > +	if (!irq)
> > +		irq = pp->irq;
> 
> In light of the two bugs that Tim found, it might be wise to throw a
> 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> path, so it doesn't continue to silently cover up errors on the OF/DT
> side..

This sounds like a reasonable thing to do, but I didn't see a response to
this comment.  Should I merge it as-is, or do you want to add the message?

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-04 17:05         ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > -	return pp->irq;
> > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > +	if (!irq)
> > > +		irq = pp->irq;
> > 
> > In light of the two bugs that Tim found, it might be wise to throw a
> > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > path, so it doesn't continue to silently cover up errors on the OF/DT
> > side..
> 
> This sounds like a reasonable thing to do, but I didn't see a response to
> this comment.  Should I merge it as-is, or do you want to add the message?

Oh, and I suppose the same question applies to the other host drivers in
this series (tegra, rcar)?

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-04 17:05         ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:05 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Lucas Stach, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Arnd Bergmann,
	Stephen Warren, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA, Jingoo Han, Simon Horman,
	Thierry Reding, Ben Dooks, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	Kukjin Kim, Shawn Guo, kernel-bIcnvbaLZ9MEGnE8C9+IrQ

On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > -	return pp->irq;
> > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > +	if (!irq)
> > > +		irq = pp->irq;
> > 
> > In light of the two bugs that Tim found, it might be wise to throw a
> > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > path, so it doesn't continue to silently cover up errors on the OF/DT
> > side..
> 
> This sounds like a reasonable thing to do, but I didn't see a response to
> this comment.  Should I merge it as-is, or do you want to add the message?

Oh, and I suppose the same question applies to the other host drivers in
this series (tegra, rcar)?

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-04 17:05         ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:05 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Lucas Stach, linux-arm-kernel, devicetree, linux-samsung-soc,
	Arnd Bergmann, Stephen Warren, linux-sh, linux-pci, Jingoo Han,
	Simon Horman, Thierry Reding, Ben Dooks, linux-tegra, Kukjin Kim,
	Shawn Guo, kernel

On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > -	return pp->irq;
> > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > +	if (!irq)
> > > +		irq = pp->irq;
> > 
> > In light of the two bugs that Tim found, it might be wise to throw a
> > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > path, so it doesn't continue to silently cover up errors on the OF/DT
> > side..
> 
> This sounds like a reasonable thing to do, but I didn't see a response to
> this comment.  Should I merge it as-is, or do you want to add the message?

Oh, and I suppose the same question applies to the other host drivers in
this series (tegra, rcar)?

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-04 17:05         ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-04 17:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > -	return pp->irq;
> > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > +	if (!irq)
> > > +		irq = pp->irq;
> > 
> > In light of the two bugs that Tim found, it might be wise to throw a
> > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > path, so it doesn't continue to silently cover up errors on the OF/DT
> > side..
> 
> This sounds like a reasonable thing to do, but I didn't see a response to
> this comment.  Should I merge it as-is, or do you want to add the message?

Oh, and I suppose the same question applies to the other host drivers in
this series (tegra, rcar)?

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
  2014-04-04 17:05         ` Bjorn Helgaas
  (?)
@ 2014-04-07  8:38           ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-07  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bjorn,

Am Freitag, den 04.04.2014, 11:05 -0600 schrieb Bjorn Helgaas:
> On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> > On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > > -	return pp->irq;
> > > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > > +	if (!irq)
> > > > +		irq = pp->irq;
> > > 
> > > In light of the two bugs that Tim found, it might be wise to throw a
> > > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > > path, so it doesn't continue to silently cover up errors on the OF/DT
> > > side..
> > 
> > This sounds like a reasonable thing to do, but I didn't see a response to
> > this comment.  Should I merge it as-is, or do you want to add the message?
> 
> Oh, and I suppose the same question applies to the other host drivers in
> this series (tegra, rcar)?

Please apply as-is. of_irq_parse_and_map_pci() already prints an error
message if it isn't able to establish the mapping, thus right before we
fall into the fallback path. So any the warning would be redundant.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-07  8:38           ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-07  8:38 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Jason Gunthorpe, devicetree, linux-samsung-soc, kernel,
	Arnd Bergmann, Stephen Warren, linux-pci, linux-sh, linux-tegra,
	Simon Horman, Thierry Reding, Ben Dooks, Jingoo Han, Kukjin Kim,
	Shawn Guo, linux-arm-kernel

Hi Bjorn,

Am Freitag, den 04.04.2014, 11:05 -0600 schrieb Bjorn Helgaas:
> On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> > On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > > -	return pp->irq;
> > > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > > +	if (!irq)
> > > > +		irq = pp->irq;
> > > 
> > > In light of the two bugs that Tim found, it might be wise to throw a
> > > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > > path, so it doesn't continue to silently cover up errors on the OF/DT
> > > side..
> > 
> > This sounds like a reasonable thing to do, but I didn't see a response to
> > this comment.  Should I merge it as-is, or do you want to add the message?
> 
> Oh, and I suppose the same question applies to the other host drivers in
> this series (tegra, rcar)?

Please apply as-is. of_irq_parse_and_map_pci() already prints an error
message if it isn't able to establish the mapping, thus right before we
fall into the fallback path. So any the warning would be redundant.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-07  8:38           ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-07  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bjorn,

Am Freitag, den 04.04.2014, 11:05 -0600 schrieb Bjorn Helgaas:
> On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> > On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > > -	return pp->irq;
> > > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > > +	if (!irq)
> > > > +		irq = pp->irq;
> > > 
> > > In light of the two bugs that Tim found, it might be wise to throw a
> > > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > > path, so it doesn't continue to silently cover up errors on the OF/DT
> > > side..
> > 
> > This sounds like a reasonable thing to do, but I didn't see a response to
> > this comment.  Should I merge it as-is, or do you want to add the message?
> 
> Oh, and I suppose the same question applies to the other host drivers in
> this series (tegra, rcar)?

Please apply as-is. of_irq_parse_and_map_pci() already prints an error
message if it isn't able to establish the mapping, thus right before we
fall into the fallback path. So any the warning would be redundant.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
  2014-04-07  8:38           ` Lucas Stach
  (?)
@ 2014-04-07  9:13             ` Jingoo Han
  -1 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-04-07  9:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, April 07, 2014 5:39 PM, Lucas Stach wrote:
> Am Freitag, den 04.04.2014, 11:05 -0600 schrieb Bjorn Helgaas:
> > On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> > > On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > > > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > > > -	return pp->irq;
> > > > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > > > +	if (!irq)
> > > > > +		irq = pp->irq;
> > > >
> > > > In light of the two bugs that Tim found, it might be wise to throw a
> > > > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > > > path, so it doesn't continue to silently cover up errors on the OF/DT
> > > > side..
> > >
> > > This sounds like a reasonable thing to do, but I didn't see a response to
> > > this comment.  Should I merge it as-is, or do you want to add the message?
> >
> > Oh, and I suppose the same question applies to the other host drivers in
> > this series (tegra, rcar)?
> 
> Please apply as-is. of_irq_parse_and_map_pci() already prints an error
> message if it isn't able to establish the mapping, thus right before we
> fall into the fallback path. So any the warning would be redundant.

+1

I agree with Lucas Stach's opinion. of_irq_parse_and_map_pci() already
prints an error as below. So, additional warning message of host controller
looks superfluous.

	ret = of_irq_parse_pci(dev, &oirq);
	if (ret) {
		dev_err(&dev->dev, "of_irq_parse_pci() failed with rc=%d\n", ret);
		return 0; /* Proper return code 0 = NO_IRQ */


Best regards,
Jingoo Han


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

* Re: [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-07  9:13             ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-04-07  9:13 UTC (permalink / raw)
  To: 'Lucas Stach', 'Bjorn Helgaas'
  Cc: 'Jason Gunthorpe',
	devicetree, linux-samsung-soc, kernel, 'Arnd Bergmann',
	'Stephen Warren',
	linux-pci, linux-sh, linux-tegra, 'Simon Horman',
	'Thierry Reding', 'Ben Dooks',
	'Kukjin Kim', 'Shawn Guo',
	linux-arm-kernel, 'Jingoo Han'

On Monday, April 07, 2014 5:39 PM, Lucas Stach wrote:
> Am Freitag, den 04.04.2014, 11:05 -0600 schrieb Bjorn Helgaas:
> > On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> > > On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > > > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > > > -	return pp->irq;
> > > > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > > > +	if (!irq)
> > > > > +		irq = pp->irq;
> > > >
> > > > In light of the two bugs that Tim found, it might be wise to throw a
> > > > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > > > path, so it doesn't continue to silently cover up errors on the OF/DT
> > > > side..
> > >
> > > This sounds like a reasonable thing to do, but I didn't see a response to
> > > this comment.  Should I merge it as-is, or do you want to add the message?
> >
> > Oh, and I suppose the same question applies to the other host drivers in
> > this series (tegra, rcar)?
> 
> Please apply as-is. of_irq_parse_and_map_pci() already prints an error
> message if it isn't able to establish the mapping, thus right before we
> fall into the fallback path. So any the warning would be redundant.

+1

I agree with Lucas Stach's opinion. of_irq_parse_and_map_pci() already
prints an error as below. So, additional warning message of host controller
looks superfluous.

	ret = of_irq_parse_pci(dev, &oirq);
	if (ret) {
		dev_err(&dev->dev, "of_irq_parse_pci() failed with rc=%d\n", ret);
		return 0; /* Proper return code 0 == NO_IRQ */


Best regards,
Jingoo Han


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

* [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible
@ 2014-04-07  9:13             ` Jingoo Han
  0 siblings, 0 replies; 118+ messages in thread
From: Jingoo Han @ 2014-04-07  9:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, April 07, 2014 5:39 PM, Lucas Stach wrote:
> Am Freitag, den 04.04.2014, 11:05 -0600 schrieb Bjorn Helgaas:
> > On Fri, Apr 04, 2014 at 11:03:41AM -0600, Bjorn Helgaas wrote:
> > > On Wed, Mar 05, 2014 at 11:42:19AM -0700, Jason Gunthorpe wrote:
> > > > On Wed, Mar 05, 2014 at 02:25:51PM +0100, Lucas Stach wrote:
> > > > > -	return pp->irq;
> > > > > +	irq = of_irq_parse_and_map_pci(dev, slot, pin);
> > > > > +	if (!irq)
> > > > > +		irq = pp->irq;
> > > >
> > > > In light of the two bugs that Tim found, it might be wise to throw a
> > > > 'dev_warn(FW_BUG "Missing DT interrupt mapping")' in the fall back
> > > > path, so it doesn't continue to silently cover up errors on the OF/DT
> > > > side..
> > >
> > > This sounds like a reasonable thing to do, but I didn't see a response to
> > > this comment.  Should I merge it as-is, or do you want to add the message?
> >
> > Oh, and I suppose the same question applies to the other host drivers in
> > this series (tegra, rcar)?
> 
> Please apply as-is. of_irq_parse_and_map_pci() already prints an error
> message if it isn't able to establish the mapping, thus right before we
> fall into the fallback path. So any the warning would be redundant.

+1

I agree with Lucas Stach's opinion. of_irq_parse_and_map_pci() already
prints an error as below. So, additional warning message of host controller
looks superfluous.

	ret = of_irq_parse_pci(dev, &oirq);
	if (ret) {
		dev_err(&dev->dev, "of_irq_parse_pci() failed with rc=%d\n", ret);
		return 0; /* Proper return code 0 == NO_IRQ */


Best regards,
Jingoo Han

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

* [PATCH v2 rebased] PCI: rcar: use new OF interrupt mapping when possible
  2014-04-04 17:01     ` Bjorn Helgaas
  (?)
@ 2014-04-07  9:30       ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-07  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. Still fall back to the old method in order
to not break the just submitted board files.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2: pass in parent device to pci_common_init(), to
    make DT parsing work.
---
 drivers/pci/host/pci-rcar-gen2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index fd3e3ab56509..4fe349dcaf59 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -180,8 +181,13 @@ static int rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pci_sys_data *sys = dev->bus->sysdata;
 	struct rcar_pci_priv *priv = sys->private_data;
+	int irq;
+
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = priv->irq;
 
-	return priv->irq;
+	return irq;
 }
 
 #ifdef CONFIG_PCI_DEBUG
-- 
1.9.1


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

* [PATCH v2 rebased] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-04-07  9:30       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-07  9:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Arnd Bergmann, linux-sh, linux-pci, Simon Horman, Ben Dooks,
	kernel, linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. Still fall back to the old method in order
to not break the just submitted board files.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2: pass in parent device to pci_common_init(), to
    make DT parsing work.
---
 drivers/pci/host/pci-rcar-gen2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index fd3e3ab56509..4fe349dcaf59 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -180,8 +181,13 @@ static int rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pci_sys_data *sys = dev->bus->sysdata;
 	struct rcar_pci_priv *priv = sys->private_data;
+	int irq;
+
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = priv->irq;
 
-	return priv->irq;
+	return irq;
 }
 
 #ifdef CONFIG_PCI_DEBUG
-- 
1.9.1


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

* [PATCH v2 rebased] PCI: rcar: use new OF interrupt mapping when possible
@ 2014-04-07  9:30       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-07  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

This is the recommended method of doing the IRQ
mapping. Still fall back to the old method in order
to not break the just submitted board files.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2: pass in parent device to pci_common_init(), to
    make DT parsing work.
---
 drivers/pci/host/pci-rcar-gen2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index fd3e3ab56509..4fe349dcaf59 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -180,8 +181,13 @@ static int rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	struct pci_sys_data *sys = dev->bus->sysdata;
 	struct rcar_pci_priv *priv = sys->private_data;
+	int irq;
+
+	irq = of_irq_parse_and_map_pci(dev, slot, pin);
+	if (!irq)
+		irq = priv->irq;
 
-	return priv->irq;
+	return irq;
 }
 
 #ifdef CONFIG_PCI_DEBUG
-- 
1.9.1

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-03-06 17:39       ` Lucas Stach
  (?)
  (?)
@ 2014-04-11 17:40         ` Srikanth Thokala
  -1 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-11 17:40 UTC (permalink / raw)
  To: Lucas Stach, Tanmay Inamdar
  Cc: Stephen Warren, linux-arm-kernel, linux-sh, linux-samsung-soc,
	linux-tegra, linux-pci, devicetree, Jingoo Han, Bjorn Helgaas,
	Simon Horman, Shawn Guo, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

Hi Lucas/Tanmay,

On Thu, Mar 6, 2014 at 11:09 PM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
>> On 03/05/2014 06:25 AM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>>
>> Tested-by: Stephen Warren <swarren@nvidia.com>
>>
>> I tested both with and without patch 1/6, and the PCIe-based NIC on
>> Beaver worked fine either way. Without patch 1/6, I do see:
>>
>> pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
>>
>> ... but that seems reasonable given that the DT that of_irq_parse_pci()
>> parses is missing, and did correctly trigger the fallback path, so
>> everything still worked.
>
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

I see this error too on my setup (Xilinx PCIe Root Complex Driver),
https://lkml.org/lkml/2014/3/3/183

After digging into it, I see I need to override the API
pcibios_get_phb_of_node()
to pass my device node.  Is this the only possible way?

From the discussion in this thread, I feel am missing something in the dt node.
Below is my dt node, please let me know if you see any issues.

+++++++++++++++++++++++
pcie{
   reg = <XXXX>;
   ranges = <YYYY>;
   interrupts = <0 52 4>;

   pcie_intc: interrupt-controller {
       interrupt-controller;
       #address-cells = <0>;
       #interrupt-cells = <1>;
   }

   interrupt-map-mask = <0 0 0 7>;
   interrupt-map = <0 0 0 1 &pcie_intc 1>,
                          <0 0 0 2 &pcie_intc 2>,
                          <0 0 0 3 &pcie_intc 3>,
                          <0 0 0 4 &pcie_intc 4>;
};

Thanks in advance,
Srikanth.

>
> Regards,
> Lucas
> --
> Pengutronix e.K.                           | Lucas Stach                 |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-11 17:40         ` Srikanth Thokala
  0 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-11 17:40 UTC (permalink / raw)
  To: Lucas Stach, Tanmay Inamdar
  Cc: Stephen Warren, linux-arm-kernel, linux-sh, linux-samsung-soc,
	linux-tegra, linux-pci, devicetree, Jingoo Han, Bjorn Helgaas,
	Simon Horman, Shawn Guo, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

Hi Lucas/Tanmay,

On Thu, Mar 6, 2014 at 11:09 PM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
>> On 03/05/2014 06:25 AM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>>
>> Tested-by: Stephen Warren <swarren@nvidia.com>
>>
>> I tested both with and without patch 1/6, and the PCIe-based NIC on
>> Beaver worked fine either way. Without patch 1/6, I do see:
>>
>> pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
>>
>> ... but that seems reasonable given that the DT that of_irq_parse_pci()
>> parses is missing, and did correctly trigger the fallback path, so
>> everything still worked.
>
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

I see this error too on my setup (Xilinx PCIe Root Complex Driver),
https://lkml.org/lkml/2014/3/3/183

After digging into it, I see I need to override the API
pcibios_get_phb_of_node()
to pass my device node.  Is this the only possible way?

>From the discussion in this thread, I feel am missing something in the dt node.
Below is my dt node, please let me know if you see any issues.

+++++++++++++++++++++++
pcie{
   reg = <XXXX>;
   ranges = <YYYY>;
   interrupts = <0 52 4>;

   pcie_intc: interrupt-controller {
       interrupt-controller;
       #address-cells = <0>;
       #interrupt-cells = <1>;
   }

   interrupt-map-mask = <0 0 0 7>;
   interrupt-map = <0 0 0 1 &pcie_intc 1>,
                          <0 0 0 2 &pcie_intc 2>,
                          <0 0 0 3 &pcie_intc 3>,
                          <0 0 0 4 &pcie_intc 4>;
};

Thanks in advance,
Srikanth.

>
> Regards,
> Lucas
> --
> Pengutronix e.K.                           | Lucas Stach                 |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-11 17:40         ` Srikanth Thokala
  0 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-11 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lucas/Tanmay,

On Thu, Mar 6, 2014 at 11:09 PM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
>> On 03/05/2014 06:25 AM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>>
>> Tested-by: Stephen Warren <swarren@nvidia.com>
>>
>> I tested both with and without patch 1/6, and the PCIe-based NIC on
>> Beaver worked fine either way. Without patch 1/6, I do see:
>>
>> pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
>>
>> ... but that seems reasonable given that the DT that of_irq_parse_pci()
>> parses is missing, and did correctly trigger the fallback path, so
>> everything still worked.
>
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

I see this error too on my setup (Xilinx PCIe Root Complex Driver),
https://lkml.org/lkml/2014/3/3/183

After digging into it, I see I need to override the API
pcibios_get_phb_of_node()
to pass my device node.  Is this the only possible way?

>From the discussion in this thread, I feel am missing something in the dt node.
Below is my dt node, please let me know if you see any issues.

+++++++++++++++++++++++
pcie{
   reg = <XXXX>;
   ranges = <YYYY>;
   interrupts = <0 52 4>;

   pcie_intc: interrupt-controller {
       interrupt-controller;
       #address-cells = <0>;
       #interrupt-cells = <1>;
   }

   interrupt-map-mask = <0 0 0 7>;
   interrupt-map = <0 0 0 1 &pcie_intc 1>,
                          <0 0 0 2 &pcie_intc 2>,
                          <0 0 0 3 &pcie_intc 3>,
                          <0 0 0 4 &pcie_intc 4>;
};

Thanks in advance,
Srikanth.

>
> Regards,
> Lucas
> --
> Pengutronix e.K.                           | Lucas Stach                 |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-11 17:40         ` Srikanth Thokala
  0 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-11 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lucas/Tanmay,

On Thu, Mar 6, 2014 at 11:09 PM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Donnerstag, den 06.03.2014, 10:36 -0700 schrieb Stephen Warren:
>> On 03/05/2014 06:25 AM, Lucas Stach wrote:
>> > This is the recommended method of doing the IRQ
>> > mapping. For old devicetrees we fall back to the
>> > previous practice.
>>
>> Tested-by: Stephen Warren <swarren@nvidia.com>
>>
>> I tested both with and without patch 1/6, and the PCIe-based NIC on
>> Beaver worked fine either way. Without patch 1/6, I do see:
>>
>> pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
>>
>> ... but that seems reasonable given that the DT that of_irq_parse_pci()
>> parses is missing, and did correctly trigger the fallback path, so
>> everything still worked.
>
> Yes, this should be normal. It spits this error for old DTs, but keeps
> doing the right thing. I'm not sure if we should downgrade this to info
> or dbg.

I see this error too on my setup (Xilinx PCIe Root Complex Driver),
https://lkml.org/lkml/2014/3/3/183

After digging into it, I see I need to override the API
pcibios_get_phb_of_node()
to pass my device node.  Is this the only possible way?

From the discussion in this thread, I feel am missing something in the dt node.
Below is my dt node, please let me know if you see any issues.

+++++++++++++++++++++++
pcie{
   reg = <XXXX>;
   ranges = <YYYY>;
   interrupts = <0 52 4>;

   pcie_intc: interrupt-controller {
       interrupt-controller;
       #address-cells = <0>;
       #interrupt-cells = <1>;
   }

   interrupt-map-mask = <0 0 0 7>;
   interrupt-map = <0 0 0 1 &pcie_intc 1>,
                          <0 0 0 2 &pcie_intc 2>,
                          <0 0 0 3 &pcie_intc 3>,
                          <0 0 0 4 &pcie_intc 4>;
};

Thanks in advance,
Srikanth.

>
> Regards,
> Lucas
> --
> Pengutronix e.K.                           | Lucas Stach                 |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-04-11 17:40         ` Srikanth Thokala
  (?)
@ 2014-04-11 20:41           ` Jason Gunthorpe
  -1 siblings, 0 replies; 118+ messages in thread
From: Jason Gunthorpe @ 2014-04-11 20:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 11, 2014 at 11:10:59PM +0530, Srikanth Thokala wrote:

> I see this error too on my setup (Xilinx PCIe Root Complex Driver),
> https://lkml.org/lkml/2014/3/3/183

> After digging into it, I see I need to override the API
> pcibios_get_phb_of_node()

No, as I pointed out before, the DT node comes in through
pci_scan_root_bus:

+static struct pci_bus __init *xilinx_pcie_scan_bus(int nr,
+				struct pci_sys_data *sys)
+{
+	struct xilinx_pcie_port *port = sys_to_pcie(sys);
+	struct pci_bus *bus;
+
+	if (port) {
+		port->root_busno = sys->busnr;
+		bus = pci_scan_root_bus(NULL, sys->busnr, &xilinx_pcie_ops,
                                       ^^^^^^

You can't pass NULL here and have DT work properly. 

See http://www.spinics.net/lists/arm-kernel/msg312392.html

Jason

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-11 20:41           ` Jason Gunthorpe
  0 siblings, 0 replies; 118+ messages in thread
From: Jason Gunthorpe @ 2014-04-11 20:41 UTC (permalink / raw)
  To: Srikanth Thokala
  Cc: Lucas Stach, Tanmay Inamdar, devicetree, Jingoo Han,
	linux-samsung-soc, kernel, Arnd Bergmann, linux-sh, linux-pci,
	Stephen Warren, Bjorn Helgaas, Simon Horman, Thierry Reding,
	Ben Dooks, linux-tegra, Kukjin Kim, Shawn Guo, linux-arm-kernel

On Fri, Apr 11, 2014 at 11:10:59PM +0530, Srikanth Thokala wrote:

> I see this error too on my setup (Xilinx PCIe Root Complex Driver),
> https://lkml.org/lkml/2014/3/3/183

> After digging into it, I see I need to override the API
> pcibios_get_phb_of_node()

No, as I pointed out before, the DT node comes in through
pci_scan_root_bus:

+static struct pci_bus __init *xilinx_pcie_scan_bus(int nr,
+				struct pci_sys_data *sys)
+{
+	struct xilinx_pcie_port *port = sys_to_pcie(sys);
+	struct pci_bus *bus;
+
+	if (port) {
+		port->root_busno = sys->busnr;
+		bus = pci_scan_root_bus(NULL, sys->busnr, &xilinx_pcie_ops,
                                       ^^^^^^

You can't pass NULL here and have DT work properly. 

See http://www.spinics.net/lists/arm-kernel/msg312392.html

Jason

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-11 20:41           ` Jason Gunthorpe
  0 siblings, 0 replies; 118+ messages in thread
From: Jason Gunthorpe @ 2014-04-11 20:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 11, 2014 at 11:10:59PM +0530, Srikanth Thokala wrote:

> I see this error too on my setup (Xilinx PCIe Root Complex Driver),
> https://lkml.org/lkml/2014/3/3/183

> After digging into it, I see I need to override the API
> pcibios_get_phb_of_node()

No, as I pointed out before, the DT node comes in through
pci_scan_root_bus:

+static struct pci_bus __init *xilinx_pcie_scan_bus(int nr,
+				struct pci_sys_data *sys)
+{
+	struct xilinx_pcie_port *port = sys_to_pcie(sys);
+	struct pci_bus *bus;
+
+	if (port) {
+		port->root_busno = sys->busnr;
+		bus = pci_scan_root_bus(NULL, sys->busnr, &xilinx_pcie_ops,
                                       ^^^^^^

You can't pass NULL here and have DT work properly. 

See http://www.spinics.net/lists/arm-kernel/msg312392.html

Jason

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-04-11 20:41           ` Jason Gunthorpe
  (?)
  (?)
@ 2014-04-14 10:56               ` Srikanth Thokala
  -1 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-14 10:56 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Lucas Stach, Tanmay Inamdar, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Jingoo Han, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Arnd Bergmann,
	linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Bjorn Helgaas,
	Simon Horman, Thierry Reding, Ben Dooks,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Kukjin Kim, Shawn Guo,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sat, Apr 12, 2014 at 2:11 AM, Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> On Fri, Apr 11, 2014 at 11:10:59PM +0530, Srikanth Thokala wrote:
>
>> I see this error too on my setup (Xilinx PCIe Root Complex Driver),
>> https://lkml.org/lkml/2014/3/3/183
>
>> After digging into it, I see I need to override the API
>> pcibios_get_phb_of_node()
>
> No, as I pointed out before, the DT node comes in through
> pci_scan_root_bus:

Thanks Jason for the advice, it is working.

Srikanth

>
> +static struct pci_bus __init *xilinx_pcie_scan_bus(int nr,
> +                               struct pci_sys_data *sys)
> +{
> +       struct xilinx_pcie_port *port = sys_to_pcie(sys);
> +       struct pci_bus *bus;
> +
> +       if (port) {
> +               port->root_busno = sys->busnr;
> +               bus = pci_scan_root_bus(NULL, sys->busnr, &xilinx_pcie_ops,
>                                        ^^^^^^
>
> You can't pass NULL here and have DT work properly.
>
> See http://www.spinics.net/lists/arm-kernel/msg312392.html
>
> Jason

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-14 10:56               ` Srikanth Thokala
  0 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-14 10:56 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Lucas Stach, Tanmay Inamdar, devicetree, Jingoo Han,
	linux-samsung-soc, kernel, Arnd Bergmann, linux-sh, linux-pci,
	Stephen Warren, Bjorn Helgaas, Simon Horman, Thierry Reding,
	Ben Dooks, linux-tegra, Kukjin Kim, Shawn Guo, linux-arm-kernel

On Sat, Apr 12, 2014 at 2:11 AM, Jason Gunthorpe
<jgunthorpe@obsidianresearch.com> wrote:
> On Fri, Apr 11, 2014 at 11:10:59PM +0530, Srikanth Thokala wrote:
>
>> I see this error too on my setup (Xilinx PCIe Root Complex Driver),
>> https://lkml.org/lkml/2014/3/3/183
>
>> After digging into it, I see I need to override the API
>> pcibios_get_phb_of_node()
>
> No, as I pointed out before, the DT node comes in through
> pci_scan_root_bus:

Thanks Jason for the advice, it is working.

Srikanth

>
> +static struct pci_bus __init *xilinx_pcie_scan_bus(int nr,
> +                               struct pci_sys_data *sys)
> +{
> +       struct xilinx_pcie_port *port = sys_to_pcie(sys);
> +       struct pci_bus *bus;
> +
> +       if (port) {
> +               port->root_busno = sys->busnr;
> +               bus = pci_scan_root_bus(NULL, sys->busnr, &xilinx_pcie_ops,
>                                        ^^^^^^
>
> You can't pass NULL here and have DT work properly.
>
> See http://www.spinics.net/lists/arm-kernel/msg312392.html
>
> Jason

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-14 10:56               ` Srikanth Thokala
  0 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-14 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 12, 2014 at 2:11 AM, Jason Gunthorpe
<jgunthorpe@obsidianresearch.com> wrote:
> On Fri, Apr 11, 2014 at 11:10:59PM +0530, Srikanth Thokala wrote:
>
>> I see this error too on my setup (Xilinx PCIe Root Complex Driver),
>> https://lkml.org/lkml/2014/3/3/183
>
>> After digging into it, I see I need to override the API
>> pcibios_get_phb_of_node()
>
> No, as I pointed out before, the DT node comes in through
> pci_scan_root_bus:

Thanks Jason for the advice, it is working.

Srikanth

>
> +static struct pci_bus __init *xilinx_pcie_scan_bus(int nr,
> +                               struct pci_sys_data *sys)
> +{
> +       struct xilinx_pcie_port *port = sys_to_pcie(sys);
> +       struct pci_bus *bus;
> +
> +       if (port) {
> +               port->root_busno = sys->busnr;
> +               bus = pci_scan_root_bus(NULL, sys->busnr, &xilinx_pcie_ops,
>                                        ^^^^^^
>
> You can't pass NULL here and have DT work properly.
>
> See http://www.spinics.net/lists/arm-kernel/msg312392.html
>
> Jason

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-14 10:56               ` Srikanth Thokala
  0 siblings, 0 replies; 118+ messages in thread
From: Srikanth Thokala @ 2014-04-14 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 12, 2014 at 2:11 AM, Jason Gunthorpe
<jgunthorpe@obsidianresearch.com> wrote:
> On Fri, Apr 11, 2014 at 11:10:59PM +0530, Srikanth Thokala wrote:
>
>> I see this error too on my setup (Xilinx PCIe Root Complex Driver),
>> https://lkml.org/lkml/2014/3/3/183
>
>> After digging into it, I see I need to override the API
>> pcibios_get_phb_of_node()
>
> No, as I pointed out before, the DT node comes in through
> pci_scan_root_bus:

Thanks Jason for the advice, it is working.

Srikanth

>
> +static struct pci_bus __init *xilinx_pcie_scan_bus(int nr,
> +                               struct pci_sys_data *sys)
> +{
> +       struct xilinx_pcie_port *port = sys_to_pcie(sys);
> +       struct pci_bus *bus;
> +
> +       if (port) {
> +               port->root_busno = sys->busnr;
> +               bus = pci_scan_root_bus(NULL, sys->busnr, &xilinx_pcie_ops,
>                                        ^^^^^^
>
> You can't pass NULL here and have DT work properly.
>
> See http://www.spinics.net/lists/arm-kernel/msg312392.html
>
> Jason

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-04-04 16:55     ` Bjorn Helgaas
  (?)
@ 2014-04-15 10:07       ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-15 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bjorn,

Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> v3.15 shortly after that.  Thanks.
> 

Are you still planning to push this into 3.15, or has this slipped to
3.16?

Regards,
Lucas
-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |


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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-15 10:07       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-15 10:07 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

Hi Bjorn,

Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> v3.15 shortly after that.  Thanks.
> 

Are you still planning to push this into 3.15, or has this slipped to
3.16?

Regards,
Lucas
-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-15 10:07       ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-15 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bjorn,

Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > This is the recommended method of doing the IRQ
> > mapping. For old devicetrees we fall back to the
> > previous practice.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> v3.15 shortly after that.  Thanks.
> 

Are you still planning to push this into 3.15, or has this slipped to
3.16?

Regards,
Lucas
-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-04-15 10:07       ` Lucas Stach
  (?)
@ 2014-04-15 18:30         ` Bjorn Helgaas
  -1 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-15 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> Hi Bjorn,
> 
> Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > This is the recommended method of doing the IRQ
> > > mapping. For old devicetrees we fall back to the
> > > previous practice.
> > > 
> > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > v3.15 shortly after that.  Thanks.
> > 
> 
> Are you still planning to push this into 3.15, or has this slipped to
> 3.16?

Yes, I'm hoping to put them in v3.15.  I assume these actually
fix something, e.g., we need these changes to boot with new devicetrees, or
something?

The changelogs don't make it clear that these are fixes, and I want to heed
Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
*not* want to hear about 'sorry this missed the window, can I still sneak
in'.  Fixes only."

I should have applied these sooner to make the merge window; I apologize
for that.  Anyway, if you outline what these fix, I'll update the
changelogs in my tree.

Bjorn

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-15 18:30         ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-15 18:30 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> Hi Bjorn,
> 
> Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > This is the recommended method of doing the IRQ
> > > mapping. For old devicetrees we fall back to the
> > > previous practice.
> > > 
> > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > v3.15 shortly after that.  Thanks.
> > 
> 
> Are you still planning to push this into 3.15, or has this slipped to
> 3.16?

Yes, I'm hoping to put them in v3.15.  I assume these actually
fix something, e.g., we need these changes to boot with new devicetrees, or
something?

The changelogs don't make it clear that these are fixes, and I want to heed
Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
*not* want to hear about 'sorry this missed the window, can I still sneak
in'.  Fixes only."

I should have applied these sooner to make the merge window; I apologize
for that.  Anyway, if you outline what these fix, I'll update the
changelogs in my tree.

Bjorn

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-15 18:30         ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-15 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> Hi Bjorn,
> 
> Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > This is the recommended method of doing the IRQ
> > > mapping. For old devicetrees we fall back to the
> > > previous practice.
> > > 
> > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > v3.15 shortly after that.  Thanks.
> > 
> 
> Are you still planning to push this into 3.15, or has this slipped to
> 3.16?

Yes, I'm hoping to put them in v3.15.  I assume these actually
fix something, e.g., we need these changes to boot with new devicetrees, or
something?

The changelogs don't make it clear that these are fixes, and I want to heed
Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
*not* want to hear about 'sorry this missed the window, can I still sneak
in'.  Fixes only."

I should have applied these sooner to make the merge window; I apologize
for that.  Anyway, if you outline what these fix, I'll update the
changelogs in my tree.

Bjorn

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-04-15 18:30         ` Bjorn Helgaas
  (?)
@ 2014-04-16  8:20           ` Lucas Stach
  -1 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-16  8:20 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, den 15.04.2014, 12:30 -0600 schrieb Bjorn Helgaas:
> On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> > Hi Bjorn,
> > 
> > Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > > This is the recommended method of doing the IRQ
> > > > mapping. For old devicetrees we fall back to the
> > > > previous practice.
> > > > 
> > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > > v3.15 shortly after that.  Thanks.
> > > 
> > 
> > Are you still planning to push this into 3.15, or has this slipped to
> > 3.16?
> 
> Yes, I'm hoping to put them in v3.15.  I assume these actually
> fix something, e.g., we need these changes to boot with new devicetrees, or
> something?
> 
> The changelogs don't make it clear that these are fixes, and I want to heed
> Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
> *not* want to hear about 'sorry this missed the window, can I still sneak
> in'.  Fixes only."
> 
> I should have applied these sooner to make the merge window; I apologize
> for that.  Anyway, if you outline what these fix, I'll update the
> changelogs in my tree.
> 
Actually they are a bit on the fence.

The i.MX and thus the designware patch actually fixes wrong behavior,
where all PCI legacy interrupts would be mapped to a single GIC
interrupt, which would leave INT B,C,D nonfunctional on i.MX.

The others only make DT interrupt mapping functional for all drivers, so
they would be useful if you need to remap interrupts across bridges or
something. But apparently nobody had the need to to this on platforms
other than i.MX until now, so those patches only fix a theoretical
issue.

Regards,
Lucas
-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |


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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-16  8:20           ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-16  8:20 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

Am Dienstag, den 15.04.2014, 12:30 -0600 schrieb Bjorn Helgaas:
> On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> > Hi Bjorn,
> > 
> > Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > > This is the recommended method of doing the IRQ
> > > > mapping. For old devicetrees we fall back to the
> > > > previous practice.
> > > > 
> > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > > v3.15 shortly after that.  Thanks.
> > > 
> > 
> > Are you still planning to push this into 3.15, or has this slipped to
> > 3.16?
> 
> Yes, I'm hoping to put them in v3.15.  I assume these actually
> fix something, e.g., we need these changes to boot with new devicetrees, or
> something?
> 
> The changelogs don't make it clear that these are fixes, and I want to heed
> Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
> *not* want to hear about 'sorry this missed the window, can I still sneak
> in'.  Fixes only."
> 
> I should have applied these sooner to make the merge window; I apologize
> for that.  Anyway, if you outline what these fix, I'll update the
> changelogs in my tree.
> 
Actually they are a bit on the fence.

The i.MX and thus the designware patch actually fixes wrong behavior,
where all PCI legacy interrupts would be mapped to a single GIC
interrupt, which would leave INT B,C,D nonfunctional on i.MX.

The others only make DT interrupt mapping functional for all drivers, so
they would be useful if you need to remap interrupts across bridges or
something. But apparently nobody had the need to to this on platforms
other than i.MX until now, so those patches only fix a theoretical
issue.

Regards,
Lucas
-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-16  8:20           ` Lucas Stach
  0 siblings, 0 replies; 118+ messages in thread
From: Lucas Stach @ 2014-04-16  8:20 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, den 15.04.2014, 12:30 -0600 schrieb Bjorn Helgaas:
> On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> > Hi Bjorn,
> > 
> > Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > > This is the recommended method of doing the IRQ
> > > > mapping. For old devicetrees we fall back to the
> > > > previous practice.
> > > > 
> > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > > v3.15 shortly after that.  Thanks.
> > > 
> > 
> > Are you still planning to push this into 3.15, or has this slipped to
> > 3.16?
> 
> Yes, I'm hoping to put them in v3.15.  I assume these actually
> fix something, e.g., we need these changes to boot with new devicetrees, or
> something?
> 
> The changelogs don't make it clear that these are fixes, and I want to heed
> Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
> *not* want to hear about 'sorry this missed the window, can I still sneak
> in'.  Fixes only."
> 
> I should have applied these sooner to make the merge window; I apologize
> for that.  Anyway, if you outline what these fix, I'll update the
> changelogs in my tree.
> 
Actually they are a bit on the fence.

The i.MX and thus the designware patch actually fixes wrong behavior,
where all PCI legacy interrupts would be mapped to a single GIC
interrupt, which would leave INT B,C,D nonfunctional on i.MX.

The others only make DT interrupt mapping functional for all drivers, so
they would be useful if you need to remap interrupts across bridges or
something. But apparently nobody had the need to to this on platforms
other than i.MX until now, so those patches only fix a theoretical
issue.

Regards,
Lucas
-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
  2014-04-16  8:20           ` Lucas Stach
  (?)
@ 2014-04-16 16:29             ` Bjorn Helgaas
  -1 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-16 16:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 16, 2014 at 10:20:45AM +0200, Lucas Stach wrote:
> Am Dienstag, den 15.04.2014, 12:30 -0600 schrieb Bjorn Helgaas:
> > On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> > > Hi Bjorn,
> > > 
> > > Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > > > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > > > This is the recommended method of doing the IRQ
> > > > > mapping. For old devicetrees we fall back to the
> > > > > previous practice.
> > > > > 
> > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > > > 
> > > > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > > > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > > > v3.15 shortly after that.  Thanks.
> > > > 
> > > 
> > > Are you still planning to push this into 3.15, or has this slipped to
> > > 3.16?
> > 
> > Yes, I'm hoping to put them in v3.15.  I assume these actually
> > fix something, e.g., we need these changes to boot with new devicetrees, or
> > something?
> > 
> > The changelogs don't make it clear that these are fixes, and I want to heed
> > Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
> > *not* want to hear about 'sorry this missed the window, can I still sneak
> > in'.  Fixes only."
> > 
> > I should have applied these sooner to make the merge window; I apologize
> > for that.  Anyway, if you outline what these fix, I'll update the
> > changelogs in my tree.
> > 
> Actually they are a bit on the fence.
> 
> The i.MX and thus the designware patch actually fixes wrong behavior,
> where all PCI legacy interrupts would be mapped to a single GIC
> interrupt, which would leave INT B,C,D nonfunctional on i.MX.
> 
> The others only make DT interrupt mapping functional for all drivers, so
> they would be useful if you need to remap interrupts across bridges or
> something. But apparently nobody had the need to to this on platforms
> other than i.MX until now, so those patches only fix a theoretical
> issue.

It sounds like the others should fix real problems; it's just that nobody
has actually tested relevant configurations yet.  I think that's fair game,
so I updated the changelogs and put them in my for-linus branch for v3.15.

This includes the designware, rcar, and tegra patches.

Bjorn

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

* Re: [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-16 16:29             ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-16 16:29 UTC (permalink / raw)
  To: Lucas Stach
  Cc: linux-arm-kernel, linux-sh, linux-samsung-soc, linux-tegra,
	linux-pci, devicetree, Jingoo Han, Simon Horman, Shawn Guo,
	Stephen Warren, Ben Dooks, Kukjin Kim, Thierry Reding,
	Arnd Bergmann, kernel

On Wed, Apr 16, 2014 at 10:20:45AM +0200, Lucas Stach wrote:
> Am Dienstag, den 15.04.2014, 12:30 -0600 schrieb Bjorn Helgaas:
> > On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> > > Hi Bjorn,
> > > 
> > > Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > > > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > > > This is the recommended method of doing the IRQ
> > > > > mapping. For old devicetrees we fall back to the
> > > > > previous practice.
> > > > > 
> > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > > > 
> > > > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > > > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > > > v3.15 shortly after that.  Thanks.
> > > > 
> > > 
> > > Are you still planning to push this into 3.15, or has this slipped to
> > > 3.16?
> > 
> > Yes, I'm hoping to put them in v3.15.  I assume these actually
> > fix something, e.g., we need these changes to boot with new devicetrees, or
> > something?
> > 
> > The changelogs don't make it clear that these are fixes, and I want to heed
> > Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
> > *not* want to hear about 'sorry this missed the window, can I still sneak
> > in'.  Fixes only."
> > 
> > I should have applied these sooner to make the merge window; I apologize
> > for that.  Anyway, if you outline what these fix, I'll update the
> > changelogs in my tree.
> > 
> Actually they are a bit on the fence.
> 
> The i.MX and thus the designware patch actually fixes wrong behavior,
> where all PCI legacy interrupts would be mapped to a single GIC
> interrupt, which would leave INT B,C,D nonfunctional on i.MX.
> 
> The others only make DT interrupt mapping functional for all drivers, so
> they would be useful if you need to remap interrupts across bridges or
> something. But apparently nobody had the need to to this on platforms
> other than i.MX until now, so those patches only fix a theoretical
> issue.

It sounds like the others should fix real problems; it's just that nobody
has actually tested relevant configurations yet.  I think that's fair game,
so I updated the changelogs and put them in my for-linus branch for v3.15.

This includes the designware, rcar, and tegra patches.

Bjorn

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

* [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible
@ 2014-04-16 16:29             ` Bjorn Helgaas
  0 siblings, 0 replies; 118+ messages in thread
From: Bjorn Helgaas @ 2014-04-16 16:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 16, 2014 at 10:20:45AM +0200, Lucas Stach wrote:
> Am Dienstag, den 15.04.2014, 12:30 -0600 schrieb Bjorn Helgaas:
> > On Tue, Apr 15, 2014 at 12:07:34PM +0200, Lucas Stach wrote:
> > > Hi Bjorn,
> > > 
> > > Am Freitag, den 04.04.2014, 10:55 -0600 schrieb Bjorn Helgaas:
> > > > On Wed, Mar 05, 2014 at 02:25:47PM +0100, Lucas Stach wrote:
> > > > > This is the recommended method of doing the IRQ
> > > > > mapping. For old devicetrees we fall back to the
> > > > > previous practice.
> > > > > 
> > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > > > 
> > > > Applied with Stephen's Tested-by to my pending/host-tegra branch.  I'll
> > > > rebase and rename it after v3.15-rc1, and I think we can squeeze it into
> > > > v3.15 shortly after that.  Thanks.
> > > > 
> > > 
> > > Are you still planning to push this into 3.15, or has this slipped to
> > > 3.16?
> > 
> > Yes, I'm hoping to put them in v3.15.  I assume these actually
> > fix something, e.g., we need these changes to boot with new devicetrees, or
> > something?
> > 
> > The changelogs don't make it clear that these are fixes, and I want to heed
> > Linus' guidance: "Anyway, because -rc1 is already pretty darn big, I do
> > *not* want to hear about 'sorry this missed the window, can I still sneak
> > in'.  Fixes only."
> > 
> > I should have applied these sooner to make the merge window; I apologize
> > for that.  Anyway, if you outline what these fix, I'll update the
> > changelogs in my tree.
> > 
> Actually they are a bit on the fence.
> 
> The i.MX and thus the designware patch actually fixes wrong behavior,
> where all PCI legacy interrupts would be mapped to a single GIC
> interrupt, which would leave INT B,C,D nonfunctional on i.MX.
> 
> The others only make DT interrupt mapping functional for all drivers, so
> they would be useful if you need to remap interrupts across bridges or
> something. But apparently nobody had the need to to this on platforms
> other than i.MX until now, so those patches only fix a theoretical
> issue.

It sounds like the others should fix real problems; it's just that nobody
has actually tested relevant configurations yet.  I think that's fair game,
so I updated the changelogs and put them in my for-linus branch for v3.15.

This includes the designware, rcar, and tegra patches.

Bjorn

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

end of thread, other threads:[~2014-04-16 16:29 UTC | newest]

Thread overview: 118+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 13:25 [PATCH v2 0/6] PCI irq mapping fixes and cleanups Lucas Stach
2014-03-05 13:25 ` Lucas Stach
2014-03-05 13:25 ` Lucas Stach
2014-03-05 13:25 ` [PATCH v2 1/6] ARM: dts: tegra: add PCIe interrupt mapping properties Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 21:55   ` Stephen Warren
2014-03-05 21:55     ` Stephen Warren
2014-03-05 21:55     ` Stephen Warren
2014-03-05 21:55     ` Stephen Warren
2014-03-06  9:33     ` Lucas Stach
2014-03-06  9:33       ` Lucas Stach
2014-03-06  9:33       ` Lucas Stach
2014-03-06 17:41   ` Stephen Warren
2014-03-06 17:41     ` Stephen Warren
2014-03-06 17:41     ` Stephen Warren
2014-03-05 13:25 ` [PATCH v2 2/6] PCI: tegra: use new OF interrupt mapping when possible Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-06 17:36   ` Stephen Warren
2014-03-06 17:36     ` Stephen Warren
2014-03-06 17:36     ` Stephen Warren
2014-03-06 17:39     ` Lucas Stach
2014-03-06 17:39       ` Lucas Stach
2014-03-06 17:39       ` Lucas Stach
2014-03-07  0:25       ` Arnd Bergmann
2014-03-07  0:25         ` Arnd Bergmann
2014-03-07  0:25         ` Arnd Bergmann
2014-03-07  0:25         ` Arnd Bergmann
2014-03-07  3:31         ` Jingoo Han
2014-03-07  3:31           ` Jingoo Han
2014-03-07  3:31           ` Jingoo Han
2014-04-11 17:40       ` Srikanth Thokala
2014-04-11 17:52         ` Srikanth Thokala
2014-04-11 17:40         ` Srikanth Thokala
2014-04-11 17:40         ` Srikanth Thokala
2014-04-11 20:41         ` Jason Gunthorpe
2014-04-11 20:41           ` Jason Gunthorpe
2014-04-11 20:41           ` Jason Gunthorpe
     [not found]           ` <20140411204140.GA8967-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-04-14 10:56             ` Srikanth Thokala
2014-04-14 10:56               ` Srikanth Thokala
2014-04-14 10:56               ` Srikanth Thokala
2014-04-14 10:56               ` Srikanth Thokala
2014-04-04 16:55   ` Bjorn Helgaas
2014-04-04 16:55     ` Bjorn Helgaas
2014-04-04 16:55     ` Bjorn Helgaas
2014-04-15 10:07     ` Lucas Stach
2014-04-15 10:07       ` Lucas Stach
2014-04-15 10:07       ` Lucas Stach
2014-04-15 18:30       ` Bjorn Helgaas
2014-04-15 18:30         ` Bjorn Helgaas
2014-04-15 18:30         ` Bjorn Helgaas
2014-04-16  8:20         ` Lucas Stach
2014-04-16  8:20           ` Lucas Stach
2014-04-16  8:20           ` Lucas Stach
2014-04-16 16:29           ` Bjorn Helgaas
2014-04-16 16:29             ` Bjorn Helgaas
2014-04-16 16:29             ` Bjorn Helgaas
2014-03-05 13:25 ` [PATCH v2 3/6] PCI: rcar: " Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-06  4:12   ` Simon Horman
2014-03-06  4:12     ` Simon Horman
2014-03-06  4:12     ` Simon Horman
2014-04-04 17:01   ` Bjorn Helgaas
2014-04-04 17:01     ` Bjorn Helgaas
2014-04-04 17:01     ` Bjorn Helgaas
2014-04-04 17:01     ` Bjorn Helgaas
2014-04-07  9:30     ` [PATCH v2 rebased] " Lucas Stach
2014-04-07  9:30       ` Lucas Stach
2014-04-07  9:30       ` Lucas Stach
2014-03-05 13:25 ` [PATCH v2 4/6] ARM: dts: exynos5440: fix PCIe interrupt mapping Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-06  2:38   ` Jingoo Han
2014-03-06  2:38     ` Jingoo Han
2014-03-06  2:38     ` Jingoo Han
2014-03-05 13:25 ` [PATCH v2 5/6] ARM: dts: imx6: add PCIe interrupt mapping properties Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-10  3:09   ` Shawn Guo
2014-03-10  3:09     ` Shawn Guo
2014-03-10  3:09     ` Shawn Guo
2014-03-10  3:09     ` Shawn Guo
2014-03-05 13:25 ` [PATCH v2 6/6] PCI: designware: use new OF interrupt mapping when possible Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 13:25   ` Lucas Stach
2014-03-05 18:42   ` Jason Gunthorpe
2014-03-05 18:42     ` Jason Gunthorpe
2014-03-05 18:42     ` Jason Gunthorpe
2014-04-04 17:03     ` Bjorn Helgaas
2014-04-04 17:03       ` Bjorn Helgaas
2014-04-04 17:03       ` Bjorn Helgaas
2014-04-04 17:05       ` Bjorn Helgaas
2014-04-04 17:05         ` Bjorn Helgaas
2014-04-04 17:05         ` Bjorn Helgaas
2014-04-04 17:05         ` Bjorn Helgaas
2014-04-07  8:38         ` Lucas Stach
2014-04-07  8:38           ` Lucas Stach
2014-04-07  8:38           ` Lucas Stach
2014-04-07  9:13           ` Jingoo Han
2014-04-07  9:13             ` Jingoo Han
2014-04-07  9:13             ` Jingoo Han
2014-03-06  2:47   ` Jingoo Han
2014-03-06  2:47     ` Jingoo Han
2014-03-06  2:47     ` Jingoo Han
2014-03-06 15:33     ` Marek Vasut
2014-03-06 15:33       ` Marek Vasut
2014-03-06 15:33       ` Marek Vasut
2014-03-06 15:33       ` Marek Vasut
2014-03-13 17:41       ` Tim Harvey
2014-03-13 17:41         ` Tim Harvey
2014-03-13 17:41         ` Tim Harvey
2014-03-13 17:41         ` Tim Harvey
2014-03-28 15:47 ` [PATCH v2 0/6] PCI irq mapping fixes and cleanups Lucas Stach
2014-03-28 15:47   ` Lucas Stach
2014-03-28 15:47   ` Lucas Stach
2014-03-28 15:47   ` Lucas Stach

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.