diff mbox

[V7,07/10] SPEAr13XX: dts: Add PCIe node information

Message ID b02c2cf599817a852e0cdb2e24e76e74da02637d.1393568715.git.mohit.kumar@st.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mohit KUMAR DCG Feb. 28, 2014, 11:55 a.m. UTC
From: Pratyush Anand <pratyush.anand@st.com>

SPEAr1310 and SPEAr1340 supports 3 and 1 PCIe controller respectively.
These controllers are based on synopsys designware controller.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Cc: Mohit Kumar <mohit.kumar@st.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: spear-devel@list.st.com
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm/boot/dts/spear1310.dtsi |   48 ++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/spear1340.dtsi |   16 ++++++++++++
 2 files changed, 64 insertions(+), 0 deletions(-)

Comments

Arnd Bergmann Feb. 28, 2014, 11:58 a.m. UTC | #1
On Friday 28 February 2014 17:25:00 Mohit Kumar wrote:
> +                       interrupts = <0 68 0x4>;
> +                       interrupt-map-mask = <0 0 0 0>;
> +                       interrupt-map = <0x0 0 &gic 68>;
> 

From the discussion we just had on the imx version of this driver, I suspect
what you want instead is to drop the interrupts property and fix the interrupt
map to be

interrupt-map = <0x0 0 &gic 0 68 0x4>;

	Arnd
Mohit KUMAR DCG March 3, 2014, 4:45 a.m. UTC | #2
Hello Arnd,

> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Friday, February 28, 2014 5:28 PM
> To: Mohit KUMAR DCG
> Cc: Pratyush ANAND; Viresh Kumar; spear-devel; linux-arm-
> kernel@lists.infradead.org
> Subject: Re: [PATCH V7 07/10] SPEAr13XX: dts: Add PCIe node information
> 
> On Friday 28 February 2014 17:25:00 Mohit Kumar wrote:
> > +                       interrupts = <0 68 0x4>;
> > +                       interrupt-map-mask = <0 0 0 0>;
> > +                       interrupt-map = <0x0 0 &gic 68>;
> >
> 
> From the discussion we just had on the imx version of this driver, I suspect
> what you want instead is to drop the interrupts property and fix the interrupt
> map to be
> 
> interrupt-map = <0x0 0 &gic 0 68 0x4>;
> 

- yes, I should have fix interrupt map. Pls let us know if any other point needs to be
Incorporated in this series.

Regards
Mohit
Arnd Bergmann March 14, 2014, 10:34 a.m. UTC | #3
On Monday 03 March 2014, Mohit KUMAR DCG wrote:
> Hello Arnd,
> 
> > -----Original Message-----
> > From: Arnd Bergmann [mailto:arnd@arndb.de]
> > Sent: Friday, February 28, 2014 5:28 PM
> > To: Mohit KUMAR DCG
> > Cc: Pratyush ANAND; Viresh Kumar; spear-devel; linux-arm-
> > kernel@lists.infradead.org
> > Subject: Re: [PATCH V7 07/10] SPEAr13XX: dts: Add PCIe node information
> > 
> > On Friday 28 February 2014 17:25:00 Mohit Kumar wrote:
> > > +                       interrupts = <0 68 0x4>;
> > > +                       interrupt-map-mask = <0 0 0 0>;
> > > +                       interrupt-map = <0x0 0 &gic 68>;
> > >
> > 
> > From the discussion we just had on the imx version of this driver, I suspect
> > what you want instead is to drop the interrupts property and fix the interrupt
> > map to be
> > 
> > interrupt-map = <0x0 0 &gic 0 68 0x4>;
> > 
> 
> - yes, I should have fix interrupt map. Pls let us know if any other point needs to be
> Incorporated in this series.
> 

I just noticed from your code that you use the 68 interrupt both for MSI and
legacy interrupts. Is this what the hardware does? I was asking above that
the 'interrupts' property be dropped, but I guess that won't work if it's
also used for MSI.

Please clarify.

Aside from this, all patches

Acked-by: Arnd Bergmann <arnd@arndb.de>

	Arnd
Mohit KUMAR DCG March 14, 2014, 11:08 a.m. UTC | #4
Hello Arnd,

> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Friday, March 14, 2014 4:04 PM
> To: Mohit KUMAR DCG
> Cc: Pratyush ANAND; Viresh Kumar; spear-devel; linux-arm-
> kernel@lists.infradead.org
> Subject: Re: [PATCH V7 07/10] SPEAr13XX: dts: Add PCIe node information
> 
> On Monday 03 March 2014, Mohit KUMAR DCG wrote:
> > Hello Arnd,
> >
> > > -----Original Message-----
> > > From: Arnd Bergmann [mailto:arnd@arndb.de]
> > > Sent: Friday, February 28, 2014 5:28 PM
> > > To: Mohit KUMAR DCG
> > > Cc: Pratyush ANAND; Viresh Kumar; spear-devel; linux-arm-
> > > kernel@lists.infradead.org
> > > Subject: Re: [PATCH V7 07/10] SPEAr13XX: dts: Add PCIe node
> > > information
> > >
> > > On Friday 28 February 2014 17:25:00 Mohit Kumar wrote:
> > > > +                       interrupts = <0 68 0x4>;
> > > > +                       interrupt-map-mask = <0 0 0 0>;
> > > > +                       interrupt-map = <0x0 0 &gic 68>;
> > > >
> > >
> > > From the discussion we just had on the imx version of this driver, I
> > > suspect what you want instead is to drop the interrupts property and
> > > fix the interrupt map to be
> > >
> > > interrupt-map = <0x0 0 &gic 0 68 0x4>;
> > >
> >
> > - yes, I should have fix interrupt map. Pls let us know if any other
> > point needs to be Incorporated in this series.
> >
> 
> I just noticed from your code that you use the 68 interrupt both for MSI and
> legacy interrupts. Is this what the hardware does? I was asking above that
> the 'interrupts' property be dropped, but I guess that won't work if it's also
> used for MSI.
>
> Please clarify.

- Yes, single interrupt line for PCIe  is shared between MSI and legacy interrupt.

> 
> Aside from this, all patches
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>

- Thanks :-)
Mohit
> 
> 	Arnd
Mohit KUMAR DCG March 24, 2014, 3:57 a.m. UTC | #5
Hello Bjorn,

Could you pls pick up this series into your tree so that others can rebase there work on the top of it.

Thanks
Mohit

> -----Original Message-----
> From: Mohit KUMAR [mailto:mohit.kumar@st.com]
> Sent: Friday, March 14, 2014 4:39 PM
> To: Arnd Bergmann
> Cc: Pratyush ANAND; Viresh Kumar; spear-devel; linux-arm-
> kernel@lists.infradead.org
> Subject: RE: [PATCH V7 07/10] SPEAr13XX: dts: Add PCIe node information
> 
> Hello Arnd,
> 
> > -----Original Message-----
> > From: Arnd Bergmann [mailto:arnd@arndb.de]
> > Sent: Friday, March 14, 2014 4:04 PM
> > To: Mohit KUMAR DCG
> > Cc: Pratyush ANAND; Viresh Kumar; spear-devel; linux-arm-
> > kernel@lists.infradead.org
> > Subject: Re: [PATCH V7 07/10] SPEAr13XX: dts: Add PCIe node
> > information
> >
> > On Monday 03 March 2014, Mohit KUMAR DCG wrote:
> > > Hello Arnd,
> > >
> > > > -----Original Message-----
> > > > From: Arnd Bergmann [mailto:arnd@arndb.de]
> > > > Sent: Friday, February 28, 2014 5:28 PM
> > > > To: Mohit KUMAR DCG
> > > > Cc: Pratyush ANAND; Viresh Kumar; spear-devel; linux-arm-
> > > > kernel@lists.infradead.org
> > > > Subject: Re: [PATCH V7 07/10] SPEAr13XX: dts: Add PCIe node
> > > > information
> > > >
> > > > On Friday 28 February 2014 17:25:00 Mohit Kumar wrote:
> > > > > +                       interrupts = <0 68 0x4>;
> > > > > +                       interrupt-map-mask = <0 0 0 0>;
> > > > > +                       interrupt-map = <0x0 0 &gic 68>;
> > > > >
> > > >
> > > > From the discussion we just had on the imx version of this driver,
> > > > I suspect what you want instead is to drop the interrupts property
> > > > and fix the interrupt map to be
> > > >
> > > > interrupt-map = <0x0 0 &gic 0 68 0x4>;
> > > >
> > >
> > > - yes, I should have fix interrupt map. Pls let us know if any other
> > > point needs to be Incorporated in this series.
> > >
> >
> > I just noticed from your code that you use the 68 interrupt both for
> > MSI and legacy interrupts. Is this what the hardware does? I was
> > asking above that the 'interrupts' property be dropped, but I guess
> > that won't work if it's also used for MSI.
> >
> > Please clarify.
> 
> - Yes, single interrupt line for PCIe  is shared between MSI and legacy
> interrupt.
> 
> >
> > Aside from this, all patches
> >
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> - Thanks :-)
> Mohit
> >
> > 	Arnd
diff mbox

Patch

diff --git a/arch/arm/boot/dts/spear1310.dtsi b/arch/arm/boot/dts/spear1310.dtsi
index 64e7dd5..136a12d 100644
--- a/arch/arm/boot/dts/spear1310.dtsi
+++ b/arch/arm/boot/dts/spear1310.dtsi
@@ -83,6 +83,54 @@ 
 			status = "disabled";
 		};
 
+		pcie0: pcie@b1000000 {
+			compatible = "st,spear1340-pcie", "snps,dw-pcie";
+			reg = <0xb1000000 0x4000>;
+			interrupts = <0 68 0x4>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0x0 0 &gic 68>;
+			num-lanes = <1>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			ranges = <0x00000800 0 0x80000000 0x80000000 0 0x00020000   /* configuration space */
+				0x81000000 0 0	 0x80020000 0 0x00010000   /* downstream I/O */
+				0x82000000 0 0x80030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
+			status = "disabled";
+		};
+
+		pcie1: pcie@b1800000 {
+			compatible = "st,spear1340-pcie", "snps,dw-pcie";
+			reg = <0xb1800000 0x4000>;
+			interrupts = <0 69 0x4>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0x0 0 &gic 69>;
+			num-lanes = <1>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			ranges = <0x00000800 0 0x90000000 0x90000000 0 0x00020000   /* configuration space */
+				0x81000000 0 0  0x90020000 0 0x00010000   /* downstream I/O */
+				0x82000000 0 0x90030000 0x90030000 0 0x0ffd0000>; /* non-prefetchable memory */
+			status = "disabled";
+		};
+
+		pcie2: pcie@b4000000 {
+			compatible = "st,spear1340-pcie", "snps,dw-pcie";
+			reg = <0xb4000000 0x4000>;
+			interrupts = <0 70 0x4>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0x0 0 &gic 70>;
+			num-lanes = <1>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			ranges = <0x00000800 0 0xc0000000 0xc0000000 0 0x00020000   /* configuration space */
+				0x81000000 0 0	 0xc0020000 0 0x00010000   /* downstream I/O */
+				0x82000000 0 0xc0030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
+			status = "disabled";
+		};
+
 		gmac1: eth@5c400000 {
 			compatible = "st,spear600-gmac";
 			reg = <0x5c400000 0x8000>;
diff --git a/arch/arm/boot/dts/spear1340.dtsi b/arch/arm/boot/dts/spear1340.dtsi
index b8b32c7..9af299d 100644
--- a/arch/arm/boot/dts/spear1340.dtsi
+++ b/arch/arm/boot/dts/spear1340.dtsi
@@ -48,6 +48,22 @@ 
 			status = "disabled";
 		};
 
+		pcie0: pcie@b1000000 {
+			compatible = "st,spear1340-pcie", "snps,dw-pcie";
+			reg = <0xb1000000 0x4000>;
+			interrupts = <0 68 0x4>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0x0 0 &gic 68>;
+			num-lanes = <1>;
+			#address-cells = <3>;
+			#size-cells = <2>;
+			device_type = "pci";
+			ranges = <0x00000800 0 0x80000000 0x80000000 0 0x00020000   /* configuration space */
+				0x81000000 0 0	 0x80020000 0 0x00010000   /* downstream I/O */
+				0x82000000 0 0x80030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
+			status = "disabled";
+		};
+
 		i2s-play@b2400000 {
 			compatible = "snps,designware-i2s";
 			reg = <0xb2400000 0x10000>;