diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-16 20:25:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-16 20:25:46 -0400 |
commit | dc7c65db2845a8d17432d89252c4227a9a7cb15f (patch) | |
tree | 79030b0aaaafc04bc4303c21495134e744afc058 /arch/x86/pci/common.c | |
parent | 8a0ca91e1db5de5eb5b18cfa919d52ff8be375af (diff) | |
parent | 58b6e5538460be358fdf1286d9a2fbcfcc2cfaba (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits)
Revert "x86/PCI: ACPI based PCI gap calculation"
PCI: remove unnecessary volatile in PCIe hotplug struct controller
x86/PCI: ACPI based PCI gap calculation
PCI: include linux/pm_wakeup.h for device_set_wakeup_capable
PCI PM: Fix pci_prepare_to_sleep
x86/PCI: Fix PCI config space for domains > 0
Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n
PCI: Simplify PCI device PM code
PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep
PCI ACPI: Rework PCI handling of wake-up
ACPI: Introduce new device wakeup flag 'prepared'
ACPI: Introduce acpi_device_sleep_wake function
PCI: rework pci_set_power_state function to call platform first
PCI: Introduce platform_pci_power_manageable function
ACPI: Introduce acpi_bus_power_manageable function
PCI: make pci_name use dev_name
PCI: handle pci_name() being const
PCI: add stub for pci_set_consistent_dma_mask()
PCI: remove unused arch pcibios_update_resource() functions
PCI: fix pci_setup_device()'s sprinting into a const buffer
...
Fixed up conflicts in various files (arch/x86/kernel/setup_64.c,
arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c,
drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86
and ACPI updates manually.
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r-- | arch/x86/pci/common.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 20b9f59f95df..b67732bbb85a 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | | 20 | unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | |
21 | PCI_PROBE_MMCONF; | 21 | PCI_PROBE_MMCONF; |
22 | 22 | ||
23 | unsigned int pci_early_dump_regs; | ||
23 | static int pci_bf_sort; | 24 | static int pci_bf_sort; |
24 | int pci_routeirq; | 25 | int pci_routeirq; |
25 | int pcibios_last_bus = -1; | 26 | int pcibios_last_bus = -1; |
@@ -31,7 +32,7 @@ struct pci_raw_ops *raw_pci_ext_ops; | |||
31 | int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, | 32 | int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, |
32 | int reg, int len, u32 *val) | 33 | int reg, int len, u32 *val) |
33 | { | 34 | { |
34 | if (reg < 256 && raw_pci_ops) | 35 | if (domain == 0 && reg < 256 && raw_pci_ops) |
35 | return raw_pci_ops->read(domain, bus, devfn, reg, len, val); | 36 | return raw_pci_ops->read(domain, bus, devfn, reg, len, val); |
36 | if (raw_pci_ext_ops) | 37 | if (raw_pci_ext_ops) |
37 | return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val); | 38 | return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val); |
@@ -41,7 +42,7 @@ int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, | |||
41 | int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, | 42 | int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, |
42 | int reg, int len, u32 val) | 43 | int reg, int len, u32 val) |
43 | { | 44 | { |
44 | if (reg < 256 && raw_pci_ops) | 45 | if (domain == 0 && reg < 256 && raw_pci_ops) |
45 | return raw_pci_ops->write(domain, bus, devfn, reg, len, val); | 46 | return raw_pci_ops->write(domain, bus, devfn, reg, len, val); |
46 | if (raw_pci_ext_ops) | 47 | if (raw_pci_ext_ops) |
47 | return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val); | 48 | return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val); |
@@ -121,6 +122,21 @@ void __init dmi_check_skip_isa_align(void) | |||
121 | dmi_check_system(can_skip_pciprobe_dmi_table); | 122 | dmi_check_system(can_skip_pciprobe_dmi_table); |
122 | } | 123 | } |
123 | 124 | ||
125 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | ||
126 | { | ||
127 | struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; | ||
128 | |||
129 | if (pci_probe & PCI_NOASSIGN_ROMS) { | ||
130 | if (rom_r->parent) | ||
131 | return; | ||
132 | if (rom_r->start) { | ||
133 | /* we deal with BIOS assigned ROM later */ | ||
134 | return; | ||
135 | } | ||
136 | rom_r->start = rom_r->end = rom_r->flags = 0; | ||
137 | } | ||
138 | } | ||
139 | |||
124 | /* | 140 | /* |
125 | * Called after each bus is probed, but before its children | 141 | * Called after each bus is probed, but before its children |
126 | * are examined. | 142 | * are examined. |
@@ -128,7 +144,11 @@ void __init dmi_check_skip_isa_align(void) | |||
128 | 144 | ||
129 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 145 | void __devinit pcibios_fixup_bus(struct pci_bus *b) |
130 | { | 146 | { |
147 | struct pci_dev *dev; | ||
148 | |||
131 | pci_read_bridge_bases(b); | 149 | pci_read_bridge_bases(b); |
150 | list_for_each_entry(dev, &b->devices, bus_list) | ||
151 | pcibios_fixup_device_resources(dev); | ||
132 | } | 152 | } |
133 | 153 | ||
134 | /* | 154 | /* |
@@ -481,12 +501,18 @@ char * __devinit pcibios_setup(char *str) | |||
481 | else if (!strcmp(str, "rom")) { | 501 | else if (!strcmp(str, "rom")) { |
482 | pci_probe |= PCI_ASSIGN_ROMS; | 502 | pci_probe |= PCI_ASSIGN_ROMS; |
483 | return NULL; | 503 | return NULL; |
504 | } else if (!strcmp(str, "norom")) { | ||
505 | pci_probe |= PCI_NOASSIGN_ROMS; | ||
506 | return NULL; | ||
484 | } else if (!strcmp(str, "assign-busses")) { | 507 | } else if (!strcmp(str, "assign-busses")) { |
485 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; | 508 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; |
486 | return NULL; | 509 | return NULL; |
487 | } else if (!strcmp(str, "use_crs")) { | 510 | } else if (!strcmp(str, "use_crs")) { |
488 | pci_probe |= PCI_USE__CRS; | 511 | pci_probe |= PCI_USE__CRS; |
489 | return NULL; | 512 | return NULL; |
513 | } else if (!strcmp(str, "earlydump")) { | ||
514 | pci_early_dump_regs = 1; | ||
515 | return NULL; | ||
490 | } else if (!strcmp(str, "routeirq")) { | 516 | } else if (!strcmp(str, "routeirq")) { |
491 | pci_routeirq = 1; | 517 | pci_routeirq = 1; |
492 | return NULL; | 518 | return NULL; |