Skip to contentSkip to conversation

Move 8641 PCI-Express to arch/powerpc/sysdev/fsl_pcie.c.

PATCH Applied Jon Loeliger 3 participants 9 messages Mar 7, 2007 – Mar 10, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move 8641 PCI-Express to arch/powerpc/sysdev/fsl_pcie.c.

This move sets the stage for the use of generic PCI Express code in 85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code.

---
 arch/powerpc/Kconfig                               |    5 +++++
 arch/powerpc/platforms/86xx/Makefile               |    2 +-
 arch/powerpc/sysdev/Makefile                       |    1 +
 .../86xx/mpc86xx_pcie.c => sysdev/fsl_pcie.c}      |    2 --
 4 files changed, 7 insertions(+), 3 deletions(-)
 rename arch/powerpc/{platforms/86xx/mpc86xx_pcie.c => sysdev/fsl_pcie.c} (100%)
arch/powerpc/Kconfig +5 -0
index 6dfbd52..f68de20 100644
@@ -168,6 +168,7 @@ config PPC_86xx
 	bool "Freescale 86xx"
 	select 6xx
 	select FSL_SOC
+	select FSL_PCIE
 	select PPC_FPU
 	select ALTIVEC
 	help
@@ -1022,6 +1023,10 @@ config SBUS
 config FSL_SOC
 	bool
 
+config FSL_PCIE
+	bool
+	depends on PPC_86xx
+
 # Yes MCA RS/6000s exist but Linux-PPC does not currently support any
 config MCA
 	bool
arch/powerpc/platforms/86xx/Makefile +1 -1
index 476a6ee..418fd8f 100644
@@ -4,4 +4,4 @@
 
 obj-$(CONFIG_SMP)		+= mpc86xx_smp.o
 obj-$(CONFIG_MPC8641_HPCN)	+= mpc86xx_hpcn.o
-obj-$(CONFIG_PCI)		+= pci.o mpc86xx_pcie.o
+obj-$(CONFIG_PCI)		+= pci.o
arch/powerpc/sysdev/Makefile +1 -0
index 26ca3ff..86fc8c0 100644
@@ -11,6 +11,7 @@ obj-$(CONFIG_PPC_PMI)		+= pmi.o
 obj-$(CONFIG_U3_DART)		+= dart_iommu.o
 obj-$(CONFIG_MMIO_NVRAM)	+= mmio_nvram.o
 obj-$(CONFIG_FSL_SOC)		+= fsl_soc.o
+obj-$(CONFIG_FSL_PCIE)		+= fsl_pcie.o
 obj-$(CONFIG_TSI108_BRIDGE)	+= tsi108_pci.o tsi108_dev.o
 obj-$(CONFIG_QUICC_ENGINE)	+= qe_lib/
 
arch/powerpc/sysdev/fsl_pcie.c renamed from arch/powerpc/platforms/86xx/mpc86xx_pcie.c +0 -2
similarity index 100%
rename from arch/powerpc/platforms/86xx/mpc86xx_pcie.c
rename to arch/powerpc/sysdev/fsl_pcie.c
index a2f4f73..041c07e 100644
@@ -24,8 +24,6 @@
 #include <asm/pci-bridge.h>
 #include <asm/machdep.h>
 
-#include "mpc86xx.h"
-
 #define PCI_CFG_OUT out_be32
 
 /* ERRATA PCI-Ex 14 PCIE Controller timeout */
Signature · 1 line
1.5.0.1.213.g509b
#2 lore raw
In reply to Jon Loeliger
Quoted 31 lines

This move sets the stage for the use of generic PCI Express=20 code in 85xx and 86xx parts from FSL. Subsequent patches for=20 8548 and 8544 will be able to use this shared code. =20

---
 arch/powerpc/Kconfig                               |    5 +++++
 arch/powerpc/platforms/86xx/Makefile               |    2 +-
 arch/powerpc/sysdev/Makefile                       |    1 +
 .../86xx/mpc86xx_pcie.c =3D> sysdev/fsl_pcie.c}      |    2 --
 4 files changed, 7 insertions(+), 3 deletions(-)  rename=20

arch/powerpc/{platforms/86xx/mpc86xx_pcie.c =3D>=20 sysdev/fsl_pcie.c} (100%)
=20

arch/powerpc/Kconfig +1 -0
index 6dfbd52..f68de20 100644
@@ -168,6 +168,7 @@ config PPC_86xx
 	bool "Freescale 86xx"
 	select 6xx
 	select FSL_SOC
+	select FSL_PCIE
 	select PPC_FPU
 	select ALTIVEC
 	help
@@ -1022,6 +1023,10 @@ config SBUS
 config FSL_SOC
 	bool

=20

arch/powerpc/Kconfig config SBUS · line 1029

Quoted 4 lines
arch/powerpc/Kconfig +4 -0
+config FSL_PCIE
+	bool
+	depends on PPC_86xx
+

How about 8548 with pcie?
Roy

#3 lore raw
Quoted 31 lines · On Mar 8, 2007, at 9:32 PM, Zang Roy-r61911 wrote:
Quoted 31 lines

This move sets the stage for the use of generic PCI Express code in 85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code.

---
 arch/powerpc/Kconfig                               |    5 +++++
 arch/powerpc/platforms/86xx/Makefile               |    2 +-
 arch/powerpc/sysdev/Makefile                       |    1 +
 .../86xx/mpc86xx_pcie.c => sysdev/fsl_pcie.c}      |    2 --
 4 files changed, 7 insertions(+), 3 deletions(-)  rename

arch/powerpc/{platforms/86xx/mpc86xx_pcie.c =>
sysdev/fsl_pcie.c} (100%)

arch/powerpc/Kconfig +1 -0
index 6dfbd52..f68de20 100644
@@ -168,6 +168,7 @@ config PPC_86xx
 	bool "Freescale 86xx"
 	select 6xx
 	select FSL_SOC
+	select FSL_PCIE
 	select PPC_FPU
 	select ALTIVEC
 	help
@@ -1022,6 +1023,10 @@ config SBUS
 config FSL_SOC
 	bool
 
Quoted 5 lines

arch/powerpc/Kconfig config SBUS · line 1029

Quoted 4 lines
arch/powerpc/Kconfig +4 -0
+config FSL_PCIE
+	bool
+	depends on PPC_86xx
+

How about 8548 with pcie?

There isn't any in tree 85xx user of PCIe at this point.

- k

#4 lore raw
Quoted 36 lines

=20
On Mar 8, 2007, at 9:32 PM, Zang Roy-r61911 wrote:
=20

Quoted 1 line
Quoted 1 line

This move sets the stage for the use of generic PCI=20

Express code in=20

Quoted 31 lines
Quoted 31 lines

85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code.

---
 arch/powerpc/Kconfig                               |    5 +++++
 arch/powerpc/platforms/86xx/Makefile               |    2 +-
 arch/powerpc/sysdev/Makefile                       |    1 +
 .../86xx/mpc86xx_pcie.c =3D> sysdev/fsl_pcie.c}      |    2 --
 4 files changed, 7 insertions(+), 3 deletions(-)  rename=20

arch/powerpc/{platforms/86xx/mpc86xx_pcie.c =3D> sysdev/fsl_pcie.c} =

(100%)

arch/powerpc/Kconfig index=20 renamed from arch/powerpc/Kconfig +0 -0

6dfbd52..f68de20 100644

arch/powerpc/Kconfig +1 -0
@@ -168,6 +168,7 @@ config PPC_86xx
 	bool "Freescale 86xx"
 	select 6xx
 	select FSL_SOC
+	select FSL_PCIE
 	select PPC_FPU
 	select ALTIVEC
 	help
@@ -1022,6 +1023,10 @@ config SBUS
 config FSL_SOC
 	bool
 
Quoted 7 lines
Quoted 5 lines

arch/powerpc/Kconfig config SBUS · line 1029

Quoted 4 lines
arch/powerpc/Kconfig +4 -0
+config FSL_PCIE
+	bool
+	depends on PPC_86xx
+

How about 8548 with pcie?

=20
There isn't any in tree 85xx user of PCIe at this point.

No!
At lease my original serial patches include the pcie support for 8548. Roy

#5 lore raw
Quoted 41 lines · On Mar 8, 2007, at 9:53 PM, Zang Roy-r61911 wrote:
Quoted 41 lines · On Mar 8, 2007, at 9:32 PM, Zang Roy-r61911 wrote:
Quoted 2 lines
Quoted 2 lines

This move sets the stage for the use of generic PCI

Express code in

Quoted 35 lines
Quoted 27 lines

85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code.

---
 arch/powerpc/Kconfig                               |    5 +++++
 arch/powerpc/platforms/86xx/Makefile               |    2 +-
 arch/powerpc/sysdev/Makefile                       |    1 +
 .../86xx/mpc86xx_pcie.c => sysdev/fsl_pcie.c}      |    2 --
 4 files changed, 7 insertions(+), 3 deletions(-)  rename

arch/powerpc/{platforms/86xx/mpc86xx_pcie.c => sysdev/fsl_pcie.c} (100%)

arch/powerpc/Kconfig index renamed from arch/powerpc/Kconfig +0 -0

6dfbd52..f68de20 100644

arch/powerpc/Kconfig +1 -0
@@ -168,6 +168,7 @@ config PPC_86xx
 	bool "Freescale 86xx"
 	select 6xx
 	select FSL_SOC
+	select FSL_PCIE
 	select PPC_FPU
 	select ALTIVEC
 	help

arch/powerpc/Kconfig config SBUS · line 1029

Quoted 7 lines
arch/powerpc/Kconfig +4 -0
@@ -1022,6 +1023,10 @@ config SBUS
 config FSL_SOC
 	bool
 
+config FSL_PCIE
+	bool
+	depends on PPC_86xx
+

How about 8548 with pcie?

Quoted 4 lines
Quoted 1 line

There isn't any in tree 85xx user of PCIe at this point.

No!
At lease my original serial patches include the pcie support for 8548. Roy

Which patches? I'm not seeing any code for 8548. Can you point at something specific in the tree?

- k

#6 lore raw
Quoted 20 lines · On Mar 8, 2007, at 9:53 PM, Zang Roy-r61911 wrote:

=20

Quoted 17 lines
Quoted 17 lines · On Mar 8, 2007, at 9:32 PM, Zang Roy-r61911 wrote:
Quoted 2 lines
Quoted 2 lines

This move sets the stage for the use of generic PCI

Express code in

Quoted 12 lines
Quoted 12 lines

85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code.

---
 arch/powerpc/Kconfig                               |    5 +++++
 arch/powerpc/platforms/86xx/Makefile               |    2 +-
 arch/powerpc/sysdev/Makefile                       |    1 +
 .../86xx/mpc86xx_pcie.c =3D> sysdev/fsl_pcie.c}      |    2 --
 4 files changed, 7 insertions(+), 3 deletions(-)  rename=20

arch/powerpc/{platforms/86xx/mpc86xx_pcie.c =3D> =

sysdev/fsl_pcie.c}

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 23 lines
Quoted 15 lines

(100%)

arch/powerpc/Kconfig index=20 renamed from arch/powerpc/Kconfig +0 -0

6dfbd52..f68de20 100644

arch/powerpc/Kconfig +1 -0
@@ -168,6 +168,7 @@ config PPC_86xx
 	bool "Freescale 86xx"
 	select 6xx
 	select FSL_SOC
+	select FSL_PCIE
 	select PPC_FPU
 	select ALTIVEC
 	help

arch/powerpc/Kconfig config SBUS · line 1029

Quoted 7 lines
arch/powerpc/Kconfig +4 -0
@@ -1022,6 +1023,10 @@ config SBUS
 config FSL_SOC
 	bool
 
+config FSL_PCIE
+	bool
+	depends on PPC_86xx
+

How about 8548 with pcie?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

There isn't any in tree 85xx user of PCIe at this point.

No!
At lease my original serial patches include the pcie=20

support for 8548.

Quoted 1 line

Roy

=20
Which patches? I'm not seeing any code for 8548. Can you=20 point at something specific in the tree?

It does not in the current tree.
I will provide the corresponding patches ASAP.
Roy

#7 lore raw
In reply to Zang Roy-r61911
Quoted 7 lines · On Thu, 2007-03-08 at 21:32, Zang Roy-r61911 wrote:
Quoted 3 lines

This move sets the stage for the use of generic PCI Express code in 85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code.

How about 8548 with pcie?
Roy

Roy,

This patch that I released was a very simple effort to _begin_ the migration of PCI-Ex out of 8641 into a generic place so that we can get your patches accepted more readily.

This first step simply _moved_ the existing file out of 8641 and patched up the CONFIG options so that 8641 will still work. Notice that this does not yet address the 85xx series boards at all. Those patches (yours) will follow shortly.

We will need to resolve the problems with the transparent bridges issue first, though. I am currently working through some of those issues with Kumar. We can add you to the discussion there for sure!

jdl

#8 lore raw

RE: [PATCH] Move 8641 PCI-Express toarch/powerpc/sysdev/fsl_pcie.c.

Quoted 10 lines

=20

Quoted 1 line · On Thu, 2007-03-08 at 21:32, Zang Roy-r61911 wrote:
Quoted 1 line

This move sets the stage for the use of generic PCI=20

Express code in=20

Quoted 2 lines
Quoted 2 lines

85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code.

=20
=20

Quoted 2 lines

How about 8548 with pcie?
Roy

Quoted 7 lines

=20
Roy,
=20
This patch that I released was a very simple effort to _begin_ the migration of PCI-Ex out of 8641 into a generic place so that we can get your patches accepted more readily.

Thanks. But I do think it is part of my previous patches :-).=20 My patches mainly contains
(1) Move 86xx pcie support to powerpc/sysdev/fsl_pcie.c and=20 change some CONFIG Option.
(2) Add 8548 pcie support based on fsl_pcie.c. Add PCIE ATMU for 8548.
(3) Remove some reluctant code in fsl_pcie.c.
(4) Add link status check for pcie.
(5) Unify 85xx/86xx pcie mmu register define.
(6) Add device tree for 85xx cds legacy board.

The code for PCIE ATMU and link status check are from Wei Zhang.=20 The patches have been tested for both 85xx/86xx boards and merged to the 85xx git repo. in opensource.freescale.com

Quoted 4 lines

=20
This first step simply _moved_ the existing file out of 8641 and patched up the CONFIG options so that 8641 will still work. Notice that this does

Quoted 8 lines

not yet address the 85xx series boards at all. Those patches (yours) will follow shortly. =20
We will need to resolve the problems with the transparent bridges issue first, though. I am currently working through some of those issues with Kumar. We can add you to the discussion there for sure!

I do not touch the code for common pci/e architecture because more discussions
might be needed. I had thought to add the 85xx pcie support early. I received
too many request for its support.
Thanks.
Roy