diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-26 13:35:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-26 13:35:27 -0500 |
commit | 68c6b859846bd078b37c6ca5f3882032f129e72d (patch) | |
tree | e243605957f1cab3532d57d86ea87355c10b6385 /arch/powerpc | |
parent | a4a47bc03fe520e95e0c4212bf97c86545fb14f9 (diff) | |
parent | bb8d41330ce27edb91adb6922d3f8e1a8923f727 (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: (48 commits)
x86/PCI: Prevent mmconfig memory corruption
ACPI: Use GPE reference counting to support shared GPEs
x86/PCI: use host bridge _CRS info by default on 2008 and newer machines
PCI: augment bus resource table with a list
PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
PCI: read bridge windows before filling in subtractive decode resources
PCI: split up pci_read_bridge_bases()
PCIe PME: use pci_pcie_cap()
PCI PM: Run-time callbacks for PCI bus type
PCIe PME: use pci_is_pcie()
PCI / ACPI / PM: Platform support for PCI PME wake-up
ACPI / ACPICA: Multiple system notify handlers per device
ACPI / PM: Add more run-time wake-up fields
ACPI: Use GPE reference counting to support shared GPEs
PCI PM: Make it possible to force using INTx for PCIe PME signaling
PCI PM: PCIe PME root port service driver
PCI PM: Add function for checking PME status of devices
PCI: mark is_pcie obsolete
PCI: set PCI_PREF_RANGE_TYPE_64 in pci_bridge_check_ranges
PCI: pciehp: second try to get big range for pcie devices
...
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 24 | ||||
-rw-r--r-- | arch/powerpc/platforms/fsl_uli1575.c | 12 |
2 files changed, 16 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index cadbed679fbb..2597f9545d8a 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1047,10 +1047,8 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) | |||
1047 | 1047 | ||
1048 | struct pci_dev *dev = bus->self; | 1048 | struct pci_dev *dev = bus->self; |
1049 | 1049 | ||
1050 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { | 1050 | pci_bus_for_each_resource(bus, res, i) { |
1051 | if ((res = bus->resource[i]) == NULL) | 1051 | if (!res || !res->flags) |
1052 | continue; | ||
1053 | if (!res->flags) | ||
1054 | continue; | 1052 | continue; |
1055 | if (i >= 3 && bus->self->transparent) | 1053 | if (i >= 3 && bus->self->transparent) |
1056 | continue; | 1054 | continue; |
@@ -1181,21 +1179,20 @@ static int skip_isa_ioresource_align(struct pci_dev *dev) | |||
1181 | * but we want to try to avoid allocating at 0x2900-0x2bff | 1179 | * but we want to try to avoid allocating at 0x2900-0x2bff |
1182 | * which might have be mirrored at 0x0100-0x03ff.. | 1180 | * which might have be mirrored at 0x0100-0x03ff.. |
1183 | */ | 1181 | */ |
1184 | void pcibios_align_resource(void *data, struct resource *res, | 1182 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, |
1185 | resource_size_t size, resource_size_t align) | 1183 | resource_size_t size, resource_size_t align) |
1186 | { | 1184 | { |
1187 | struct pci_dev *dev = data; | 1185 | struct pci_dev *dev = data; |
1186 | resource_size_t start = res->start; | ||
1188 | 1187 | ||
1189 | if (res->flags & IORESOURCE_IO) { | 1188 | if (res->flags & IORESOURCE_IO) { |
1190 | resource_size_t start = res->start; | ||
1191 | |||
1192 | if (skip_isa_ioresource_align(dev)) | 1189 | if (skip_isa_ioresource_align(dev)) |
1193 | return; | 1190 | return start; |
1194 | if (start & 0x300) { | 1191 | if (start & 0x300) |
1195 | start = (start + 0x3ff) & ~0x3ff; | 1192 | start = (start + 0x3ff) & ~0x3ff; |
1196 | res->start = start; | ||
1197 | } | ||
1198 | } | 1193 | } |
1194 | |||
1195 | return start; | ||
1199 | } | 1196 | } |
1200 | EXPORT_SYMBOL(pcibios_align_resource); | 1197 | EXPORT_SYMBOL(pcibios_align_resource); |
1201 | 1198 | ||
@@ -1278,9 +1275,8 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
1278 | pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", | 1275 | pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", |
1279 | pci_domain_nr(bus), bus->number); | 1276 | pci_domain_nr(bus), bus->number); |
1280 | 1277 | ||
1281 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { | 1278 | pci_bus_for_each_resource(bus, res, i) { |
1282 | if ((res = bus->resource[i]) == NULL || !res->flags | 1279 | if (!res || !res->flags || res->start > res->end || res->parent) |
1283 | || res->start > res->end || res->parent) | ||
1284 | continue; | 1280 | continue; |
1285 | if (bus->parent == NULL) | 1281 | if (bus->parent == NULL) |
1286 | pr = (res->flags & IORESOURCE_IO) ? | 1282 | pr = (res->flags & IORESOURCE_IO) ? |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index fd23a1d4b39d..8b0c2082a783 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
@@ -222,6 +222,7 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev) | |||
222 | int i; | 222 | int i; |
223 | u8 *dummy; | 223 | u8 *dummy; |
224 | struct pci_bus *bus = dev->bus; | 224 | struct pci_bus *bus = dev->bus; |
225 | struct resource *res; | ||
225 | resource_size_t end = 0; | 226 | resource_size_t end = 0; |
226 | 227 | ||
227 | for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) { | 228 | for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) { |
@@ -230,13 +231,12 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev) | |||
230 | end = pci_resource_end(dev, i); | 231 | end = pci_resource_end(dev, i); |
231 | } | 232 | } |
232 | 233 | ||
233 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | 234 | pci_bus_for_each_resource(bus, res, i) { |
234 | if ((bus->resource[i]) && | 235 | if (res && res->flags & IORESOURCE_MEM) { |
235 | (bus->resource[i]->flags & IORESOURCE_MEM)) { | 236 | if (res->end == end) |
236 | if (bus->resource[i]->end == end) | 237 | dummy = ioremap(res->start, 0x4); |
237 | dummy = ioremap(bus->resource[i]->start, 0x4); | ||
238 | else | 238 | else |
239 | dummy = ioremap(bus->resource[i]->end - 3, 0x4); | 239 | dummy = ioremap(res->end - 3, 0x4); |
240 | if (dummy) { | 240 | if (dummy) { |
241 | in_8(dummy); | 241 | in_8(dummy); |
242 | iounmap(dummy); | 242 | iounmap(dummy); |