diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-27 12:50:25 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-27 12:50:25 -0400 |
commit | d387899f3f7092edbafe16d69ea9737846473e99 (patch) | |
tree | b8e6e1fd681e841bf81d79cfe273d9434c010f76 /arch | |
parent | cc14d430837e8854bd160275ad71d887a8a98488 (diff) |
powerpc: Move iSeries_pci.c to powerpc/platform/iseries
and rename it to pci.c. This also required moving
arch/ppc64/kernel/pci.h into include/asm-powerpc (called
ppc-pci.h.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/iseries/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c (renamed from arch/ppc64/kernel/iSeries_pci.c) | 66 | ||||
-rw-r--r-- | arch/ppc64/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/bpa_iommu.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/bpa_setup.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/eeh.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/maple_pci.c | 3 | ||||
-rw-r--r-- | arch/ppc64/kernel/pSeries_iommu.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/pSeries_pci.c | 3 | ||||
-rw-r--r-- | arch/ppc64/kernel/pSeries_setup.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci.c | 3 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci.h | 54 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci_direct_iommu.c | 3 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci_dn.c | 3 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci_iommu.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/pmac_pci.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/rtas_pci.c | 3 | ||||
-rw-r--r-- | arch/ppc64/kernel/sys_ppc32.c | 3 | ||||
-rw-r--r-- | arch/ppc64/kernel/u3_iommu.c | 3 |
19 files changed, 49 insertions, 112 deletions
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index bf3992bf7ff8..7ee4592f83d3 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile | |||
@@ -1,2 +1,3 @@ | |||
1 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ | 1 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ |
2 | hvcall.o proc.o htab.o iommu.o | 2 | hvcall.o proc.o htab.o iommu.o |
3 | obj-$(CONFIG_PCI) += pci.o | ||
diff --git a/arch/ppc64/kernel/iSeries_pci.c b/arch/powerpc/platforms/iseries/pci.c index fbc273c32bcc..61a857218bc8 100644 --- a/arch/ppc64/kernel/iSeries_pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -1,28 +1,26 @@ | |||
1 | /* | 1 | /* |
2 | * iSeries_pci.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Allan Trautman, IBM Corporation | 2 | * Copyright (C) 2001 Allan Trautman, IBM Corporation |
5 | * | 3 | * |
6 | * iSeries specific routines for PCI. | 4 | * iSeries specific routines for PCI. |
7 | * | 5 | * |
8 | * Based on code from pci.c and iSeries_pci.c 32bit | 6 | * Based on code from pci.c and iSeries_pci.c 32bit |
9 | * | 7 | * |
10 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
12 | * the Free Software Foundation; either version 2 of the License, or | 10 | * the Free Software Foundation; either version 2 of the License, or |
13 | * (at your option) any later version. | 11 | * (at your option) any later version. |
14 | * | 12 | * |
15 | * This program is distributed in the hope that it will be useful, | 13 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
19 | * | 17 | * |
20 | * You should have received a copy of the GNU General Public License | 18 | * You should have received a copy of the GNU General Public License |
21 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | */ | 21 | */ |
24 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
25 | #include <linux/list.h> | 23 | #include <linux/list.h> |
26 | #include <linux/string.h> | 24 | #include <linux/string.h> |
27 | #include <linux/init.h> | 25 | #include <linux/init.h> |
28 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -43,12 +41,12 @@ | |||
43 | #include <asm/iSeries/iSeries_pci.h> | 41 | #include <asm/iSeries/iSeries_pci.h> |
44 | #include <asm/iSeries/mf.h> | 42 | #include <asm/iSeries/mf.h> |
45 | 43 | ||
46 | #include "pci.h" | 44 | #include <asm/ppc-pci.h> |
47 | 45 | ||
48 | extern unsigned long io_page_mask; | 46 | extern unsigned long io_page_mask; |
49 | 47 | ||
50 | /* | 48 | /* |
51 | * Forward declares of prototypes. | 49 | * Forward declares of prototypes. |
52 | */ | 50 | */ |
53 | static struct iSeries_Device_Node *find_Device_Node(int bus, int devfn); | 51 | static struct iSeries_Device_Node *find_Device_Node(int bus, int devfn); |
54 | static void scan_PHB_slots(struct pci_controller *Phb); | 52 | static void scan_PHB_slots(struct pci_controller *Phb); |
@@ -68,7 +66,7 @@ static long Pci_Cfg_Write_Count; | |||
68 | #endif | 66 | #endif |
69 | static long Pci_Error_Count; | 67 | static long Pci_Error_Count; |
70 | 68 | ||
71 | static int Pci_Retry_Max = 3; /* Only retry 3 times */ | 69 | static int Pci_Retry_Max = 3; /* Only retry 3 times */ |
72 | static int Pci_Error_Flag = 1; /* Set Retry Error on. */ | 70 | static int Pci_Error_Flag = 1; /* Set Retry Error on. */ |
73 | 71 | ||
74 | static struct pci_ops iSeries_pci_ops; | 72 | static struct pci_ops iSeries_pci_ops; |
@@ -179,7 +177,7 @@ static void allocate_device_bars(struct pci_dev *dev) | |||
179 | for (bar_num = 0; bar_num <= PCI_ROM_RESOURCE; ++bar_num) { | 177 | for (bar_num = 0; bar_num <= PCI_ROM_RESOURCE; ++bar_num) { |
180 | bar_res = &dev->resource[bar_num]; | 178 | bar_res = &dev->resource[bar_num]; |
181 | iomm_table_allocate_entry(dev, bar_num); | 179 | iomm_table_allocate_entry(dev, bar_num); |
182 | } | 180 | } |
183 | } | 181 | } |
184 | 182 | ||
185 | /* | 183 | /* |
@@ -278,28 +276,28 @@ unsigned long __init find_and_init_phbs(void) | |||
278 | 276 | ||
279 | /* | 277 | /* |
280 | * iSeries_pcibios_init | 278 | * iSeries_pcibios_init |
281 | * | 279 | * |
282 | * Chance to initialize and structures or variable before PCI Bus walk. | 280 | * Chance to initialize and structures or variable before PCI Bus walk. |
283 | */ | 281 | */ |
284 | void iSeries_pcibios_init(void) | 282 | void iSeries_pcibios_init(void) |
285 | { | 283 | { |
286 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n"); | 284 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n"); |
287 | iomm_table_initialize(); | 285 | iomm_table_initialize(); |
288 | find_and_init_phbs(); | 286 | find_and_init_phbs(); |
289 | io_page_mask = -1; | 287 | io_page_mask = -1; |
290 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n"); | 288 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n"); |
291 | } | 289 | } |
292 | 290 | ||
293 | /* | 291 | /* |
294 | * iSeries_pci_final_fixup(void) | 292 | * iSeries_pci_final_fixup(void) |
295 | */ | 293 | */ |
296 | void __init iSeries_pci_final_fixup(void) | 294 | void __init iSeries_pci_final_fixup(void) |
297 | { | 295 | { |
298 | struct pci_dev *pdev = NULL; | 296 | struct pci_dev *pdev = NULL; |
299 | struct iSeries_Device_Node *node; | 297 | struct iSeries_Device_Node *node; |
300 | int DeviceCount = 0; | 298 | int DeviceCount = 0; |
301 | 299 | ||
302 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); | 300 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); |
303 | 301 | ||
304 | /* Fix up at the device node and pci_dev relationship */ | 302 | /* Fix up at the device node and pci_dev relationship */ |
305 | mf_display_src(0xC9000100); | 303 | mf_display_src(0xC9000100); |
@@ -332,24 +330,24 @@ void __init iSeries_pci_final_fixup(void) | |||
332 | void pcibios_fixup_bus(struct pci_bus *PciBus) | 330 | void pcibios_fixup_bus(struct pci_bus *PciBus) |
333 | { | 331 | { |
334 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup_bus(0x%04X) Entry.\n", | 332 | PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup_bus(0x%04X) Entry.\n", |
335 | PciBus->number); | 333 | PciBus->number); |
336 | } | 334 | } |
337 | 335 | ||
338 | void pcibios_fixup_resources(struct pci_dev *pdev) | 336 | void pcibios_fixup_resources(struct pci_dev *pdev) |
339 | { | 337 | { |
340 | PPCDBG(PPCDBG_BUSWALK, "fixup_resources pdev %p\n", pdev); | 338 | PPCDBG(PPCDBG_BUSWALK, "fixup_resources pdev %p\n", pdev); |
341 | } | 339 | } |
342 | 340 | ||
343 | /* | 341 | /* |
344 | * Loop through each node function to find usable EADs bridges. | 342 | * Loop through each node function to find usable EADs bridges. |
345 | */ | 343 | */ |
346 | static void scan_PHB_slots(struct pci_controller *Phb) | 344 | static void scan_PHB_slots(struct pci_controller *Phb) |
347 | { | 345 | { |
348 | struct HvCallPci_DeviceInfo *DevInfo; | 346 | struct HvCallPci_DeviceInfo *DevInfo; |
349 | HvBusNumber bus = Phb->local_number; /* System Bus */ | 347 | HvBusNumber bus = Phb->local_number; /* System Bus */ |
350 | const HvSubBusNumber SubBus = 0; /* EADs is always 0. */ | 348 | const HvSubBusNumber SubBus = 0; /* EADs is always 0. */ |
351 | int HvRc = 0; | 349 | int HvRc = 0; |
352 | int IdSel; | 350 | int IdSel; |
353 | const int MaxAgents = 8; | 351 | const int MaxAgents = 8; |
354 | 352 | ||
355 | DevInfo = (struct HvCallPci_DeviceInfo*) | 353 | DevInfo = (struct HvCallPci_DeviceInfo*) |
@@ -358,10 +356,10 @@ static void scan_PHB_slots(struct pci_controller *Phb) | |||
358 | return; | 356 | return; |
359 | 357 | ||
360 | /* | 358 | /* |
361 | * Probe for EADs Bridges | 359 | * Probe for EADs Bridges |
362 | */ | 360 | */ |
363 | for (IdSel = 1; IdSel < MaxAgents; ++IdSel) { | 361 | for (IdSel = 1; IdSel < MaxAgents; ++IdSel) { |
364 | HvRc = HvCallPci_getDeviceInfo(bus, SubBus, IdSel, | 362 | HvRc = HvCallPci_getDeviceInfo(bus, SubBus, IdSel, |
365 | ISERIES_HV_ADDR(DevInfo), | 363 | ISERIES_HV_ADDR(DevInfo), |
366 | sizeof(struct HvCallPci_DeviceInfo)); | 364 | sizeof(struct HvCallPci_DeviceInfo)); |
367 | if (HvRc == 0) { | 365 | if (HvRc == 0) { |
@@ -393,19 +391,19 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus, | |||
393 | 391 | ||
394 | /* Note: hvSubBus and irq is always be 0 at this level! */ | 392 | /* Note: hvSubBus and irq is always be 0 at this level! */ |
395 | for (Function = 0; Function < 8; ++Function) { | 393 | for (Function = 0; Function < 8; ++Function) { |
396 | AgentId = ISERIES_PCI_AGENTID(IdSel, Function); | 394 | AgentId = ISERIES_PCI_AGENTID(IdSel, Function); |
397 | HvRc = HvCallXm_connectBusUnit(bus, SubBus, AgentId, 0); | 395 | HvRc = HvCallXm_connectBusUnit(bus, SubBus, AgentId, 0); |
398 | if (HvRc == 0) { | 396 | if (HvRc == 0) { |
399 | printk("found device at bus %d idsel %d func %d (AgentId %x)\n", | 397 | printk("found device at bus %d idsel %d func %d (AgentId %x)\n", |
400 | bus, IdSel, Function, AgentId); | 398 | bus, IdSel, Function, AgentId); |
401 | /* Connect EADs: 0x18.00.12 = 0x00 */ | 399 | /* Connect EADs: 0x18.00.12 = 0x00 */ |
402 | PPCDBG(PPCDBG_BUSWALK, | 400 | PPCDBG(PPCDBG_BUSWALK, |
403 | "PCI:Connect EADs: 0x%02X.%02X.%02X\n", | 401 | "PCI:Connect EADs: 0x%02X.%02X.%02X\n", |
404 | bus, SubBus, AgentId); | 402 | bus, SubBus, AgentId); |
405 | HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId, | 403 | HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId, |
406 | ISERIES_HV_ADDR(BridgeInfo), | 404 | ISERIES_HV_ADDR(BridgeInfo), |
407 | sizeof(struct HvCallPci_BridgeInfo)); | 405 | sizeof(struct HvCallPci_BridgeInfo)); |
408 | if (HvRc == 0) { | 406 | if (HvRc == 0) { |
409 | printk("bridge info: type %x subbus %x maxAgents %x maxsubbus %x logslot %x\n", | 407 | printk("bridge info: type %x subbus %x maxAgents %x maxsubbus %x logslot %x\n", |
410 | BridgeInfo->busUnitInfo.deviceType, | 408 | BridgeInfo->busUnitInfo.deviceType, |
411 | BridgeInfo->subBusNumber, | 409 | BridgeInfo->subBusNumber, |
@@ -428,7 +426,7 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus, | |||
428 | printk("PCI: Invalid Bridge Configuration(0x%02X)", | 426 | printk("PCI: Invalid Bridge Configuration(0x%02X)", |
429 | BridgeInfo->busUnitInfo.deviceType); | 427 | BridgeInfo->busUnitInfo.deviceType); |
430 | } | 428 | } |
431 | } else if (HvRc != 0x000B) | 429 | } else if (HvRc != 0x000B) |
432 | pci_Log_Error("EADs Connect", | 430 | pci_Log_Error("EADs Connect", |
433 | bus, SubBus, AgentId, HvRc); | 431 | bus, SubBus, AgentId, HvRc); |
434 | } | 432 | } |
@@ -451,16 +449,16 @@ static int scan_bridge_slot(HvBusNumber Bus, | |||
451 | HvAgentId EADsIdSel = ISERIES_PCI_AGENTID(IdSel, Function); | 449 | HvAgentId EADsIdSel = ISERIES_PCI_AGENTID(IdSel, Function); |
452 | 450 | ||
453 | /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */ | 451 | /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */ |
454 | Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel); | 452 | Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel); |
455 | PPCDBG(PPCDBG_BUSWALK, | 453 | PPCDBG(PPCDBG_BUSWALK, |
456 | "PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n", | 454 | "PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n", |
457 | Bus, 0, EADsIdSel, Irq); | 455 | Bus, 0, EADsIdSel, Irq); |
458 | 456 | ||
459 | /* | 457 | /* |
460 | * Connect all functions of any device found. | 458 | * Connect all functions of any device found. |
461 | */ | 459 | */ |
462 | for (IdSel = 1; IdSel <= BridgeInfo->maxAgents; ++IdSel) { | 460 | for (IdSel = 1; IdSel <= BridgeInfo->maxAgents; ++IdSel) { |
463 | for (Function = 0; Function < 8; ++Function) { | 461 | for (Function = 0; Function < 8; ++Function) { |
464 | HvAgentId AgentId = ISERIES_PCI_AGENTID(IdSel, Function); | 462 | HvAgentId AgentId = ISERIES_PCI_AGENTID(IdSel, Function); |
465 | HvRc = HvCallXm_connectBusUnit(Bus, SubBus, | 463 | HvRc = HvCallXm_connectBusUnit(Bus, SubBus, |
466 | AgentId, Irq); | 464 | AgentId, Irq); |
@@ -484,7 +482,7 @@ static int scan_bridge_slot(HvBusNumber Bus, | |||
484 | "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X, irq %d\n", | 482 | "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X, irq %d\n", |
485 | Bus, SubBus, AgentId, VendorId, Irq); | 483 | Bus, SubBus, AgentId, VendorId, Irq); |
486 | HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId, | 484 | HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId, |
487 | PCI_INTERRUPT_LINE, Irq); | 485 | PCI_INTERRUPT_LINE, Irq); |
488 | if (HvRc != 0) | 486 | if (HvRc != 0) |
489 | pci_Log_Error("PciCfgStore Irq Failed!", | 487 | pci_Log_Error("PciCfgStore Irq Failed!", |
490 | Bus, SubBus, AgentId, HvRc); | 488 | Bus, SubBus, AgentId, HvRc); |
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile index 5988d555d36d..8473a8784567 100644 --- a/arch/ppc64/kernel/Makefile +++ b/arch/ppc64/kernel/Makefile | |||
@@ -16,7 +16,7 @@ obj-y += vdso32/ vdso64/ | |||
16 | 16 | ||
17 | obj-$(CONFIG_PPC_OF) += of_device.o | 17 | obj-$(CONFIG_PPC_OF) += of_device.o |
18 | 18 | ||
19 | pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_irq.o \ | 19 | pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o \ |
20 | iSeries_VpdInfo.o | 20 | iSeries_VpdInfo.o |
21 | pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o | 21 | pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o |
22 | 22 | ||
diff --git a/arch/ppc64/kernel/bpa_iommu.c b/arch/ppc64/kernel/bpa_iommu.c index f33a7bccb0d7..0cc463f24539 100644 --- a/arch/ppc64/kernel/bpa_iommu.c +++ b/arch/ppc64/kernel/bpa_iommu.c | |||
@@ -39,8 +39,8 @@ | |||
39 | #include <asm/pmac_feature.h> | 39 | #include <asm/pmac_feature.h> |
40 | #include <asm/abs_addr.h> | 40 | #include <asm/abs_addr.h> |
41 | #include <asm/system.h> | 41 | #include <asm/system.h> |
42 | #include <asm/ppc-pci.h> | ||
42 | 43 | ||
43 | #include "pci.h" | ||
44 | #include "bpa_iommu.h" | 44 | #include "bpa_iommu.h" |
45 | 45 | ||
46 | static inline unsigned long | 46 | static inline unsigned long |
diff --git a/arch/ppc64/kernel/bpa_setup.c b/arch/ppc64/kernel/bpa_setup.c index 57b3db66f458..9f915f4222b1 100644 --- a/arch/ppc64/kernel/bpa_setup.c +++ b/arch/ppc64/kernel/bpa_setup.c | |||
@@ -43,8 +43,8 @@ | |||
43 | #include <asm/time.h> | 43 | #include <asm/time.h> |
44 | #include <asm/nvram.h> | 44 | #include <asm/nvram.h> |
45 | #include <asm/cputable.h> | 45 | #include <asm/cputable.h> |
46 | #include <asm/ppc-pci.h> | ||
46 | 47 | ||
47 | #include "pci.h" | ||
48 | #include "bpa_iic.h" | 48 | #include "bpa_iic.h" |
49 | #include "bpa_iommu.h" | 49 | #include "bpa_iommu.h" |
50 | 50 | ||
diff --git a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c index ba93fd731222..035d1b14a207 100644 --- a/arch/ppc64/kernel/eeh.c +++ b/arch/ppc64/kernel/eeh.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/rtas.h> | 33 | #include <asm/rtas.h> |
34 | #include <asm/atomic.h> | 34 | #include <asm/atomic.h> |
35 | #include <asm/systemcfg.h> | 35 | #include <asm/systemcfg.h> |
36 | #include "pci.h" | 36 | #include <asm/ppc-pci.h> |
37 | 37 | ||
38 | #undef DEBUG | 38 | #undef DEBUG |
39 | 39 | ||
diff --git a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c index 1d297e0edfc0..0937649f4961 100644 --- a/arch/ppc64/kernel/maple_pci.c +++ b/arch/ppc64/kernel/maple_pci.c | |||
@@ -23,8 +23,7 @@ | |||
23 | #include <asm/pci-bridge.h> | 23 | #include <asm/pci-bridge.h> |
24 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
25 | #include <asm/iommu.h> | 25 | #include <asm/iommu.h> |
26 | 26 | #include <asm/ppc-pci.h> | |
27 | #include "pci.h" | ||
28 | 27 | ||
29 | #ifdef DEBUG | 28 | #ifdef DEBUG |
30 | #define DBG(x...) printk(x) | 29 | #define DBG(x...) printk(x) |
diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c index 5914f61a152e..9e90d41131d8 100644 --- a/arch/ppc64/kernel/pSeries_iommu.c +++ b/arch/ppc64/kernel/pSeries_iommu.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <asm/systemcfg.h> | 47 | #include <asm/systemcfg.h> |
48 | #include <asm/firmware.h> | 48 | #include <asm/firmware.h> |
49 | #include <asm/tce.h> | 49 | #include <asm/tce.h> |
50 | #include "pci.h" | 50 | #include <asm/ppc-pci.h> |
51 | 51 | ||
52 | #define DBG(fmt...) | 52 | #define DBG(fmt...) |
53 | 53 | ||
diff --git a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c index 1f5f141fb7a1..2dd477eb1c53 100644 --- a/arch/ppc64/kernel/pSeries_pci.c +++ b/arch/ppc64/kernel/pSeries_pci.c | |||
@@ -29,8 +29,7 @@ | |||
29 | 29 | ||
30 | #include <asm/pci-bridge.h> | 30 | #include <asm/pci-bridge.h> |
31 | #include <asm/prom.h> | 31 | #include <asm/prom.h> |
32 | 32 | #include <asm/ppc-pci.h> | |
33 | #include "pci.h" | ||
34 | 33 | ||
35 | static int __initdata s7a_workaround = -1; | 34 | static int __initdata s7a_workaround = -1; |
36 | 35 | ||
diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c index b9bcff21b463..5a9fe96f9f67 100644 --- a/arch/ppc64/kernel/pSeries_setup.c +++ b/arch/ppc64/kernel/pSeries_setup.c | |||
@@ -63,9 +63,9 @@ | |||
63 | #include <asm/firmware.h> | 63 | #include <asm/firmware.h> |
64 | #include <asm/pmc.h> | 64 | #include <asm/pmc.h> |
65 | #include <asm/mpic.h> | 65 | #include <asm/mpic.h> |
66 | #include <asm/ppc-pci.h> | ||
66 | 67 | ||
67 | #include "i8259.h" | 68 | #include "i8259.h" |
68 | #include "pci.h" | ||
69 | 69 | ||
70 | #ifdef DEBUG | 70 | #ifdef DEBUG |
71 | #define DBG(fmt...) udbg_printf(fmt) | 71 | #define DBG(fmt...) udbg_printf(fmt) |
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index ff4be1da69d5..feec06bbafc3 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -31,8 +31,7 @@ | |||
31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
32 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
33 | #include <asm/udbg.h> | 33 | #include <asm/udbg.h> |
34 | 34 | #include <asm/ppc-pci.h> | |
35 | #include "pci.h" | ||
36 | 35 | ||
37 | #ifdef DEBUG | 36 | #ifdef DEBUG |
38 | #define DBG(fmt...) udbg_printf(fmt) | 37 | #define DBG(fmt...) udbg_printf(fmt) |
diff --git a/arch/ppc64/kernel/pci.h b/arch/ppc64/kernel/pci.h deleted file mode 100644 index 5eb2cc320566..000000000000 --- a/arch/ppc64/kernel/pci.h +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * c 2001 PPC 64 Team, IBM Corp | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef __PPC_KERNEL_PCI_H__ | ||
10 | #define __PPC_KERNEL_PCI_H__ | ||
11 | |||
12 | #include <linux/pci.h> | ||
13 | #include <asm/pci-bridge.h> | ||
14 | |||
15 | extern unsigned long isa_io_base; | ||
16 | |||
17 | extern void pci_setup_pci_controller(struct pci_controller *hose); | ||
18 | extern void pci_setup_phb_io(struct pci_controller *hose, int primary); | ||
19 | extern void pci_setup_phb_io_dynamic(struct pci_controller *hose, int primary); | ||
20 | |||
21 | |||
22 | extern struct list_head hose_list; | ||
23 | extern int global_phb_number; | ||
24 | |||
25 | extern unsigned long find_and_init_phbs(void); | ||
26 | |||
27 | extern struct pci_dev *ppc64_isabridge_dev; /* may be NULL if no ISA bus */ | ||
28 | |||
29 | /* PCI device_node operations */ | ||
30 | struct device_node; | ||
31 | typedef void *(*traverse_func)(struct device_node *me, void *data); | ||
32 | void *traverse_pci_devices(struct device_node *start, traverse_func pre, | ||
33 | void *data); | ||
34 | |||
35 | void pci_devs_phb_init(void); | ||
36 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); | ||
37 | |||
38 | /* PCI address cache management routines */ | ||
39 | void pci_addr_cache_insert_device(struct pci_dev *dev); | ||
40 | void pci_addr_cache_remove_device(struct pci_dev *dev); | ||
41 | |||
42 | /* From rtas_pci.h */ | ||
43 | void init_pci_config_tokens (void); | ||
44 | unsigned long get_phb_buid (struct device_node *); | ||
45 | |||
46 | /* From pSeries_pci.h */ | ||
47 | extern void pSeries_final_fixup(void); | ||
48 | extern void pSeries_irq_bus_setup(struct pci_bus *bus); | ||
49 | |||
50 | extern unsigned long pci_probe_only; | ||
51 | extern unsigned long pci_assign_all_buses; | ||
52 | extern int pci_read_irq_line(struct pci_dev *pci_dev); | ||
53 | |||
54 | #endif /* __PPC_KERNEL_PCI_H__ */ | ||
diff --git a/arch/ppc64/kernel/pci_direct_iommu.c b/arch/ppc64/kernel/pci_direct_iommu.c index b8f7f58824f4..57980a5674d7 100644 --- a/arch/ppc64/kernel/pci_direct_iommu.c +++ b/arch/ppc64/kernel/pci_direct_iommu.c | |||
@@ -27,8 +27,7 @@ | |||
27 | #include <asm/machdep.h> | 27 | #include <asm/machdep.h> |
28 | #include <asm/pmac_feature.h> | 28 | #include <asm/pmac_feature.h> |
29 | #include <asm/abs_addr.h> | 29 | #include <asm/abs_addr.h> |
30 | 30 | #include <asm/ppc-pci.h> | |
31 | #include "pci.h" | ||
32 | 31 | ||
33 | static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size, | 32 | static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size, |
34 | dma_addr_t *dma_handle, unsigned int __nocast flag) | 33 | dma_addr_t *dma_handle, unsigned int __nocast flag) |
diff --git a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c index a86389d07d57..493bbe43f5b4 100644 --- a/arch/ppc64/kernel/pci_dn.c +++ b/arch/ppc64/kernel/pci_dn.c | |||
@@ -30,8 +30,7 @@ | |||
30 | #include <asm/prom.h> | 30 | #include <asm/prom.h> |
31 | #include <asm/pci-bridge.h> | 31 | #include <asm/pci-bridge.h> |
32 | #include <asm/pSeries_reconfig.h> | 32 | #include <asm/pSeries_reconfig.h> |
33 | 33 | #include <asm/ppc-pci.h> | |
34 | #include "pci.h" | ||
35 | 34 | ||
36 | /* | 35 | /* |
37 | * Traverse_func that inits the PCI fields of the device node. | 36 | * Traverse_func that inits the PCI fields of the device node. |
diff --git a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c index 14647e09c9cd..19362ea11572 100644 --- a/arch/ppc64/kernel/pci_iommu.c +++ b/arch/ppc64/kernel/pci_iommu.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <asm/iommu.h> | 37 | #include <asm/iommu.h> |
38 | #include <asm/pci-bridge.h> | 38 | #include <asm/pci-bridge.h> |
39 | #include <asm/machdep.h> | 39 | #include <asm/machdep.h> |
40 | #include "pci.h" | 40 | #include <asm/ppc-pci.h> |
41 | 41 | ||
42 | #ifdef CONFIG_PPC_ISERIES | 42 | #ifdef CONFIG_PPC_ISERIES |
43 | #include <asm/iSeries/iSeries_pci.h> | 43 | #include <asm/iSeries/iSeries_pci.h> |
diff --git a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c index 1f61aa4746ec..f139fc034199 100644 --- a/arch/ppc64/kernel/pmac_pci.c +++ b/arch/ppc64/kernel/pmac_pci.c | |||
@@ -27,8 +27,8 @@ | |||
27 | #include <asm/machdep.h> | 27 | #include <asm/machdep.h> |
28 | #include <asm/pmac_feature.h> | 28 | #include <asm/pmac_feature.h> |
29 | #include <asm/iommu.h> | 29 | #include <asm/iommu.h> |
30 | #include <asm/ppc-pci.h> | ||
30 | 31 | ||
31 | #include "pci.h" | ||
32 | #include "pmac.h" | 32 | #include "pmac.h" |
33 | 33 | ||
34 | #define DEBUG | 34 | #define DEBUG |
diff --git a/arch/ppc64/kernel/rtas_pci.c b/arch/ppc64/kernel/rtas_pci.c index 4d920dd41dc6..20361bcd8cfb 100644 --- a/arch/ppc64/kernel/rtas_pci.c +++ b/arch/ppc64/kernel/rtas_pci.c | |||
@@ -39,8 +39,7 @@ | |||
39 | #include <asm/iommu.h> | 39 | #include <asm/iommu.h> |
40 | #include <asm/rtas.h> | 40 | #include <asm/rtas.h> |
41 | #include <asm/mpic.h> | 41 | #include <asm/mpic.h> |
42 | 42 | #include <asm/ppc-pci.h> | |
43 | #include "pci.h" | ||
44 | 43 | ||
45 | /* RTAS tokens */ | 44 | /* RTAS tokens */ |
46 | static int read_pci_config; | 45 | static int read_pci_config; |
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c index e93c13458910..1cacf61f9c91 100644 --- a/arch/ppc64/kernel/sys_ppc32.c +++ b/arch/ppc64/kernel/sys_ppc32.c | |||
@@ -53,8 +53,7 @@ | |||
53 | #include <asm/time.h> | 53 | #include <asm/time.h> |
54 | #include <asm/mmu_context.h> | 54 | #include <asm/mmu_context.h> |
55 | #include <asm/systemcfg.h> | 55 | #include <asm/systemcfg.h> |
56 | 56 | #include <asm/ppc-pci.h> | |
57 | #include "pci.h" | ||
58 | 57 | ||
59 | /* readdir & getdents */ | 58 | /* readdir & getdents */ |
60 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) | 59 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) |
diff --git a/arch/ppc64/kernel/u3_iommu.c b/arch/ppc64/kernel/u3_iommu.c index df9c775f4955..fba871a1bda5 100644 --- a/arch/ppc64/kernel/u3_iommu.c +++ b/arch/ppc64/kernel/u3_iommu.c | |||
@@ -45,8 +45,7 @@ | |||
45 | #include <asm/cacheflush.h> | 45 | #include <asm/cacheflush.h> |
46 | #include <asm/lmb.h> | 46 | #include <asm/lmb.h> |
47 | #include <asm/dart.h> | 47 | #include <asm/dart.h> |
48 | 48 | #include <asm/ppc-pci.h> | |
49 | #include "pci.h" | ||
50 | 49 | ||
51 | extern int iommu_force_on; | 50 | extern int iommu_force_on; |
52 | 51 | ||