aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/pci.c7
-rw-r--r--arch/arm64/boot/dts/apm/apm-storm.dtsi23
-rw-r--r--arch/frv/mb93090-mb00/pci-frv.c8
-rw-r--r--arch/frv/mb93090-mb00/pci-frv.h8
-rw-r--r--arch/frv/mb93090-mb00/pci-vdk.c2
-rw-r--r--arch/ia64/pci/pci.c5
-rw-r--r--arch/microblaze/pci/pci-common.c9
-rw-r--r--arch/mips/pci/pci.c6
-rw-r--r--arch/mn10300/unit-asb2305/pci-asb2305.c22
-rw-r--r--arch/mn10300/unit-asb2305/pci-asb2305.h7
-rw-r--r--arch/mn10300/unit-asb2305/pci.c1
-rw-r--r--arch/powerpc/kernel/pci-common.c8
-rw-r--r--arch/sh/drivers/pci/pci-sh4.h8
-rw-r--r--arch/x86/include/asm/pci_x86.h2
-rw-r--r--arch/x86/pci/common.c21
-rw-r--r--arch/x86/pci/fixup.c13
-rw-r--r--arch/x86/pci/intel_mid_pci.c9
-rw-r--r--arch/x86/pci/irq.c23
-rw-r--r--arch/xtensa/kernel/pci.c4
19 files changed, 48 insertions, 138 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 82f738e5d54c..cded02c890aa 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -242,12 +242,7 @@ pci_restore_srm_config(void)
242 242
243void pcibios_fixup_bus(struct pci_bus *bus) 243void pcibios_fixup_bus(struct pci_bus *bus)
244{ 244{
245 struct pci_dev *dev = bus->self; 245 struct pci_dev *dev;
246
247 if (pci_has_flag(PCI_PROBE_ONLY) && dev &&
248 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
249 pci_read_bridge_bases(bus);
250 }
251 246
252 list_for_each_entry(dev, &bus->devices, bus_list) { 247 list_for_each_entry(dev, &bus->devices, bus_list) {
253 pdev_save_srm_config(dev); 248 pdev_save_srm_config(dev);
diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
index 0689c3fb56e3..b49482e3ca9c 100644
--- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
@@ -490,7 +490,8 @@
490 0xe0 0xd0000000 0x0 0x00040000>; /* PCI config space */ 490 0xe0 0xd0000000 0x0 0x00040000>; /* PCI config space */
491 reg-names = "csr", "cfg"; 491 reg-names = "csr", "cfg";
492 ranges = <0x01000000 0x00 0x00000000 0xe0 0x10000000 0x00 0x00010000 /* io */ 492 ranges = <0x01000000 0x00 0x00000000 0xe0 0x10000000 0x00 0x00010000 /* io */
493 0x02000000 0x00 0x80000000 0xe1 0x80000000 0x00 0x80000000>; /* mem */ 493 0x02000000 0x00 0x80000000 0xe1 0x80000000 0x00 0x80000000 /* mem */
494 0x43000000 0xf0 0x00000000 0xf0 0x00000000 0x10 0x00000000>; /* mem */
494 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 495 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
495 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; 496 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
496 interrupt-map-mask = <0x0 0x0 0x0 0x7>; 497 interrupt-map-mask = <0x0 0x0 0x0 0x7>;
@@ -513,8 +514,9 @@
513 reg = < 0x00 0x1f2c0000 0x0 0x00010000 /* Controller registers */ 514 reg = < 0x00 0x1f2c0000 0x0 0x00010000 /* Controller registers */
514 0xd0 0xd0000000 0x0 0x00040000>; /* PCI config space */ 515 0xd0 0xd0000000 0x0 0x00040000>; /* PCI config space */
515 reg-names = "csr", "cfg"; 516 reg-names = "csr", "cfg";
516 ranges = <0x01000000 0x0 0x00000000 0xd0 0x10000000 0x00 0x00010000 /* io */ 517 ranges = <0x01000000 0x00 0x00000000 0xd0 0x10000000 0x00 0x00010000 /* io */
517 0x02000000 0x0 0x80000000 0xd1 0x80000000 0x00 0x80000000>; /* mem */ 518 0x02000000 0x00 0x80000000 0xd1 0x80000000 0x00 0x80000000 /* mem */
519 0x43000000 0xd8 0x00000000 0xd8 0x00000000 0x08 0x00000000>; /* mem */
518 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 520 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
519 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; 521 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
520 interrupt-map-mask = <0x0 0x0 0x0 0x7>; 522 interrupt-map-mask = <0x0 0x0 0x0 0x7>;
@@ -537,8 +539,9 @@
537 reg = < 0x00 0x1f2d0000 0x0 0x00010000 /* Controller registers */ 539 reg = < 0x00 0x1f2d0000 0x0 0x00010000 /* Controller registers */
538 0x90 0xd0000000 0x0 0x00040000>; /* PCI config space */ 540 0x90 0xd0000000 0x0 0x00040000>; /* PCI config space */
539 reg-names = "csr", "cfg"; 541 reg-names = "csr", "cfg";
540 ranges = <0x01000000 0x0 0x00000000 0x90 0x10000000 0x0 0x00010000 /* io */ 542 ranges = <0x01000000 0x00 0x00000000 0x90 0x10000000 0x00 0x00010000 /* io */
541 0x02000000 0x0 0x80000000 0x91 0x80000000 0x0 0x80000000>; /* mem */ 543 0x02000000 0x00 0x80000000 0x91 0x80000000 0x00 0x80000000 /* mem */
544 0x43000000 0x94 0x00000000 0x94 0x00000000 0x04 0x00000000>; /* mem */
542 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 545 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
543 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; 546 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
544 interrupt-map-mask = <0x0 0x0 0x0 0x7>; 547 interrupt-map-mask = <0x0 0x0 0x0 0x7>;
@@ -561,8 +564,9 @@
561 reg = < 0x00 0x1f500000 0x0 0x00010000 /* Controller registers */ 564 reg = < 0x00 0x1f500000 0x0 0x00010000 /* Controller registers */
562 0xa0 0xd0000000 0x0 0x00040000>; /* PCI config space */ 565 0xa0 0xd0000000 0x0 0x00040000>; /* PCI config space */
563 reg-names = "csr", "cfg"; 566 reg-names = "csr", "cfg";
564 ranges = <0x01000000 0x0 0x00000000 0xa0 0x10000000 0x0 0x00010000 /* io */ 567 ranges = <0x01000000 0x00 0x00000000 0xa0 0x10000000 0x00 0x00010000 /* io */
565 0x02000000 0x0 0x80000000 0xa1 0x80000000 0x0 0x80000000>; /* mem */ 568 0x02000000 0x00 0x80000000 0xa1 0x80000000 0x00 0x80000000 /* mem */
569 0x43000000 0xb0 0x00000000 0xb0 0x00000000 0x10 0x00000000>; /* mem */
566 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 570 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
567 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; 571 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
568 interrupt-map-mask = <0x0 0x0 0x0 0x7>; 572 interrupt-map-mask = <0x0 0x0 0x0 0x7>;
@@ -585,8 +589,9 @@
585 reg = < 0x00 0x1f510000 0x0 0x00010000 /* Controller registers */ 589 reg = < 0x00 0x1f510000 0x0 0x00010000 /* Controller registers */
586 0xc0 0xd0000000 0x0 0x00200000>; /* PCI config space */ 590 0xc0 0xd0000000 0x0 0x00200000>; /* PCI config space */
587 reg-names = "csr", "cfg"; 591 reg-names = "csr", "cfg";
588 ranges = <0x01000000 0x0 0x00000000 0xc0 0x10000000 0x0 0x00010000 /* io */ 592 ranges = <0x01000000 0x00 0x00000000 0xc0 0x10000000 0x00 0x00010000 /* io */
589 0x02000000 0x0 0x80000000 0xc1 0x80000000 0x0 0x80000000>; /* mem */ 593 0x02000000 0x00 0x80000000 0xc1 0x80000000 0x00 0x80000000 /* mem */
594 0x43000000 0xc8 0x00000000 0xc8 0x00000000 0x08 0x00000000>; /* mem */
590 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 595 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
591 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; 596 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
592 interrupt-map-mask = <0x0 0x0 0x0 0x7>; 597 interrupt-map-mask = <0x0 0x0 0x0 0x7>;
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
index 0635bd6c2af3..34bb4b13e079 100644
--- a/arch/frv/mb93090-mb00/pci-frv.c
+++ b/arch/frv/mb93090-mb00/pci-frv.c
@@ -175,14 +175,6 @@ static void __init pcibios_assign_resources(void)
175 if (!r->start && r->end) 175 if (!r->start && r->end)
176 pci_assign_resource(dev, idx); 176 pci_assign_resource(dev, idx);
177 } 177 }
178
179 if (pci_probe & PCI_ASSIGN_ROMS) {
180 r = &dev->resource[PCI_ROM_RESOURCE];
181 r->end -= r->start;
182 r->start = 0;
183 if (r->end)
184 pci_assign_resource(dev, PCI_ROM_RESOURCE);
185 }
186 } 178 }
187} 179}
188 180
diff --git a/arch/frv/mb93090-mb00/pci-frv.h b/arch/frv/mb93090-mb00/pci-frv.h
index a7e487fe76ed..d51992ff5a61 100644
--- a/arch/frv/mb93090-mb00/pci-frv.h
+++ b/arch/frv/mb93090-mb00/pci-frv.h
@@ -14,14 +14,6 @@
14#define DBG(x...) 14#define DBG(x...)
15#endif 15#endif
16 16
17#define PCI_PROBE_BIOS 0x0001
18#define PCI_PROBE_CONF1 0x0002
19#define PCI_PROBE_CONF2 0x0004
20#define PCI_NO_CHECKS 0x0400
21#define PCI_ASSIGN_ROMS 0x1000
22#define PCI_BIOS_IRQ_SCAN 0x2000
23#define PCI_ASSIGN_ALL_BUSSES 0x4000
24
25extern unsigned int __nongpreldata pci_probe; 17extern unsigned int __nongpreldata pci_probe;
26 18
27/* pci-frv.c */ 19/* pci-frv.c */
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
index f211839e2cae..f9c86c475bbd 100644
--- a/arch/frv/mb93090-mb00/pci-vdk.c
+++ b/arch/frv/mb93090-mb00/pci-vdk.c
@@ -294,8 +294,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
294 printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number); 294 printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number);
295#endif 295#endif
296 296
297 pci_read_bridge_bases(bus);
298
299 if (bus->number == 0) { 297 if (bus->number == 0) {
300 struct pci_dev *dev; 298 struct pci_dev *dev;
301 list_for_each_entry(dev, &bus->devices, bus_list) { 299 list_for_each_entry(dev, &bus->devices, bus_list) {
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 7cc3be9fa7c6..d89b6013c941 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -533,10 +533,9 @@ void pcibios_fixup_bus(struct pci_bus *b)
533{ 533{
534 struct pci_dev *dev; 534 struct pci_dev *dev;
535 535
536 if (b->self) { 536 if (b->self)
537 pci_read_bridge_bases(b);
538 pcibios_fixup_bridge_resources(b->self); 537 pcibios_fixup_bridge_resources(b->self);
539 } 538
540 list_for_each_entry(dev, &b->devices, bus_list) 539 list_for_each_entry(dev, &b->devices, bus_list)
541 pcibios_fixup_device_resources(dev); 540 pcibios_fixup_device_resources(dev);
542 platform_pci_fixup_bus(b); 541 platform_pci_fixup_bus(b);
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index ae838ed5fcf2..6b8b75266801 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -863,14 +863,7 @@ void pcibios_setup_bus_devices(struct pci_bus *bus)
863 863
864void pcibios_fixup_bus(struct pci_bus *bus) 864void pcibios_fixup_bus(struct pci_bus *bus)
865{ 865{
866 /* When called from the generic PCI probe, read PCI<->PCI bridge 866 /* Fixup the bus */
867 * bases. This is -not- called when generating the PCI tree from
868 * the OF device-tree.
869 */
870 if (bus->self != NULL)
871 pci_read_bridge_bases(bus);
872
873 /* Now fixup the bus bus */
874 pcibios_setup_bus_self(bus); 867 pcibios_setup_bus_self(bus);
875 868
876 /* Now fixup devices on that bus */ 869 /* Now fixup devices on that bus */
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index b8a0bf5766f2..c6996cf67a5c 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -311,12 +311,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
311 311
312void pcibios_fixup_bus(struct pci_bus *bus) 312void pcibios_fixup_bus(struct pci_bus *bus)
313{ 313{
314 struct pci_dev *dev = bus->self;
315
316 if (pci_has_flag(PCI_PROBE_ONLY) && dev &&
317 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
318 pci_read_bridge_bases(bus);
319 }
320} 314}
321 315
322EXPORT_SYMBOL(PCIBIOS_MIN_IO); 316EXPORT_SYMBOL(PCIBIOS_MIN_IO);
diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.c b/arch/mn10300/unit-asb2305/pci-asb2305.c
index b5b036f64275..b7ab8378964c 100644
--- a/arch/mn10300/unit-asb2305/pci-asb2305.c
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.c
@@ -183,18 +183,16 @@ static int __init pcibios_assign_resources(void)
183 struct pci_dev *dev = NULL; 183 struct pci_dev *dev = NULL;
184 struct resource *r; 184 struct resource *r;
185 185
186 if (!(pci_probe & PCI_ASSIGN_ROMS)) { 186 /* Try to use BIOS settings for ROMs, otherwise let
187 /* Try to use BIOS settings for ROMs, otherwise let 187 pci_assign_unassigned_resources() allocate the new
188 pci_assign_unassigned_resources() allocate the new 188 addresses. */
189 addresses. */ 189 for_each_pci_dev(dev) {
190 for_each_pci_dev(dev) { 190 r = &dev->resource[PCI_ROM_RESOURCE];
191 r = &dev->resource[PCI_ROM_RESOURCE]; 191 if (!r->flags || !r->start)
192 if (!r->flags || !r->start) 192 continue;
193 continue; 193 if (pci_claim_resource(dev, PCI_ROM_RESOURCE) < 0) {
194 if (pci_claim_resource(dev, PCI_ROM_RESOURCE) < 0) { 194 r->end -= r->start;
195 r->end -= r->start; 195 r->start = 0;
196 r->start = 0;
197 }
198 } 196 }
199 } 197 }
200 198
diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.h b/arch/mn10300/unit-asb2305/pci-asb2305.h
index 9e17aca5a2a1..96c484b12226 100644
--- a/arch/mn10300/unit-asb2305/pci-asb2305.h
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.h
@@ -20,13 +20,6 @@
20#define DBG(x...) 20#define DBG(x...)
21#endif 21#endif
22 22
23#define PCI_PROBE_BIOS 1
24#define PCI_PROBE_CONF1 2
25#define PCI_PROBE_CONF2 4
26#define PCI_NO_CHECKS 0x400
27#define PCI_ASSIGN_ROMS 0x1000
28#define PCI_BIOS_IRQ_SCAN 0x2000
29
30extern unsigned int pci_probe; 23extern unsigned int pci_probe;
31 24
32/* pci-asb2305.c */ 25/* pci-asb2305.c */
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c
index 3dfe2d31c67b..deaa893efba5 100644
--- a/arch/mn10300/unit-asb2305/pci.c
+++ b/arch/mn10300/unit-asb2305/pci.c
@@ -324,7 +324,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
324 struct pci_dev *dev; 324 struct pci_dev *dev;
325 325
326 if (bus->self) { 326 if (bus->self) {
327 pci_read_bridge_bases(bus);
328 pcibios_fixup_bridge_resources(bus->self); 327 pcibios_fixup_bridge_resources(bus->self);
329 } 328 }
330 329
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index b9de34d44fcb..02c1d5dcee4d 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1044,13 +1044,7 @@ void pcibios_set_master(struct pci_dev *dev)
1044 1044
1045void pcibios_fixup_bus(struct pci_bus *bus) 1045void pcibios_fixup_bus(struct pci_bus *bus)
1046{ 1046{
1047 /* When called from the generic PCI probe, read PCI<->PCI bridge 1047 /* Fixup the bus */
1048 * bases. This is -not- called when generating the PCI tree from
1049 * the OF device-tree.
1050 */
1051 pci_read_bridge_bases(bus);
1052
1053 /* Now fixup the bus bus */
1054 pcibios_setup_bus_self(bus); 1048 pcibios_setup_bus_self(bus);
1055 1049
1056 /* Now fixup devices on that bus */ 1050 /* Now fixup devices on that bus */
diff --git a/arch/sh/drivers/pci/pci-sh4.h b/arch/sh/drivers/pci/pci-sh4.h
index cbf763b3015e..0288efc17ff3 100644
--- a/arch/sh/drivers/pci/pci-sh4.h
+++ b/arch/sh/drivers/pci/pci-sh4.h
@@ -11,14 +11,6 @@
11 11
12#include <asm/io.h> 12#include <asm/io.h>
13 13
14/* startup values */
15#define PCI_PROBE_BIOS 1
16#define PCI_PROBE_CONF1 2
17#define PCI_PROBE_CONF2 4
18#define PCI_NO_CHECKS 0x400
19#define PCI_ASSIGN_ROMS 0x1000
20#define PCI_BIOS_IRQ_SCAN 0x2000
21
22#define SH4_PCICR 0x100 /* PCI Control Register */ 14#define SH4_PCICR 0x100 /* PCI Control Register */
23 #define SH4_PCICR_PREFIX 0xA5000000 /* CR prefix for write */ 15 #define SH4_PCICR_PREFIX 0xA5000000 /* CR prefix for write */
24 #define SH4_PCICR_FTO 0x00000400 /* TRDY/IRDY Enable */ 16 #define SH4_PCICR_FTO 0x00000400 /* TRDY/IRDY Enable */
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index 164e3f8d3c3d..fa1195dae425 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -93,8 +93,6 @@ extern raw_spinlock_t pci_config_lock;
93extern int (*pcibios_enable_irq)(struct pci_dev *dev); 93extern int (*pcibios_enable_irq)(struct pci_dev *dev);
94extern void (*pcibios_disable_irq)(struct pci_dev *dev); 94extern void (*pcibios_disable_irq)(struct pci_dev *dev);
95 95
96extern bool mp_should_keep_irq(struct device *dev);
97
98struct pci_raw_ops { 96struct pci_raw_ops {
99 int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, 97 int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn,
100 int reg, int len, u32 *val); 98 int reg, int len, u32 *val);
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 8fd6f44aee83..09d3afc0a181 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -166,7 +166,6 @@ void pcibios_fixup_bus(struct pci_bus *b)
166{ 166{
167 struct pci_dev *dev; 167 struct pci_dev *dev;
168 168
169 pci_read_bridge_bases(b);
170 list_for_each_entry(dev, &b->devices, bus_list) 169 list_for_each_entry(dev, &b->devices, bus_list)
171 pcibios_fixup_device_resources(dev); 170 pcibios_fixup_device_resources(dev);
172} 171}
@@ -673,24 +672,22 @@ int pcibios_add_device(struct pci_dev *dev)
673 return 0; 672 return 0;
674} 673}
675 674
676int pcibios_enable_device(struct pci_dev *dev, int mask) 675int pcibios_alloc_irq(struct pci_dev *dev)
677{ 676{
678 int err; 677 return pcibios_enable_irq(dev);
679
680 if ((err = pci_enable_resources(dev, mask)) < 0)
681 return err;
682
683 if (!pci_dev_msi_enabled(dev))
684 return pcibios_enable_irq(dev);
685 return 0;
686} 678}
687 679
688void pcibios_disable_device (struct pci_dev *dev) 680void pcibios_free_irq(struct pci_dev *dev)
689{ 681{
690 if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq) 682 if (pcibios_disable_irq)
691 pcibios_disable_irq(dev); 683 pcibios_disable_irq(dev);
692} 684}
693 685
686int pcibios_enable_device(struct pci_dev *dev, int mask)
687{
688 return pci_enable_resources(dev, mask);
689}
690
694int pci_ext_cfg_avail(void) 691int pci_ext_cfg_avail(void)
695{ 692{
696 if (raw_pci_ext_ops) 693 if (raw_pci_ext_ops)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 9a2b7101ae8a..e58565556703 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -62,19 +62,6 @@ static void pci_fixup_umc_ide(struct pci_dev *d)
62} 62}
63DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide); 63DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide);
64 64
65static void pci_fixup_ncr53c810(struct pci_dev *d)
66{
67 /*
68 * NCR 53C810 returns class code 0 (at least on some systems).
69 * Fix class to be PCI_CLASS_STORAGE_SCSI
70 */
71 if (!d->class) {
72 dev_warn(&d->dev, "Fixing NCR 53C810 class code\n");
73 d->class = PCI_CLASS_STORAGE_SCSI << 8;
74 }
75}
76DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810);
77
78static void pci_fixup_latency(struct pci_dev *d) 65static void pci_fixup_latency(struct pci_dev *d)
79{ 66{
80 /* 67 /*
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
index 27062303c881..22aaefb4f1ca 100644
--- a/arch/x86/pci/intel_mid_pci.c
+++ b/arch/x86/pci/intel_mid_pci.c
@@ -211,7 +211,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
211 struct irq_alloc_info info; 211 struct irq_alloc_info info;
212 int polarity; 212 int polarity;
213 213
214 if (dev->irq_managed && dev->irq > 0) 214 if (pci_has_managed_irq(dev))
215 return 0; 215 return 0;
216 216
217 if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER) 217 if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER)
@@ -234,10 +234,13 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
234 234
235static void intel_mid_pci_irq_disable(struct pci_dev *dev) 235static void intel_mid_pci_irq_disable(struct pci_dev *dev)
236{ 236{
237 if (!mp_should_keep_irq(&dev->dev) && dev->irq_managed && 237 if (pci_has_managed_irq(dev)) {
238 dev->irq > 0) {
239 mp_unmap_irq(dev->irq); 238 mp_unmap_irq(dev->irq);
240 dev->irq_managed = 0; 239 dev->irq_managed = 0;
240 /*
241 * Don't reset dev->irq here, otherwise
242 * intel_mid_pci_irq_enable() will fail on next call.
243 */
241 } 244 }
242} 245}
243 246
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index 9bd115484745..32e70343e6fd 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -1202,7 +1202,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
1202 struct pci_dev *temp_dev; 1202 struct pci_dev *temp_dev;
1203 int irq; 1203 int irq;
1204 1204
1205 if (dev->irq_managed && dev->irq > 0) 1205 if (pci_has_managed_irq(dev))
1206 return 0; 1206 return 0;
1207 1207
1208 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, 1208 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number,
@@ -1230,8 +1230,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
1230 } 1230 }
1231 dev = temp_dev; 1231 dev = temp_dev;
1232 if (irq >= 0) { 1232 if (irq >= 0) {
1233 dev->irq_managed = 1; 1233 pci_set_managed_irq(dev, irq);
1234 dev->irq = irq;
1235 dev_info(&dev->dev, "PCI->APIC IRQ transform: " 1234 dev_info(&dev->dev, "PCI->APIC IRQ transform: "
1236 "INT %c -> IRQ %d\n", 'A' + pin - 1, irq); 1235 "INT %c -> IRQ %d\n", 'A' + pin - 1, irq);
1237 return 0; 1236 return 0;
@@ -1257,24 +1256,10 @@ static int pirq_enable_irq(struct pci_dev *dev)
1257 return 0; 1256 return 0;
1258} 1257}
1259 1258
1260bool mp_should_keep_irq(struct device *dev)
1261{
1262 if (dev->power.is_prepared)
1263 return true;
1264#ifdef CONFIG_PM
1265 if (dev->power.runtime_status == RPM_SUSPENDING)
1266 return true;
1267#endif
1268
1269 return false;
1270}
1271
1272static void pirq_disable_irq(struct pci_dev *dev) 1259static void pirq_disable_irq(struct pci_dev *dev)
1273{ 1260{
1274 if (io_apic_assign_pci_irqs && !mp_should_keep_irq(&dev->dev) && 1261 if (io_apic_assign_pci_irqs && pci_has_managed_irq(dev)) {
1275 dev->irq_managed && dev->irq) {
1276 mp_unmap_irq(dev->irq); 1262 mp_unmap_irq(dev->irq);
1277 dev->irq = 0; 1263 pci_reset_managed_irq(dev);
1278 dev->irq_managed = 0;
1279 } 1264 }
1280} 1265}
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index b848cc3dc913..d27b4dcf221f 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -210,10 +210,6 @@ subsys_initcall(pcibios_init);
210 210
211void pcibios_fixup_bus(struct pci_bus *bus) 211void pcibios_fixup_bus(struct pci_bus *bus)
212{ 212{
213 if (bus->parent) {
214 /* This is a subordinate bridge */
215 pci_read_bridge_bases(bus);
216 }
217} 213}
218 214
219void pcibios_set_master(struct pci_dev *dev) 215void pcibios_set_master(struct pci_dev *dev)