aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 15:18:01 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 15:18:01 -0500
commitf33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d (patch)
treeb027b5f3429d416b3da5b9195024007dab062a5e /arch/powerpc/platforms
parente935d5da8e5d12fabe5b632736c50eae0427e8c8 (diff)
parent67963132638e67ad3c5aa16765e6f3f2f3cdd85c (diff)
Merge ../linux-2.6
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c5
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c6
-rw-r--r--arch/powerpc/platforms/powermac/smp.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c14
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c2
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c36
6 files changed, 47 insertions, 18 deletions
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 4ffd2a9832a0..9b7150f10414 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -9,7 +9,12 @@
9#include <asm/pmac_feature.h> 9#include <asm/pmac_feature.h>
10#include <asm/pmac_pfunc.h> 10#include <asm/pmac_pfunc.h>
11 11
12#undef DEBUG
13#ifdef DEBUG
12#define DBG(fmt...) printk(fmt) 14#define DBG(fmt...) printk(fmt)
15#else
16#define DBG(fmt...)
17#endif
13 18
14static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs) 19static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs)
15{ 20{
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 356a739e52b2..4baa75b1d36f 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -20,7 +20,13 @@
20#define LOG_PARSE(fmt...) 20#define LOG_PARSE(fmt...)
21#define LOG_ERROR(fmt...) printk(fmt) 21#define LOG_ERROR(fmt...) printk(fmt)
22#define LOG_BLOB(t,b,c) 22#define LOG_BLOB(t,b,c)
23
24#undef DEBUG
25#ifdef DEBUG
23#define DBG(fmt...) printk(fmt) 26#define DBG(fmt...) printk(fmt)
27#else
28#define DBG(fmt...)
29#endif
24 30
25/* Command numbers */ 31/* Command numbers */
26#define PMF_CMD_LIST 0 32#define PMF_CMD_LIST 0
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 0df2cdcd805c..6d64a9bf3474 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -435,7 +435,7 @@ struct smp_ops_t psurge_smp_ops = {
435 */ 435 */
436 436
437static void (*pmac_tb_freeze)(int freeze); 437static void (*pmac_tb_freeze)(int freeze);
438static unsigned long timebase; 438static u64 timebase;
439static int tb_req; 439static int tb_req;
440 440
441static void smp_core99_give_timebase(void) 441static void smp_core99_give_timebase(void)
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 83578313ee7e..2ab9dcdfb415 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -893,6 +893,20 @@ void eeh_add_device_tree_early(struct device_node *dn)
893} 893}
894EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); 894EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
895 895
896void eeh_add_device_tree_late(struct pci_bus *bus)
897{
898 struct pci_dev *dev;
899
900 list_for_each_entry(dev, &bus->devices, bus_list) {
901 eeh_add_device_late(dev);
902 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
903 struct pci_bus *subbus = dev->subordinate;
904 if (subbus)
905 eeh_add_device_tree_late(subbus);
906 }
907 }
908}
909
896/** 910/**
897 * eeh_add_device_late - perform EEH initialization for the indicated pci device 911 * eeh_add_device_late - perform EEH initialization for the indicated pci device
898 * @dev: pci device for which to set up EEH 912 * @dev: pci device for which to set up EEH
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index e3cbba49fd6e..b811d5ff92fe 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -37,7 +37,7 @@
37 37
38static inline const char * pcid_name (struct pci_dev *pdev) 38static inline const char * pcid_name (struct pci_dev *pdev)
39{ 39{
40 if (pdev->dev.driver) 40 if (pdev && pdev->dev.driver)
41 return pdev->dev.driver->name; 41 return pdev->dev.driver->name;
42 return ""; 42 return "";
43} 43}
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index bdaa8aabdaa6..f3bad900bbcf 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -106,6 +106,8 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
106 } 106 }
107 } 107 }
108 } 108 }
109
110 eeh_add_device_tree_late(bus);
109} 111}
110EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices); 112EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices);
111 113
@@ -114,7 +116,6 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
114{ 116{
115 u8 sec_busno; 117 u8 sec_busno;
116 struct pci_bus *child_bus; 118 struct pci_bus *child_bus;
117 struct pci_dev *child_dev;
118 119
119 /* Get busno of downstream bus */ 120 /* Get busno of downstream bus */
120 pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno); 121 pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno);
@@ -129,10 +130,6 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
129 130
130 pci_scan_child_bus(child_bus); 131 pci_scan_child_bus(child_bus);
131 132
132 list_for_each_entry(child_dev, &child_bus->devices, bus_list) {
133 eeh_add_device_late(child_dev);
134 }
135
136 /* Fixup new pci devices without touching bus struct */ 133 /* Fixup new pci devices without touching bus struct */
137 pcibios_fixup_new_pci_devices(child_bus, 0); 134 pcibios_fixup_new_pci_devices(child_bus, 0);
138 135
@@ -160,18 +157,25 @@ pcibios_add_pci_devices(struct pci_bus * bus)
160 157
161 eeh_add_device_tree_early(dn); 158 eeh_add_device_tree_early(dn);
162 159
163 /* pci_scan_slot should find all children */ 160 if (_machine == PLATFORM_PSERIES_LPAR) {
164 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); 161 /* use ofdt-based probe */
165 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); 162 of_scan_bus(dn, bus);
166 if (num) { 163 if (!list_empty(&bus->devices)) {
167 pcibios_fixup_new_pci_devices(bus, 1); 164 pcibios_fixup_new_pci_devices(bus, 0);
168 pci_bus_add_devices(bus); 165 pci_bus_add_devices(bus);
169 } 166 }
167 } else {
168 /* use legacy probe */
169 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
170 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
171 if (num) {
172 pcibios_fixup_new_pci_devices(bus, 1);
173 pci_bus_add_devices(bus);
174 }
170 175
171 list_for_each_entry(dev, &bus->devices, bus_list) { 176 list_for_each_entry(dev, &bus->devices, bus_list)
172 eeh_add_device_late (dev); 177 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
173 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) 178 pcibios_pci_config_bridge(dev);
174 pcibios_pci_config_bridge(dev);
175 } 179 }
176} 180}
177EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); 181EXPORT_SYMBOL_GPL(pcibios_add_pci_devices);