diff options
Diffstat (limited to 'arch/arm/kernel/bios32.c')
-rw-r--r-- | arch/arm/kernel/bios32.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index e17dd2591b26..d22e35168e88 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -374,16 +374,29 @@ EXPORT_SYMBOL(pcibios_fixup_bus); | |||
374 | #endif | 374 | #endif |
375 | 375 | ||
376 | /* | 376 | /* |
377 | * Swizzle the device pin each time we cross a bridge. | 377 | * Swizzle the device pin each time we cross a bridge. If a platform does |
378 | * This might update pin and returns the slot number. | 378 | * not provide a swizzle function, we perform the standard PCI swizzling. |
379 | * | ||
380 | * The default swizzling walks up the bus tree one level at a time, applying | ||
381 | * the standard swizzle function at each step, stopping when it finds the PCI | ||
382 | * root bus. This will return the slot number of the bridge device on the | ||
383 | * root bus and the interrupt pin on that device which should correspond | ||
384 | * with the downstream device interrupt. | ||
385 | * | ||
386 | * Platforms may override this, in which case the slot and pin returned | ||
387 | * depend entirely on the platform code. However, please note that the | ||
388 | * PCI standard swizzle is implemented on plug-in cards and Cardbus based | ||
389 | * PCI extenders, so it can not be ignored. | ||
379 | */ | 390 | */ |
380 | static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) | 391 | static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) |
381 | { | 392 | { |
382 | struct pci_sys_data *sys = dev->sysdata; | 393 | struct pci_sys_data *sys = dev->sysdata; |
383 | int slot = 0, oldpin = *pin; | 394 | int slot, oldpin = *pin; |
384 | 395 | ||
385 | if (sys->swizzle) | 396 | if (sys->swizzle) |
386 | slot = sys->swizzle(dev, pin); | 397 | slot = sys->swizzle(dev, pin); |
398 | else | ||
399 | slot = pci_common_swizzle(dev, pin); | ||
387 | 400 | ||
388 | if (debug_pci) | 401 | if (debug_pci) |
389 | printk("PCI: %s swizzling pin %d => pin %d slot %d\n", | 402 | printk("PCI: %s swizzling pin %d => pin %d slot %d\n", |