Skip to contentSkip to conversation

powerpc/85xx: Fix setting of LIODN prop in PCIe nodes on P3041/P5020

PATCH New Kumar Gala 1 participant 2 messages Mar 15, 2011 – Mar 31, 2011 PowerPC

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 powerpc/85xx: Fix setting of LIODN prop in PCIe nodes on P3041/P5020

From: Laurentiu TUDOR <[email protected]>

We utilize the compatible string to find the node to add fsl,liodn property to. However P3041 & P5020 don't have "fsl,p4080-pcie" compatible for their PCIe controllers as they aren't backwards compatible.

Allow the macro's to specify the PCIe compatible to use to allow SoC uniqueness. On P3041 & P5020 we utilize "fsl,qoriq-pcie-v2.2" for the PCIe controllers.

---
 arch/powerpc/cpu/mpc85xx/p3041_ids.c |   10 +++++-----
 arch/powerpc/cpu/mpc85xx/p4080_ids.c |    8 ++++----
 arch/powerpc/cpu/mpc85xx/p5020_ids.c |   10 +++++-----
 arch/powerpc/include/asm/fsl_liodn.h |    4 ++--
 4 files changed, 16 insertions(+), 16 deletions(-)
arch/powerpc/cpu/mpc85xx/p3041_ids.c +5 -5
index febbee9..1255898 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Freescale Semiconductor, Inc.
+ * Copyright 2010-2011 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -52,10 +52,10 @@ struct liodn_id_table liodn_tbl[] = {
 	SET_SATA_LIODN(1, 127),
 	SET_SATA_LIODN(2, 128),
 
-	SET_PCI_LIODN(1, 193),
-	SET_PCI_LIODN(2, 194),
-	SET_PCI_LIODN(3, 195),
-	SET_PCI_LIODN(4, 196),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 1, 193),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 2, 194),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 3, 195),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 4, 196),
 
 	SET_DMA_LIODN(1, 197),
 	SET_DMA_LIODN(2, 198),
arch/powerpc/cpu/mpc85xx/p4080_ids.c +4 -4
index df25048..fd155c8 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Freescale Semiconductor, Inc.
+ * Copyright 2010-2011 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -44,9 +44,9 @@ struct liodn_id_table liodn_tbl[] = {
 
 	SET_SDHC_LIODN(1, 156),
 
-	SET_PCI_LIODN(1, 193),
-	SET_PCI_LIODN(2, 194),
-	SET_PCI_LIODN(3, 195),
+	SET_PCI_LIODN("fsl,p4080-pcie", 1, 193),
+	SET_PCI_LIODN("fsl,p4080-pcie", 2, 194),
+	SET_PCI_LIODN("fsl,p4080-pcie", 3, 195),
 
 	SET_DMA_LIODN(1, 196),
 	SET_DMA_LIODN(2, 197),
arch/powerpc/cpu/mpc85xx/p5020_ids.c +5 -5
index febbee9..1255898 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Freescale Semiconductor, Inc.
+ * Copyright 2010-2011 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -52,10 +52,10 @@ struct liodn_id_table liodn_tbl[] = {
 	SET_SATA_LIODN(1, 127),
 	SET_SATA_LIODN(2, 128),
 
-	SET_PCI_LIODN(1, 193),
-	SET_PCI_LIODN(2, 194),
-	SET_PCI_LIODN(3, 195),
-	SET_PCI_LIODN(4, 196),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 1, 193),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 2, 194),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 3, 195),
+	SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 4, 196),
 
 	SET_DMA_LIODN(1, 197),
 	SET_DMA_LIODN(2, 198),
arch/powerpc/include/asm/fsl_liodn.h +2 -2
index f76676c..0ec5c0a 100644
@@ -70,8 +70,8 @@ extern void fdt_fixup_liodn(void *blob);
 	SET_GUTS_LIODN("fsl,pq-sata-v2", liodn, sata##sataNum##liodnr,\
 		CONFIG_SYS_MPC85xx_SATA##sataNum##_OFFSET)
 
-#define SET_PCI_LIODN(pciNum, liodn) \
-	SET_GUTS_LIODN("fsl,p4080-pcie", liodn, pex##pciNum##liodnr,\
+#define SET_PCI_LIODN(compat, pciNum, liodn) \
+	SET_GUTS_LIODN(compat, liodn, pex##pciNum##liodnr,\
 		CONFIG_SYS_MPC85xx_PCIE##pciNum##_OFFSET)
 
 /* reg nodes for DMA start @ 0x300 */
Signature · 1 line
1.7.2.3
author Applied
#1 lore raw

PATCH 1/1 powerpc/85xx: Fix setting of LIODN prop in PCIe nodes on P3041/P5020

Quoted 10 lines · Kumar Gala

From: Laurentiu TUDOR <[email protected]>

We utilize the compatible string to find the node to add fsl,liodn property to. However P3041 & P5020 don't have "fsl,p4080-pcie" compatible for their PCIe controllers as they aren't backwards compatible.

Allow the macro's to specify the PCIe compatible to use to allow SoC uniqueness. On P3041 & P5020 we utilize "fsl,qoriq-pcie-v2.2" for the PCIe controllers.

Quoted 8 lines

---

arch/powerpc/cpu/mpc85xx/p3041_ids.c |   10 +++++-----
arch/powerpc/cpu/mpc85xx/p4080_ids.c |    8 ++++----
arch/powerpc/cpu/mpc85xx/p5020_ids.c |   10 +++++-----
arch/powerpc/include/asm/fsl_liodn.h |    4 ++--
4 files changed, 16 insertions(+), 16 deletions(-)

applied to 85xx next

- k