[POWERPC] Use global_number in ppc32 pci_controller
Make the pci_controller struct use global_number for the PHB domain number
instead of index to match what ppc64 does and reuse its pci_domain_nr code.
Introduced a pci-common.c to handle shared code between ppc32 & ppc64.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index e2b2b6b..80cfb4a 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -21,7 +21,6 @@
struct pci_controller {
struct pci_bus *bus;
void *arch_data;
- int index; /* PCI domain number */
struct pci_controller *next;
struct device *parent;
@@ -60,6 +59,7 @@
*/
struct resource io_resource;
struct resource mem_resources[3];
+ int global_number; /* PCI domain number */
};
static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)