Skip to contentSkip to conversation

ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

PATCH New Arnaud Ebalard 4 participants 20 messages Nov 5, 2013 – Nov 23, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

Hi,

As discussed earlier, here is a set of two patches fixing Armada XP mv78230 and mv78260 PCIe units definition. AFAICT, the most accurate information available regarding those is the table available on the following page:

http://www.marvell.com/embedded-processors/armada-xp/

First patch is simply a resend of the one Thomas reviewed with my SoB. It fixes mv78230 .dtsi and has been tested on real hardware.

Second patch fixes mv78260 .dtsi to reflect the fact that the two first units are x4 and quad x1 capable, and third (and last) interface is x4 only. This patch has only been compiled and not tested on real hardware. As associated changes are quite error-prone, I think it needs some careful review.

As a side note, Thomas, I noticed one more thing, this time in mv78460 .dtsi when comparing it w/ mv78230 and mv78260 ones. The first address of "assigned-address" property varies in the former for each pcie node:

$ grep assigned-address armada-xp-mv78230.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
$ grep assigned-address armada-xp-mv78260.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
$ grep assigned-address armada-xp-mv78460.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
         assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;

I took at Documentation/devicetree/bindings/pci/mvebu-pci.txt but failed to find an answer. Can you explain where the difference comes from?

Cheers,

a+

Arnaud Ebalard (2):
ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable
ARM: mvebu: fix second and third PCIe units of Armada XP mv78260

 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  24 +++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 109 ++++++++++++++++++++++++-------
 2 files changed, 97 insertions(+), 36 deletions(-)
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

Various Marvell datasheets advertise second PCIe unit of mv78230 flavour of Armada XP as x4/quad x1 capable. This second unit is in fact only x1 capable. This patch fixes current mv78230 .dtsi to reflect that, i.e. makes 1.0 the second interface (instead of 2.0 at the moment). This was successfully tested on a mv78230-based ReadyNAS 2120 platform with a x1 device (FL1009 XHCI controller) connected to this second interface.

---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm/boot/dts/armada-xp-mv78230.dtsi +12 -12
index 0358a33..9dc7381 100644
@@ -47,7 +47,7 @@
 		/*
 		 * MV78230 has 2 PCIe units Gen2.0: One unit can be
 		 * configured as x4 or quad x1 lanes. One unit is
-		 * x4/x1.
+		 * x1 only.
 		 */
 		pcie-controller {
 			compatible = "marvell,armada-xp-pcie";
@@ -61,10 +61,10 @@
 
 			ranges =
 			       <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000   /* Port 0.0 registers */
-				0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000   /* Port 2.0 registers */
 				0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000   /* Port 0.1 registers */
 				0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000   /* Port 0.2 registers */
 				0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000   /* Port 0.3 registers */
+				0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000   /* Port 1.0 registers */
 				0x82000000 0x1 0       MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
 				0x81000000 0x1 0       MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO  */
 				0x82000000 0x2 0       MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */
@@ -73,8 +73,8 @@
 				0x81000000 0x3 0       MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO  */
 				0x82000000 0x4 0       MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */
 				0x81000000 0x4 0       MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO  */
-				0x82000000 0x9 0       MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */
-				0x81000000 0x9 0       MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO  */>;
+				0x82000000 0x5 0       MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
+				0x81000000 0x5 0       MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO  */>;
 
 			pcie at 1,0 {
 				device_type = "pci";
@@ -144,20 +144,20 @@
 				status = "disabled";
 			};
 
-			pcie at 9,0 {
+			pcie at 5,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
-				reg = <0x4800 0 0 0 0>;
+				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				reg = <0x2800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
 				#interrupt-cells = <1>;
-				ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
-					  0x81000000 0 0 0x81000000 0x9 0 1 0>;
+				ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0
+					  0x81000000 0 0 0x81000000 0x5 0 1 0>;
 				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &mpic 99>;
-				marvell,pcie-port = <2>;
+				interrupt-map = <0 0 0 0 &mpic 62>;
+				marvell,pcie-port = <1>;
 				marvell,pcie-lane = <0>;
-				clocks = <&gateclk 26>;
+				clocks = <&gateclk 9>;
 				status = "disabled";
 			};
 		};
Signature · 1 line
1.8.4.rc3
#2 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

Dear Arnaud Ebalard,

Quoted 8 lines · Arnaud Ebalard

Various Marvell datasheets advertise second PCIe unit of mv78230 flavour of Armada XP as x4/quad x1 capable. This second unit is in fact only x1 capable. This patch fixes current mv78230 .dtsi to reflect that, i.e. makes 1.0 the second interface (instead of 2.0 at the moment). This was successfully tested on a mv78230-based ReadyNAS 2120 platform with a x1 device (FL1009 XHCI controller) connected to this second interface.

Quoted 4 lines
---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

This is actually a bug fix, and the problem exists since commit 9d8f44f02d4a5f6e7b8d138ea8f8c6e30ae6e1a3, and therefore in 3.10, 3.11 and 3.12.

However, while the PCIe DT stuff was merged in 3.10, the actual driver itself was only merged in 3.11, so in 3.10, there is no chance to hit the bug.

Therefore, having this fix pushed to the stable 3.11.x and 3.12.x trees would be good.

Thanks Arnaud for following up on this!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

Hi,

Quoted 9 lines · Thomas Petazzoni
Quoted 8 lines · Arnaud Ebalard

Various Marvell datasheets advertise second PCIe unit of mv78230 flavour of Armada XP as x4/quad x1 capable. This second unit is in fact only x1 capable. This patch fixes current mv78230 .dtsi to reflect that, i.e. makes 1.0 the second interface (instead of 2.0 at the moment). This was successfully tested on a mv78230-based ReadyNAS 2120 platform with a x1 device (FL1009 XHCI controller) connected to this second interface.

Quoted 6 lines
Quoted 4 lines
---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Thanks for the review of both patches, Thomas. And no relation, but thanks for 714086029116b6 ;-)

Quoted 10 lines

This is actually a bug fix, and the problem exists since commit 9d8f44f02d4a5f6e7b8d138ea8f8c6e30ae6e1a3, and therefore in 3.10, 3.11 and 3.12.

However, while the PCIe DT stuff was merged in 3.10, the actual driver itself was only merged in 3.11, so in 3.10, there is no chance to hit the bug.

Therefore, having this fix pushed to the stable 3.11.x and 3.12.x trees would be good.

Jason, any action required on my side regarding the relay of the two patches to stable team or will you handle that once they are in your tree (or Linus one)?

Cheers,

a+

#4 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

Quoted 18 lines · Arnaud Ebalard

Hi,

Quoted 14 lines · Thomas Petazzoni
Quoted 12 lines · Arnaud Ebalard

Various Marvell datasheets advertise second PCIe unit of mv78230 flavour of Armada XP as x4/quad x1 capable. This second unit is in fact only x1 capable. This patch fixes current mv78230 .dtsi to reflect that, i.e. makes 1.0 the second interface (instead of 2.0 at the moment). This was successfully tested on a mv78230-based ReadyNAS 2120 platform with a x1 device (FL1009 XHCI controller) connected to this second interface.

---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
Quoted 15 lines
Quoted 1 line

Thanks for the review of both patches, Thomas. And no relation, but thanks for 714086029116b6 ;-)

Quoted 10 lines

This is actually a bug fix, and the problem exists since commit 9d8f44f02d4a5f6e7b8d138ea8f8c6e30ae6e1a3, and therefore in 3.10, 3.11 and 3.12.

However, while the PCIe DT stuff was merged in 3.10, the actual driver itself was only merged in 3.11, so in 3.10, there is no chance to hit the bug.

Therefore, having this fix pushed to the stable 3.11.x and 3.12.x trees would be good.

oops, I forgot to reply to this. I disagree here. We shouldn't assume that the dts file used will be from the same commit and the kernel built. Additionally, it doesn't hurt to backport the change the whole way.

Quoted 3 lines

Jason, any action required on my side regarding the relay of the two patches to stable team or will you handle that once they are in your tree (or Linus one)?

I'll take care of it.

thx,

Jason.

#5 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

Dear Jason Cooper,

Quoted 11 lines · Jason Cooper
Quoted 6 lines
Quoted 6 lines

However, while the PCIe DT stuff was merged in 3.10, the actual driver itself was only merged in 3.11, so in 3.10, there is no chance to hit the bug.

Therefore, having this fix pushed to the stable 3.11.x and 3.12.x trees would be good.

oops, I forgot to reply to this. I disagree here. We shouldn't assume that the dts file used will be from the same commit and the kernel built. Additionally, it doesn't hurt to backport the change the whole way.

Well, I believe anyone trying to use mvebu .dts from one kernel version with a kernel image of another version will hit numerous problems. But ok, in principle I agree with you :)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

In reply to Jason Cooper

Hi Jason,

Quoted 40 lines · Jason Cooper
Quoted 18 lines · Arnaud Ebalard

Hi,

Quoted 14 lines · Thomas Petazzoni
Quoted 12 lines · Arnaud Ebalard

Various Marvell datasheets advertise second PCIe unit of mv78230 flavour of Armada XP as x4/quad x1 capable. This second unit is in fact only x1 capable. This patch fixes current mv78230 .dtsi to reflect that, i.e. makes 1.0 the second interface (instead of 2.0 at the moment). This was successfully tested on a mv78230-based ReadyNAS 2120 platform with a x1 device (FL1009 XHCI controller) connected to this second interface.

---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
Quoted 15 lines
Quoted 1 line

Thanks for the review of both patches, Thomas. And no relation, but thanks for 714086029116b6 ;-)

Quoted 10 lines

This is actually a bug fix, and the problem exists since commit 9d8f44f02d4a5f6e7b8d138ea8f8c6e30ae6e1a3, and therefore in 3.10, 3.11 and 3.12.

However, while the PCIe DT stuff was merged in 3.10, the actual driver itself was only merged in 3.11, so in 3.10, there is no chance to hit the bug.

Therefore, having this fix pushed to the stable 3.11.x and 3.12.x trees would be good.

oops, I forgot to reply to this. I disagree here. We shouldn't assume that the dts file used will be from the same commit and the kernel built. Additionally, it doesn't hurt to backport the change the whole way.

Quoted 5 lines
Quoted 3 lines

Jason, any action required on my side regarding the relay of the two patches to stable team or will you handle that once they are in your tree (or Linus one)?

I'll take care of it.

I may have missed something but I expected those two patches to hit Linus tree after 3.12 to be part of 3.13-rc1. Am I just too impatient?

Cheers,

a+

#7 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

Quoted 44 lines · Arnaud Ebalard

Hi Jason,

Quoted 40 lines · Jason Cooper
Quoted 18 lines · Arnaud Ebalard

Hi,

Quoted 14 lines · Thomas Petazzoni
Quoted 12 lines · Arnaud Ebalard

Various Marvell datasheets advertise second PCIe unit of mv78230 flavour of Armada XP as x4/quad x1 capable. This second unit is in fact only x1 capable. This patch fixes current mv78230 .dtsi to reflect that, i.e. makes 1.0 the second interface (instead of 2.0 at the moment). This was successfully tested on a mv78230-based ReadyNAS 2120 platform with a x1 device (FL1009 XHCI controller) connected to this second interface.

---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
Quoted 15 lines
Quoted 1 line

Thanks for the review of both patches, Thomas. And no relation, but thanks for 714086029116b6 ;-)

Quoted 10 lines

This is actually a bug fix, and the problem exists since commit 9d8f44f02d4a5f6e7b8d138ea8f8c6e30ae6e1a3, and therefore in 3.10, 3.11 and 3.12.

However, while the PCIe DT stuff was merged in 3.10, the actual driver itself was only merged in 3.11, so in 3.10, there is no chance to hit the bug.

Therefore, having this fix pushed to the stable 3.11.x and 3.12.x trees would be good.

oops, I forgot to reply to this. I disagree here. We shouldn't assume that the dts file used will be from the same commit and the kernel built. Additionally, it doesn't hurt to backport the change the whole way.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Jason, any action required on my side regarding the relay of the two patches to stable team or will you handle that once they are in your tree (or Linus one)?

I'll take care of it.

I may have missed something but I expected those two patches to hit Linus tree after 3.12 to be part of 3.13-rc1. Am I just too impatient?

It is a fix, but as (iirc) Thomas mentioned, there is the risk of breaking existing PCIe boards. So, I was sitting on it till after v3.13-rc1 drops. I'd like for it to have a run in -next and get a few more Tested-by's before pushing it.

thx,

Jason.

#8 lore raw

PATCH 1/2 ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable

Dear Jason Cooper,

Quoted 51 lines · Jason Cooper
Quoted 50 lines · Arnaud Ebalard

Hi Jason,

Quoted 45 lines · Jason Cooper
Quoted 18 lines · Arnaud Ebalard

Hi,

Quoted 14 lines · Thomas Petazzoni
Quoted 12 lines · Arnaud Ebalard

Various Marvell datasheets advertise second PCIe unit of mv78230 flavour of Armada XP as x4/quad x1 capable. This second unit is in fact only x1 capable. This patch fixes current mv78230 .dtsi to reflect that, i.e. makes 1.0 the second interface (instead of 2.0 at the moment). This was successfully tested on a mv78230-based ReadyNAS 2120 platform with a x1 device (FL1009 XHCI controller) connected to this second interface.

---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
Quoted 15 lines
Quoted 1 line

Thanks for the review of both patches, Thomas. And no relation, but thanks for 714086029116b6 ;-)

Quoted 10 lines

This is actually a bug fix, and the problem exists since commit 9d8f44f02d4a5f6e7b8d138ea8f8c6e30ae6e1a3, and therefore in 3.10, 3.11 and 3.12.

However, while the PCIe DT stuff was merged in 3.10, the actual driver itself was only merged in 3.11, so in 3.10, there is no chance to hit the bug.

Therefore, having this fix pushed to the stable 3.11.x and 3.12.x trees would be good.

oops, I forgot to reply to this. I disagree here. We shouldn't assume that the dts file used will be from the same commit and the kernel built. Additionally, it doesn't hurt to backport the change the whole way.

Quoted 3 lines

Jason, any action required on my side regarding the relay of the two patches to stable team or will you handle that once they are in your tree (or Linus one)?

I'll take care of it.

Quoted 7 lines
Quoted 2 lines

I may have missed something but I expected those two patches to hit Linus tree after 3.12 to be part of 3.13-rc1. Am I just too impatient?

It is a fix, but as (iirc) Thomas mentioned, there is the risk of breaking existing PCIe boards. So, I was sitting on it till after v3.13-rc1 drops. I'd like for it to have a run in -next and get a few more Tested-by's before pushing it.

Hum, did I say that it could break existing PCIe boards? I might have lost the context, but I don't quite see how it could break existing PCIe boards. The patches from Arnaud can only make *more* PCIe cards detected, without affecting the ones that were already correctly detected.

So I don't think there should be any "suspicion" of potential breakage with those two patches, there are only improving things without any risk of breaking existing things, as far as I can remember.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH 2/2 ARM: mvebu: fix second and third PCIe unit of Armada XP mv78260

In reply to Arnaud Ebalard

mv78260 flavour of Marvell Armada XP SoC has 3 PCIe units. The two first units are both x4 and quad x1 capable. The third unit is only x4 capable. This patch fixes mv78260 .dtsi to reflect those capabilities.

---
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 109 ++++++++++++++++++++++++-------
 1 file changed, 85 insertions(+), 24 deletions(-)
arch/arm/boot/dts/armada-xp-mv78260.dtsi +85 -24
index 0e82c50..a598ce9 100644
@@ -48,7 +48,7 @@
 		/*
 		 * MV78260 has 3 PCIe units Gen2.0: Two units can be
 		 * configured as x4 or quad x1 lanes. One unit is
-		 * x4/x1.
+		 * x4 only.
 		 */
 		pcie-controller {
 			compatible = "marvell,armada-xp-pcie";
@@ -67,7 +67,9 @@
 				0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000   /* Port 0.2 registers */
 				0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000   /* Port 0.3 registers */
 				0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000   /* Port 1.0 registers */
-				0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000   /* Port 3.0 registers */
+				0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000   /* Port 1.1 registers */
+				0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000   /* Port 1.2 registers */
+				0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000   /* Port 1.3 registers */
 				0x82000000 0x1 0     MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
 				0x81000000 0x1 0     MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO  */
 				0x82000000 0x2 0     MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */
@@ -76,10 +78,18 @@
 				0x81000000 0x3 0     MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO  */
 				0x82000000 0x4 0     MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */
 				0x81000000 0x4 0     MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO  */
-				0x82000000 0x9 0     MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
-				0x81000000 0x9 0     MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO  */
-				0x82000000 0xa 0     MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */
-				0x81000000 0xa 0     MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO  */>;
+
+				0x82000000 0x5 0     MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
+				0x81000000 0x5 0     MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO  */
+				0x82000000 0x6 0     MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */
+				0x81000000 0x6 0     MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO  */
+				0x82000000 0x7 0     MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */
+				0x81000000 0x7 0     MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO  */
+				0x82000000 0x8 0     MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */
+				0x81000000 0x8 0     MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO  */
+
+				0x82000000 0x9 0     MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */
+				0x81000000 0x9 0     MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO  */>;
 
 			pcie at 1,0 {
 				device_type = "pci";
@@ -105,8 +115,8 @@
 				#address-cells = <3>;
 				#size-cells = <2>;
 				#interrupt-cells = <1>;
-                                ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
-                                          0x81000000 0 0 0x81000000 0x2 0 1 0>;
+				ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
+					  0x81000000 0 0 0x81000000 0x2 0 1 0>;
 				interrupt-map-mask = <0 0 0 0>;
 				interrupt-map = <0 0 0 0 &mpic 59>;
 				marvell,pcie-port = <0>;
@@ -149,37 +159,88 @@
 				status = "disabled";
 			};
 
-			pcie at 9,0 {
+			pcie at 5,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
-				reg = <0x4800 0 0 0 0>;
+				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				reg = <0x2800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
 				#interrupt-cells = <1>;
-				ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
-					  0x81000000 0 0 0x81000000 0x9 0 1 0>;
+				ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0
+					  0x81000000 0 0 0x81000000 0x5 0 1 0>;
 				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &mpic 99>;
-				marvell,pcie-port = <2>;
+				interrupt-map = <0 0 0 0 &mpic 62>;
+				marvell,pcie-port = <1>;
 				marvell,pcie-lane = <0>;
-				clocks = <&gateclk 26>;
+				clocks = <&gateclk 9>;
 				status = "disabled";
 			};
 
-			pcie at 10,0 {
+			pcie at 6,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x82000 0 0x2000>;
-				reg = <0x5000 0 0 0 0>;
+				assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
+				reg = <0x3000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
 				#interrupt-cells = <1>;
-				ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0
-					  0x81000000 0 0 0x81000000 0xa 0 1 0>;
+				ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0
+					  0x81000000 0 0 0x81000000 0x6 0 1 0>;
 				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &mpic 103>;
-				marvell,pcie-port = <3>;
+				interrupt-map = <0 0 0 0 &mpic 63>;
+				marvell,pcie-port = <1>;
+				marvell,pcie-lane = <1>;
+				clocks = <&gateclk 10>;
+				status = "disabled";
+			};
+
+			pcie at 7,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
+				reg = <0x3800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x7 0 1 0
+					  0x81000000 0 0 0x81000000 0x7 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &mpic 64>;
+				marvell,pcie-port = <1>;
+				marvell,pcie-lane = <2>;
+				clocks = <&gateclk 11>;
+				status = "disabled";
+			};
+
+			pcie at 8,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
+				reg = <0x4000 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x8 0 1 0
+					  0x81000000 0 0 0x81000000 0x8 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &mpic 65>;
+				marvell,pcie-port = <1>;
+				marvell,pcie-lane = <3>;
+				clocks = <&gateclk 12>;
+				status = "disabled";
+			};
+
+			pcie at 9,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
+				reg = <0x4800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
+					  0x81000000 0 0 0x81000000 0x9 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &mpic 99>;
+				marvell,pcie-port = <2>;
 				marvell,pcie-lane = <0>;
-				clocks = <&gateclk 27>;
+				clocks = <&gateclk 26>;
 				status = "disabled";
 			};
 		};
Signature · 1 line
1.8.4.rc3
#10 lore raw

PATCH 2/2 ARM: mvebu: fix second and third PCIe unit of Armada XP mv78260

Dear Arnaud Ebalard,

Quoted 9 lines · Arnaud Ebalard

mv78260 flavour of Marvell Armada XP SoC has 3 PCIe units. The two first units are both x4 and quad x1 capable. The third unit is only x4 capable. This patch fixes mv78260 .dtsi to reflect those capabilities.

---
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 109 ++++++++++++++++++++++++-------
 1 file changed, 85 insertions(+), 24 deletions(-)

Same thing: this has been buggy since 3.10, but only 3.11 onwards have the PCIe driver that uses this DT information. Therefore, pushing this to 3.11.x and 3.12.x would be fine.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#11 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

In reply to Arnaud Ebalard

Hi Thomas,

Quoted 33 lines · arno at natisbad.org (Arnaud Ebalard)

As a side note, Thomas, I noticed one more thing, this time in mv78460 .dtsi when comparing it w/ mv78230 and mv78260 ones. The first address of "assigned-address" property varies in the former for each pcie node:

$ grep assigned-address armada-xp-mv78230.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
$ grep assigned-address armada-xp-mv78260.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
$ grep assigned-address armada-xp-mv78460.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
         assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;
Quoted 3 lines

I took at Documentation/devicetree/bindings/pci/mvebu-pci.txt but failed to find an answer. Can you explain where the difference comes from?

Sorry to bother you again with the one above (it was in the cover letter) but the difference looks quite odd for someone not familiar with the syntax and the semantic.

Cheers,

a+

#12 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

Dear Arnaud Ebalard,

Quoted 33 lines · Arnaud Ebalard
Quoted 33 lines

As a side note, Thomas, I noticed one more thing, this time in mv78460 .dtsi when comparing it w/ mv78230 and mv78260 ones. The first address of "assigned-address" property varies in the former for each pcie node:

$ grep assigned-address armada-xp-mv78230.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
$ grep assigned-address armada-xp-mv78260.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
$ grep assigned-address armada-xp-mv78460.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
         assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;
Quoted 7 lines
Quoted 3 lines

I took at Documentation/devicetree/bindings/pci/mvebu-pci.txt but failed to find an answer. Can you explain where the difference comes from?

Sorry to bother you again with the one above (it was in the cover letter) but the difference looks quite odd for someone not familiar with the syntax and the semantic.

I do still have this question in mind, I wanted to reply to it today but just hadn't had the time to do it. I'm adding Jason Gunthorpe in Cc because he knows better than me the precise meaning of assigned-addresses. If it doesn't reply, I'll try to have a look tomorrow. This is the kind of stuff I can't answer without concentrating for a bit of time to re-understand again how it all fits together :-)

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#13 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

Quoted 45 lines · Thomas Petazzoni

Dear Arnaud Ebalard,

Quoted 33 lines · Arnaud Ebalard
Quoted 33 lines

As a side note, Thomas, I noticed one more thing, this time in mv78460 .dtsi when comparing it w/ mv78230 and mv78260 ones. The first address of "assigned-address" property varies in the former for each pcie node:

$ grep assigned-address armada-xp-mv78230.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
$ grep assigned-address armada-xp-mv78260.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
$ grep assigned-address armada-xp-mv78460.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
         assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;
Quoted 7 lines
Quoted 3 lines

I took at Documentation/devicetree/bindings/pci/mvebu-pci.txt but failed to find an answer. Can you explain where the difference comes from?

Sorry to bother you again with the one above (it was in the cover letter) but the difference looks quite odd for someone not familiar with the syntax and the semantic.

Quoted 7 lines

I do still have this question in mind, I wanted to reply to it today but just hadn't had the time to do it. I'm adding Jason Gunthorpe in Cc because he knows better than me the precise meaning of assigned-addresses. If it doesn't reply, I'll try to have a look tomorrow. This is the kind of stuff I can't answer without concentrating for a bit of time to re-understand again how it all fits together :-)

In this context the assigned-addresses encodes the PCI device bus function as well as the BAR #.

This PCI stuff would be 100% more readable with some macros ..

#define PCI_REG_BDF(bus,device,function) (....) #define PCI_MEM_BAR_BDF(bus,device,function,bar) \
(0x82000000 | PCI_REG_BDF(bus,device,function) + bar*XX) 0)

So that:
reg = <PCI_REG_BDF(0,1,0) 0 0>
assigned-addresses = <PCI_MEM_BAR_BDF(0,1,0,0) 0x40000 0 0x2000>

When done properly the assigned-address and reg should have the same BDF. As you've noticed there is a copy and paste mistake in some of the dts's:

eg:

 pcie at 2,0 {
     assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
     reg = <0x1000 0 0 0 0>;

The assigned-addresses in that instance should be 0x82001000 to match the reg.

It probably works because the Linux machinery doesn't check the BDF value?

The purpose of assigned-address in this specific context is to tell the driver how to find its control registers. So the 0x44000 above is the base for the PEX register. The "pci at 3,0", assigned-addresses, and reg are encoding this statement: "Create a PCI bridge at B:D.F using the PEX registers at 0x44000" The B:D.F in all three places should be the same.

Does that sound right Thomas?

I recommend adding some macros and constants derived from the OF PCI spec. It will save us all headaches :)

Jason

#14 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

Hi Jason,

Quoted 76 lines · Jason Gunthorpe
Quoted 45 lines · Thomas Petazzoni

Dear Arnaud Ebalard,

Quoted 33 lines · Arnaud Ebalard
Quoted 33 lines

As a side note, Thomas, I noticed one more thing, this time in mv78460 .dtsi when comparing it w/ mv78230 and mv78260 ones. The first address of "assigned-address" property varies in the former for each pcie node:

$ grep assigned-address armada-xp-mv78230.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
$ grep assigned-address armada-xp-mv78260.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
$ grep assigned-address armada-xp-mv78460.dtsi 
         assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
         assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
         assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
         assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
         assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
         assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
         assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
         assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
         assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
         assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;
Quoted 7 lines
Quoted 3 lines

I took at Documentation/devicetree/bindings/pci/mvebu-pci.txt but failed to find an answer. Can you explain where the difference comes from?

Sorry to bother you again with the one above (it was in the cover letter) but the difference looks quite odd for someone not familiar with the syntax and the semantic.

Quoted 7 lines

I do still have this question in mind, I wanted to reply to it today but just hadn't had the time to do it. I'm adding Jason Gunthorpe in Cc because he knows better than me the precise meaning of assigned-addresses. If it doesn't reply, I'll try to have a look tomorrow. This is the kind of stuff I can't answer without concentrating for a bit of time to re-understand again how it all fits together :-)

In this context the assigned-addresses encodes the PCI device bus function as well as the BAR #.

This PCI stuff would be 100% more readable with some macros ..

#define PCI_REG_BDF(bus,device,function) (....)

#define PCI_MEM_BAR_BDF(bus,device,function,bar) \
   (0x82000000 | PCI_REG_BDF(bus,device,function) + bar*XX) 0)

So that:
reg = <PCI_REG_BDF(0,1,0) 0 0>
assigned-addresses = <PCI_MEM_BAR_BDF(0,1,0,0) 0x40000 0 0x2000>

When done properly the assigned-address and reg should have the same BDF. As you've noticed there is a copy and paste mistake in some of the dts's:

eg:

 pcie at 2,0 {
     assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
     reg = <0x1000 0 0 0 0>;
Quoted 5 lines

The assigned-addresses in that instance should be 0x82001000 to match the reg.

It probably works because the Linux machinery doesn't check the BDF value?

ok.

Quoted 6 lines

The purpose of assigned-address in this specific context is to tell the driver how to find its control registers. So the 0x44000 above is the base for the PEX register. The "pci at 3,0", assigned-addresses, and reg are encoding this statement: "Create a PCI bridge at B:D.F using the PEX registers at 0x44000" The B:D.F in all three places should be the same.

Thanks for the explanation.

Quoted 2 lines

I recommend adding some macros and constants derived from the OF PCI spec. It will save us all headaches :)

Too bad it was not that clear in mvebu-pci.txt; I could have taken the opportunity to fix mv782{30,60} .dtsi in two previous patches.

Cheers,

a+

#15 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

In reply to Jason Gunthorpe

Jason,

On Wed, Nov 06, 2013 at 11:37:24AM -0700, Jason Gunthorpe wrote:
...

Quoted 9 lines

This PCI stuff would be 100% more readable with some macros ..

#define PCI_REG_BDF(bus,device,function) (....)

#define PCI_MEM_BAR_BDF(bus,device,function,bar) \
   (0x82000000 | PCI_REG_BDF(bus,device,function) + bar*XX) 0)

So that:
reg = <PCI_REG_BDF(0,1,0) 0 0>
assigned-addresses = <PCI_MEM_BAR_BDF(0,1,0,0) 0x40000 0 0x2000>

Do I smell a patch brewing? :)

Arnaud, would you like to take a crack at it?

thx,

Jason.

#16 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

Hi Jason,

Quoted 8 lines · Jason Cooper

On Wed, Nov 06, 2013 at 11:37:24AM -0700, Jason Gunthorpe wrote:
...

Quoted 6 lines

This PCI stuff would be 100% more readable with some macros ..

#define PCI_REG_BDF(bus,device,function) (....)

#define PCI_MEM_BAR_BDF(bus,device,function,bar) \
   (0x82000000 | PCI_REG_BDF(bus,device,function) + bar*XX) 0)
Quoted 7 lines
Quoted 3 lines

So that:
reg = <PCI_REG_BDF(0,1,0) 0 0>
assigned-addresses = <PCI_MEM_BAR_BDF(0,1,0,0) 0x40000 0 0x2000>

Do I smell a patch brewing? :)

Arnaud, would you like to take a crack at it?

My understanding of the topic being in the end limited to what I learnt from recent discussions, I'll pass on that one but I'll be happy to test on a mv78230.

Cheers,

a+

#17 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

In reply to Arnaud Ebalard

Arnaud, Thomas,

Quoted 5 lines · Arnaud Ebalard

Second patch fixes mv78260 .dtsi to reflect the fact that the two first units are x4 and quad x1 capable, and third (and last) interface is x4 only. This patch has only been compiled and not tested on real hardware. As associated changes are quite error-prone, I think it needs some careful review.

This, in addition to changing the .dtsi files is where my "let's take time merging this" came from.

...

Quoted 7 lines

Arnaud Ebalard (2):
ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable
ARM: mvebu: fix second and third PCIe units of Armada XP mv78260

 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  24 +++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 109 ++++++++++++++++++++++++-------
 2 files changed, 97 insertions(+), 36 deletions(-)

At any rate, since these are going to -stable anyway, there's no need to rush it. These are currently queued up as fixes for v3.13-rc1.

thx,

Jason.

#18 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

Hi,

Quoted 15 lines · Jason Cooper
Quoted 5 lines · Arnaud Ebalard

Second patch fixes mv78260 .dtsi to reflect the fact that the two first units are x4 and quad x1 capable, and third (and last) interface is x4 only. This patch has only been compiled and not tested on real hardware. As associated changes are quite error-prone, I think it needs some careful review.

This, in addition to changing the .dtsi files is where my "let's take time merging this" came from.

...

Quoted 4 lines

Arnaud Ebalard (2):
ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable
ARM: mvebu: fix second and third PCIe units of Armada XP mv78260

Quoted 6 lines
Quoted 3 lines
 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  24 +++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 109 ++++++++++++++++++++++++-------
 2 files changed, 97 insertions(+), 36 deletions(-)

At any rate, since these are going to -stable anyway, there's no need to rush it. These are currently queued up as fixes for v3.13-rc1.

fine with me.

Cheers,

a+

#19 lore raw

cover ARM: mvebu: fix DT def. of PCIe units for mv78230 and mv78260

In reply to Arnaud Ebalard
Quoted 7 lines · Arnaud Ebalard

Arnaud Ebalard (2):
ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable
ARM: mvebu: fix second and third PCIe units of Armada XP mv78260

 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  24 +++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 109 ++++++++++++++++++++++++-------
 2 files changed, 97 insertions(+), 36 deletions(-)

Whole series applied to mvebu/dt-fixes with Thomas' Ack and Cc'd to stable for v3.10.x and up.

thx,

Jason.