aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-12-19 22:54:53 -0500
committerPaul Mackerras <paulus@samba.org>2007-12-20 00:18:09 -0500
commit3fd94c6b1a1158d3e0e505b0a00c3a707b5fcd40 (patch)
treead542ce91f44a5aeacf095d2100a831ab6ebf23e /include
parentbf5e2ba28f24f82a64524ef4772c9ebe12e2cd2a (diff)
[POWERPC] Merge PCI resource allocation & assignment
The 32 bits PCI code now uses the generic code for assigning unassigned resources and an algorithm similar to x86 for claiming existing ones. This works far better than the 64 bits code which basically can only claim existing ones (pci_probe_only=1) or would fall apart completely. This merges them so that the new 32 bits implementation is used for both. 64 bits now gets the new PCI flags for controlling the behaviour, though the old pci_probe_only global is still there for now to be cleared if you want to. I kept a pcibios_claim_one_bus() function mostly based on the old 64 bits code for use by the DLPAR hotplug. This will have to be cleaned up, thought I hope it will work in the meantime. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/pci.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h
index 9899d893c162..a05a942b1c25 100644
--- a/include/asm-powerpc/pci.h
+++ b/include/asm-powerpc/pci.h
@@ -36,14 +36,10 @@ struct pci_dev;
36 36
37/* 37/*
38 * Set this to 1 if you want the kernel to re-assign all PCI 38 * Set this to 1 if you want the kernel to re-assign all PCI
39 * bus numbers 39 * bus numbers (don't do that on ppc64 yet !)
40 */ 40 */
41#ifdef CONFIG_PPC64
42#define pcibios_assign_all_busses() 0
43#else
44#define pcibios_assign_all_busses() (ppc_pci_flags & \ 41#define pcibios_assign_all_busses() (ppc_pci_flags & \
45 PPC_PCI_REASSIGN_ALL_BUS) 42 PPC_PCI_REASSIGN_ALL_BUS)
46#endif
47#define pcibios_scan_all_fns(a, b) 0 43#define pcibios_scan_all_fns(a, b) 0
48 44
49static inline void pcibios_set_master(struct pci_dev *dev) 45static inline void pcibios_set_master(struct pci_dev *dev)
@@ -200,6 +196,8 @@ extern void pcibios_setup_new_device(struct pci_dev *dev);
200 196
201extern void pcibios_claim_one_bus(struct pci_bus *b); 197extern void pcibios_claim_one_bus(struct pci_bus *b);
202 198
199extern void pcibios_resource_survey(void);
200
203extern struct pci_controller *init_phb_dynamic(struct device_node *dn); 201extern struct pci_controller *init_phb_dynamic(struct device_node *dn);
204 202
205extern struct pci_dev *of_create_pci_dev(struct device_node *node, 203extern struct pci_dev *of_create_pci_dev(struct device_node *node,