[PATCH 5/6] MPC5121 Add PCI support

Kumar Gala galak at kernel.crashing.org
Sat Jun 21 08:03:52 EST 2008


On Jun 20, 2008, at 11:58 AM, John Rigby wrote:

> Copied from 83xx minus support for two busses.
>
> Signed-off-by: John Rigby <jrigby at freescale.com>
> ---
> arch/powerpc/Kconfig                      |    2 +-
> arch/powerpc/platforms/512x/Kconfig       |    1 +
> arch/powerpc/platforms/512x/Makefile      |    1 +
> arch/powerpc/platforms/512x/mpc5121_ads.c |   10 ++++
> arch/powerpc/platforms/512x/mpc512x.h     |    1 +
> arch/powerpc/platforms/512x/pci.c         |   84 ++++++++++++++++++++ 
> +++++++++
> 6 files changed, 98 insertions(+), 1 deletions(-)
> create mode 100644 arch/powerpc/platforms/512x/pci.c
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 3934e26..5a467a1 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -545,7 +545,7 @@ config MCA
> config PCI
> 	bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx ||  
> PPC_86xx \
> 		|| PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
> -		|| PPC_PS3 || 44x
> +		|| PPC_PS3 || 44x || PPC_MPC512x

is it possible to select PCI rather than adding to the madness here?

>
> 	default y if !40x && !CPM2 && !8xx && !PPC_MPC512x && !PPC_83xx \
> 		&& !PPC_85xx && !PPC_86xx
> 	default PCI_PERMEDIA if !4xx && !CPM2 && !8xx


> diff --git a/arch/powerpc/platforms/512x/pci.c b/arch/powerpc/ 
> platforms/512x/pci.c
> new file mode 100644
> index 0000000..7ed9b34
> --- /dev/null
> +++ b/arch/powerpc/platforms/512x/pci.c
> @@ -0,0 +1,84 @@
> +/*
> + * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights  
> reserved.
> + *
> + * Original copied from 83xx/pci.c:

Can we not reuse the same code for 83xx/pci.c and 5121/pci?  and move  
it into sysdev/fsl_pci.c?  (we'd add some ifdefs for 83xx & 5121)

- k



More information about the Linuxppc-dev mailing list