[PATCH V6 3/3] powerpc/fsl-pci: Unify pci/pcie initialization code

Kumar Gala galak at kernel.crashing.org
Fri Aug 10 23:12:11 EST 2012


On Aug 10, 2012, at 3:19 AM, Jia Hongtao wrote:

> We unified the Freescale pci/pcie initialization by changing the fsl_pci
> to a platform driver. In previous PCI code architecture the initialization
> routine is called at board_setup_arch stage. Now the initialization is done
> in probe function which is architectural better. Also It's convenient for
> adding PM support for PCI controller in later patch.
> 
> We also change the way of determining primary bus for fitting platform
> driver. Thanks to the proposal from Ben. Please refer to the link below:
> https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-June/098586.html
> 
> Now we registered pci controllers as platform devices. So we combine two
> initialization code as one platform driver.
> 
> Signed-off-by: Jia Hongtao <B38951 at freescale.com>
> Signed-off-by: Li Yang <leoli at freescale.com>
> Signed-off-by: Chunhe Lan <Chunhe.Lan at freescale.com>
> ---
> Changes for V6:
> - Fix "isa_io_base could not be zero" bug. Thanks to Ben.
> 
> - Determining primary by looking for ISA node does not work for ge_imp3a.
>  It's fixed by adding ISA node to its devied tree.
> 
> arch/powerpc/boot/dts/ge_imp3a.dts         |    4 +
> arch/powerpc/kernel/pci-common.c           |    2 +-
> arch/powerpc/platforms/85xx/common.c       |   10 +++
> arch/powerpc/platforms/85xx/corenet_ds.c   |   31 +--------
> arch/powerpc/platforms/85xx/ge_imp3a.c     |   48 +------------
> arch/powerpc/platforms/85xx/mpc8536_ds.c   |   36 +---------
> arch/powerpc/platforms/85xx/mpc85xx_ads.c  |    9 +--
> arch/powerpc/platforms/85xx/mpc85xx_cds.c  |   14 +----
> arch/powerpc/platforms/85xx/mpc85xx_ds.c   |   38 ++--------
> arch/powerpc/platforms/85xx/mpc85xx_mds.c  |   38 +---------
> arch/powerpc/platforms/85xx/mpc85xx_rdb.c  |   28 +++-----
> arch/powerpc/platforms/85xx/p1010rdb.c     |   14 +----
> arch/powerpc/platforms/85xx/p1022_ds.c     |   34 +---------
> arch/powerpc/platforms/85xx/p1022_rdk.c    |   34 +---------
> arch/powerpc/platforms/85xx/p1023_rds.c    |    7 +--
> arch/powerpc/platforms/85xx/p2041_rdb.c    |    2 +-
> arch/powerpc/platforms/85xx/p3041_ds.c     |    2 +-
> arch/powerpc/platforms/85xx/p4080_ds.c     |    2 +-
> arch/powerpc/platforms/85xx/p5020_ds.c     |    2 +-
> arch/powerpc/platforms/85xx/p5040_ds.c     |    2 +-
> arch/powerpc/platforms/85xx/qemu_e500.c    |    3 +-
> arch/powerpc/platforms/85xx/sbc8548.c      |   19 +-----
> arch/powerpc/platforms/85xx/socrates.c     |   11 +---
> arch/powerpc/platforms/85xx/stx_gp3.c      |   11 +---
> arch/powerpc/platforms/85xx/tqm85xx.c      |   21 +------
> arch/powerpc/platforms/85xx/xes_mpc85xx.c  |   54 ++-------------
> arch/powerpc/platforms/86xx/gef_ppc9a.c    |   10 +--
> arch/powerpc/platforms/86xx/gef_sbc310.c   |   11 +---
> arch/powerpc/platforms/86xx/gef_sbc610.c   |   10 +--
> arch/powerpc/platforms/86xx/mpc8610_hpcd.c |   19 +----
> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |   40 +----------
> arch/powerpc/platforms/86xx/sbc8641d.c     |   12 +---
> arch/powerpc/sysdev/fsl_pci.c              |  102 +++++++++++++++++-----------
> arch/powerpc/sysdev/fsl_pci.h              |    9 ++-
> drivers/edac/mpc85xx_edac.c                |   43 +++---------
> 35 files changed, 165 insertions(+), 567 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/ge_imp3a.dts b/arch/powerpc/boot/dts/ge_imp3a.dts
> index fefae41..aa2c4b5 100644
> --- a/arch/powerpc/boot/dts/ge_imp3a.dts
> +++ b/arch/powerpc/boot/dts/ge_imp3a.dts
> @@ -248,6 +248,10 @@
> 				  0x1000000 0x0 0x0
> 				  0x1000000 0x0 0x0
> 				  0x0 0x10000>;
> +
> +			isa at 1e {
> +				device_type = "isa";
> +			};
> 		};
> 	};
> };

Why are we adding an isa node to the ge_imp3a.dts?

If this is really needed it should be a separate patch as well.

- k



More information about the Linuxppc-dev mailing list