From: David Gibson <david@gibson.dropbear.id.au>
To: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>, Stefan Roese <sr@denx.de>
Subject: Re: [PATCH 3/3] [POWERPC] Add PCI support for AMCC 440EPx (sequoia)
Date: Mon, 27 Aug 2007 11:57:19 +1000 [thread overview]
Message-ID: <20070827015719.GD12804@localhost.localdomain> (raw)
In-Reply-To: <20070825093001.4087.18160.stgit@localhost.localdomain>
On Sat, Aug 25, 2007 at 01:30:01PM +0400, Vitaly Bordug wrote:
>
> In fact, loosely move of arch/ppc bits, though regions are
> set up using values from ranges property. This also adds
> setup_indirect_pci_noremap() function to handle indirect
> PCI without one more ioremap.
>
> Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
> Signed-off-by: Stefan Roese <sr@denx.de>
>
> ---
>
> arch/powerpc/platforms/44x/44x.h | 28 ++++
> arch/powerpc/platforms/44x/Makefile | 4 +
> arch/powerpc/platforms/44x/ppc440epx-pci.c | 192 ++++++++++++++++++++++++++++
> arch/powerpc/platforms/44x/sequoia.c | 14 ++
> arch/powerpc/sysdev/indirect_pci.c | 14 ++
> include/asm-powerpc/pci-bridge.h | 2
> 6 files changed, 254 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/platforms/44x/44x.h b/arch/powerpc/platforms/44x/44x.h
> index 42eabf8..d3845f9 100644
> --- a/arch/powerpc/platforms/44x/44x.h
> +++ b/arch/powerpc/platforms/44x/44x.h
> @@ -1,8 +1,36 @@
> #ifndef __POWERPC_PLATFORMS_44X_44X_H
> #define __POWERPC_PLATFORMS_44X_44X_H
> +#include <asm/pci-bridge.h>
> +
> +/* PCI support */
> +#define PPC4xx_PCI_CFGA_OFFSET 0
> +#define PPC4xx_PCI_CFGD_OFFSET 0x4
> +
> +#define PPC4xx_PCIL0_PMM0LA 0x000
> +#define PPC4xx_PCIL0_PMM0MA 0x004
> +#define PPC4xx_PCIL0_PMM0PCILA 0x008
> +#define PPC4xx_PCIL0_PMM0PCIHA 0x00C
> +#define PPC4xx_PCIL0_PMM1LA 0x010
> +#define PPC4xx_PCIL0_PMM1MA 0x014
> +#define PPC4xx_PCIL0_PMM1PCILA 0x018
> +#define PPC4xx_PCIL0_PMM1PCIHA 0x01C
> +#define PPC4xx_PCIL0_PMM2LA 0x020
> +#define PPC4xx_PCIL0_PMM2MA 0x024
> +#define PPC4xx_PCIL0_PMM2PCILA 0x028
> +#define PPC4xx_PCIL0_PMM2PCIHA 0x02C
> +#define PPC4xx_PCIL0_PTM1MS 0x030
> +#define PPC4xx_PCIL0_PTM1LA 0x034
> +#define PPC4xx_PCIL0_PTM2MS 0x038
> +#define PPC4xx_PCIL0_PTM2LA 0x03C
>
> extern u8 as1_readb(volatile u8 __iomem *addr);
> extern void as1_writeb(u8 data, volatile u8 __iomem *addr);
> extern void ppc44x_reset_system(char *cmd);
>
> +#ifdef CONFIG_PCI
> +int ppc440epx_exclude_device(struct pci_controller *hose,
> + u_char bus, u_char devfn);
> +int ppc440epx_add_bridge(struct device_node *dev);
> +#endif
> +
> #endif /* __POWERPC_PLATFORMS_44X_44X_H */
> diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile
> index 10ce674..d2a5278 100644
> --- a/arch/powerpc/platforms/44x/Makefile
> +++ b/arch/powerpc/platforms/44x/Makefile
> @@ -2,3 +2,7 @@ obj-$(CONFIG_44x) := misc_44x.o
> obj-$(CONFIG_EBONY) += ebony.o
> obj-$(CONFIG_BAMBOO) += bamboo.o
> obj-$(CONFIG_SEQUOIA) += sequoia.o
> +
> +ifeq ($(CONFIG_PCI),y)
> +obj-$(CONFIG_440EPX) += ppc440epx-pci.o
> +endif
> diff --git a/arch/powerpc/platforms/44x/ppc440epx-pci.c b/arch/powerpc/platforms/44x/ppc440epx-pci.c
> new file mode 100644
> index 0000000..bd4a352
> --- /dev/null
> +++ b/arch/powerpc/platforms/44x/ppc440epx-pci.c
> @@ -0,0 +1,192 @@
> +/*
> + * PPC44x PCI host support
> + *
> + * Vitaly Bordug <vitb@kernel.crashing.org>
> + * Stefan Roese <sr@denx.de>
> + *
> + * Based on arch/ppc sequoia pci bits, that are
> + * Copyright 2006-2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
> + *
> + * Based on bamboo.c from Wade Farnsworth <wfarnsworth@mvista.com>
> + * Copyright 2004 MontaVista Software Inc.
> + * Copyright 2006 AMCC
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
Unless there really is something peculiar about the EPx bridge
compared to say the GP, EP and other 4xx bridges, this should have a
more general name.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2007-08-27 1:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-25 9:29 [PATCH 0/3][POWERPC] Add PCI support for 44xEPx Vitaly Bordug
2007-08-25 9:29 ` [PATCH 1/3] [POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances Vitaly Bordug
2007-08-27 1:15 ` David Gibson
2007-08-27 6:31 ` Vitaly Bordug
2007-08-27 7:49 ` David Gibson
2007-08-27 8:31 ` Vitaly Bordug
2007-08-25 9:29 ` [PATCH 2/3] [POWERPC] Add pci node to sequoia dts Vitaly Bordug
2007-08-25 9:49 ` Segher Boessenkool
2007-08-26 10:27 ` Vitaly Bordug
2007-08-26 19:10 ` Segher Boessenkool
2007-08-27 1:55 ` David Gibson
2007-08-25 9:51 ` Segher Boessenkool
2007-08-27 5:56 ` Stefan Roese
2007-08-27 1:54 ` David Gibson
2007-08-27 6:07 ` Stefan Roese
2007-08-27 6:21 ` David Gibson
2007-08-27 6:38 ` Stefan Roese
2007-08-27 6:50 ` Vitaly Bordug
2007-08-25 9:30 ` [PATCH 3/3] [POWERPC] Add PCI support for AMCC 440EPx (sequoia) Vitaly Bordug
2007-08-27 1:57 ` David Gibson [this message]
2007-08-27 6:21 ` Stefan Roese
2007-08-27 17:22 ` Josh Boyer
2007-08-28 0:21 ` David Gibson
2007-08-27 6:55 ` Vitaly Bordug
2007-08-27 8:05 ` Stefan Roese
2007-09-05 17:28 ` Valentine Barshak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070827015719.GD12804@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=sr@denx.de \
--cc=vitb@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).