linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: ppc-dev <linuxppc-dev@ozlabs.org>
Subject: [PATCH 02/19] [POWERPC] consolidate pci_controller
Date: Tue, 11 Dec 2007 11:00:13 +1100	[thread overview]
Message-ID: <20071211110013.0212a1a5.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20071206180608.de14e9b1.sfr@canb.auug.org.au>


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/asm-powerpc/pci-bridge.h |   65 +++++++++++++-------------------------
 1 files changed, 22 insertions(+), 43 deletions(-)

diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index e021314..f67d262 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -11,33 +11,44 @@
 #include <linux/list.h>
 #include <linux/ioport.h>
 
-#ifndef CONFIG_PPC64
 /*
  * Structure of a PCI controller (host bridge)
  */
 struct pci_controller {
 	struct pci_bus *bus;
 	char is_dynamic;
+#ifdef CONFIG_PPC64
+	int node;
+#endif
 	void *arch_data;
 	struct list_head list_node;
 	struct device *parent;
 
 	int first_busno;
 	int last_busno;
+#ifndef CONFIG_PPC64
 	int self_busno;
+#endif
 
 	void __iomem *io_base_virt;
+#ifdef CONFIG_PPC64
+	void *io_base_alloc;
+#endif
 	resource_size_t io_base_phys;
 
 	/* Some machines (PReP) have a non 1:1 mapping of
 	 * the PCI memory space in the CPU bus space
 	 */
 	resource_size_t pci_mem_offset;
+#ifdef CONFIG_PPC64
+	unsigned long pci_io_size;
+#endif
 
 	struct pci_ops *ops;
 	volatile unsigned int __iomem *cfg_addr;
 	volatile void __iomem *cfg_data;
 
+#ifndef CONFIG_PPC64
 	/*
 	 * Used for variants of PCI indirect handling and possible quirks:
 	 *  SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1
@@ -58,15 +69,24 @@ struct pci_controller {
 #define PPC_INDIRECT_TYPE_NO_PCIE_LINK		0x00000008
 #define PPC_INDIRECT_TYPE_BIG_ENDIAN		0x00000010
 	u32 indirect_type;
-
+#endif	/* !CONFIG_PPC64 */
 	/* Currently, we limit ourselves to 1 IO range and 3 mem
 	 * ranges since the common pci_bus structure can't handle more
 	 */
 	struct resource	io_resource;
 	struct resource mem_resources[3];
 	int global_number;		/* PCI domain number */
+#ifdef CONFIG_PPC64
+	unsigned long buid;
+	unsigned long dma_window_base_cur;
+	unsigned long dma_window_size;
+
+	void *private_data;
+#endif	/* CONFIG_PPC64 */
 };
 
+#ifndef CONFIG_PPC64
+
 static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
 {
 	return bus->sysdata;
@@ -108,47 +128,6 @@ extern void __init update_bridge_resource(struct pci_dev *dev,
 #else	/* CONFIG_PPC64 */
 
 /*
- * Structure of a PCI controller (host bridge)
- */
-struct pci_controller {
-	struct pci_bus *bus;
-	char is_dynamic;
-	int node;
-	void *arch_data;
-	struct list_head list_node;
-	struct device *parent;
-
-	int first_busno;
-	int last_busno;
-
-	void __iomem *io_base_virt;
-	void *io_base_alloc;
-	resource_size_t io_base_phys;
-
-	/* Some machines have a non 1:1 mapping of
-	 * the PCI memory space in the CPU bus space
-	 */
-	resource_size_t pci_mem_offset;
-	unsigned long pci_io_size;
-
-	struct pci_ops *ops;
-	volatile unsigned int __iomem *cfg_addr;
-	volatile void __iomem *cfg_data;
-
-	/* Currently, we limit ourselves to 1 IO range and 3 mem
-	 * ranges since the common pci_bus structure can't handle more
-	 */
-	struct resource io_resource;
-	struct resource mem_resources[3];
-	int global_number;
-	unsigned long buid;
-	unsigned long dma_window_base_cur;
-	unsigned long dma_window_size;
-
-	void *private_data;
-};
-
-/*
  * PCI stuff, for nodes representing PCI devices, pointed to
  * by device_node->data.
  */
-- 
1.5.3.7

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

  reply	other threads:[~2007-12-11  0:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-06  7:00 Powerpc PCI cleanups (mainly iSeries) Stephen Rothwell
2007-12-06  7:02 ` [PATCH 01/19] [POWERPC] clean up pci-bridge.h Stephen Rothwell
2007-12-06  7:06 ` [PATCH 02/19] [POWERPC] consolidate pci_controller Stephen Rothwell
2007-12-11  0:00   ` Stephen Rothwell [this message]
2007-12-06 14:46 ` [PATCH 03/19] [POWERPC] iSeries: move find_Device_Node to avoid a forward declaration Stephen Rothwell
2007-12-06 14:48 ` [PATCH 04/19] [POWERPC] iSeries: cleanup PCI retry code a little Stephen Rothwell
2007-12-06 14:49 ` [PATCH 05/19] [POWERPC] iSeries: deCamelCase pci.c Stephen Rothwell
2007-12-06 14:50 ` [PATCH 06/19] [POWERPC] iSeries: remove some dead code from pci.c Stephen Rothwell
2007-12-06 14:51 ` [PATCH 07/19] [POWERPC] iSeries: unindent and clean iSeries_pci_final_fixup Stephen Rothwell
2007-12-06 18:33   ` Olof Johansson
2007-12-06 14:52 ` [PATCH 08/19] [POWERPC] iSeries: consoldiate PCI IO error check Stephen Rothwell
2007-12-06 14:53 ` [PATCH 09/19] [POWERPC] iSeries: remove one layer of IO routines Stephen Rothwell
2007-12-06 14:54 ` [PATCH 10/19] [POWERPC] iSeries: remove pci_dn dependency from iSeries_Device_Information Stephen Rothwell
2007-12-06 14:55 ` [PATCH 11/19] [POWERPC] iSeries: iseries_ds_addr is only used in pci.c Stephen Rothwell
2007-12-06 14:56 ` [PATCH 12/19] [POWERPC] iSeries: reduce dependence on pci_dn bussubno Stephen Rothwell
2007-12-06 14:58 ` [PATCH 13/19] [POWERPC] iSeries: make pcibios_final_fixup not depend on pci_dn Stephen Rothwell
2007-12-06 14:59 ` [PATCH 14/19] [POWERPC] Inline pci_setup_pci_controller as it has become trivial Stephen Rothwell
2007-12-11  0:02   ` Stephen Rothwell
2007-12-06 15:00 ` [PATCH 15/19] [POWERPC] iSeries: call iSeries_pcibios_init from setup_arch Stephen Rothwell
2007-12-06 15:01 ` [PATCH 16/19] [POWERPC] iSeries: hose->buid is always zero for iSeries Stephen Rothwell
2007-12-11  0:03   ` Stephen Rothwell
2007-12-06 15:03 ` [PATCH 17/19] [POWERPC] remove some iSeries platform checks from the PCI code Stephen Rothwell
2007-12-06 15:04 ` [PATCH 18/19] [POWERPC] Don't special case pci_domain_nr() for iSeries Stephen Rothwell
2007-12-06 15:05 ` [PATCH 19/19] [POWERPC] pci_controller->arch_data really is a struct device_node * Stephen Rothwell
2007-12-06 16:56   ` Jon Loeliger
2007-12-09  7:27   ` Benjamin Herrenschmidt
2007-12-10  3:33     ` Stephen Rothwell
2007-12-06 15:07 ` Powerpc PCI cleanups (mainly iSeries) Stephen Rothwell
2007-12-06 15:44   ` Josh Boyer
2007-12-09  7:29     ` Benjamin Herrenschmidt
2007-12-09 14:40       ` Josh Boyer
2007-12-07  5:08 ` [PATCH 1/3] [POWERPC] iSeries: DeCamelCase vpdinfo.c Stephen Rothwell
2007-12-07  5:09 ` [PATCH 2/3] [POWERPC] iSeries: clean up and simplify vdpinfo.c Stephen Rothwell
2007-12-07  5:10 ` [PATCH 3/3] [POWERPC] iSeries: merge vpdinfo.c intp pci.c Stephen Rothwell
2007-12-11  0:06 ` Powerpc PCI cleanups (mainly iSeries) Stephen Rothwell

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=20071211110013.0212a1a5.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linuxppc-dev@ozlabs.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).