diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-06-27 02:17:57 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-06-29 02:58:37 -0400 |
commit | 5516b540e98de6f7474a4e7149470ad6a0bbc54a (patch) | |
tree | 9eb57336d892eb8c0e76584285030868df82f626 /include | |
parent | 6a506238b33efd93e60c1585d654b37e292183de (diff) |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/pci-bridge.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/pci.h | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index e2b2b6b7b6b8..80cfb4a75053 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -21,7 +21,6 @@ extern struct pci_controller* pci_bus_to_hose(int bus); | |||
21 | struct pci_controller { | 21 | struct pci_controller { |
22 | struct pci_bus *bus; | 22 | struct pci_bus *bus; |
23 | void *arch_data; | 23 | void *arch_data; |
24 | int index; /* PCI domain number */ | ||
25 | struct pci_controller *next; | 24 | struct pci_controller *next; |
26 | struct device *parent; | 25 | struct device *parent; |
27 | 26 | ||
@@ -60,6 +59,7 @@ struct pci_controller { | |||
60 | */ | 59 | */ |
61 | struct resource io_resource; | 60 | struct resource io_resource; |
62 | struct resource mem_resources[3]; | 61 | struct resource mem_resources[3]; |
62 | int global_number; /* PCI domain number */ | ||
63 | }; | 63 | }; |
64 | 64 | ||
65 | static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | 65 | static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) |
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 93e3752df6b7..0cd3e77efd20 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -107,8 +107,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
107 | #define get_pci_dma_ops() NULL | 107 | #define get_pci_dma_ops() NULL |
108 | #endif | 108 | #endif |
109 | 109 | ||
110 | extern int pci_domain_nr(struct pci_bus *bus); | ||
111 | |||
112 | /* Decide whether to display the domain number in /proc */ | 110 | /* Decide whether to display the domain number in /proc */ |
113 | extern int pci_proc_domain(struct pci_bus *bus); | 111 | extern int pci_proc_domain(struct pci_bus *bus); |
114 | 112 | ||
@@ -130,9 +128,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
130 | */ | 128 | */ |
131 | #define pci_dac_dma_supported(pci_dev, mask) (0) | 129 | #define pci_dac_dma_supported(pci_dev, mask) (0) |
132 | 130 | ||
133 | /* Return the index of the PCI controller for device PDEV. */ | ||
134 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index | ||
135 | |||
136 | /* Set the name of the bus as it appears in /proc/bus/pci */ | 131 | /* Set the name of the bus as it appears in /proc/bus/pci */ |
137 | static inline int pci_proc_domain(struct pci_bus *bus) | 132 | static inline int pci_proc_domain(struct pci_bus *bus) |
138 | { | 133 | { |
@@ -141,6 +136,8 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
141 | 136 | ||
142 | #endif /* CONFIG_PPC64 */ | 137 | #endif /* CONFIG_PPC64 */ |
143 | 138 | ||
139 | extern int pci_domain_nr(struct pci_bus *bus); | ||
140 | |||
144 | struct vm_area_struct; | 141 | struct vm_area_struct; |
145 | /* Map a range of PCI memory or I/O space for a device into user space */ | 142 | /* Map a range of PCI memory or I/O space for a device into user space */ |
146 | int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | 143 | int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, |