diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 18:41:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 18:41:01 -0500 |
commit | b424e8d3b438e841cd1700f6433a100a5d611e4a (patch) | |
tree | 545638d0b925de4c7f740286760767cca86cb91e /arch/arm | |
parent | 7c7758f99d39d529a64d4f60d22129bbf2f16d74 (diff) | |
parent | f6dc1e5e3d4b523e1616b43beddb04e4fb1d376a (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: (98 commits)
PCI PM: Put PM callbacks in the order of execution
PCI PM: Run default PM callbacks for all devices using new framework
PCI PM: Register power state of devices during initialization
PCI PM: Call pci_fixup_device from legacy routines
PCI PM: Rearrange code in pci-driver.c
PCI PM: Avoid touching devices behind bridges in unknown state
PCI PM: Move pci_has_legacy_pm_support
PCI PM: Power-manage devices without drivers during suspend-resume
PCI PM: Add suspend counterpart of pci_reenable_device
PCI PM: Fix poweroff and restore callbacks
PCI: Use msleep instead of cpu_relax during ASPM link retraining
PCI: PCIe portdrv: Add kerneldoc comments to remining core funtions
PCI: PCIe portdrv: Rearrange code so that related things are together
PCI: PCIe portdrv: Fix suspend and resume of PCI Express port services
PCI: PCIe portdrv: Add kerneldoc comments to some core functions
x86/PCI: Do not use interrupt links for devices using MSI-X
net: sfc: Use pci_clear_master() to disable bus mastering
PCI: Add pci_clear_master() as opposite of pci_set_master()
PCI hotplug: remove redundant test in cpq hotplug
PCI: pciehp: cleanup register and field definitions
...
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/mach/pci.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/bios32.c | 27 | ||||
-rw-r--r-- | arch/arm/mach-integrator/pci.c | 11 |
3 files changed, 3 insertions, 37 deletions
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 32da1ae17e06..a38bdc7afa34 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -42,7 +42,7 @@ struct pci_sys_data { | |||
42 | /* | 42 | /* |
43 | * This is the standard PCI-PCI bridge swizzling algorithm. | 43 | * This is the standard PCI-PCI bridge swizzling algorithm. |
44 | */ | 44 | */ |
45 | u8 pci_std_swizzle(struct pci_dev *dev, u8 *pinp); | 45 | #define pci_std_swizzle pci_common_swizzle |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Call this with your hw_pci struct to initialise the PCI system. | 48 | * Call this with your hw_pci struct to initialise the PCI system. |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 17a59b6e521f..809681900ec8 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -480,33 +480,6 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); | |||
480 | #endif | 480 | #endif |
481 | 481 | ||
482 | /* | 482 | /* |
483 | * This is the standard PCI-PCI bridge swizzling algorithm: | ||
484 | * | ||
485 | * Dev: 0 1 2 3 | ||
486 | * A A B C D | ||
487 | * B B C D A | ||
488 | * C C D A B | ||
489 | * D D A B C | ||
490 | * ^^^^^^^^^^ irq pin on bridge | ||
491 | */ | ||
492 | u8 __devinit pci_std_swizzle(struct pci_dev *dev, u8 *pinp) | ||
493 | { | ||
494 | int pin = *pinp - 1; | ||
495 | |||
496 | while (dev->bus->self) { | ||
497 | pin = (pin + PCI_SLOT(dev->devfn)) & 3; | ||
498 | /* | ||
499 | * move up the chain of bridges, | ||
500 | * swizzling as we go. | ||
501 | */ | ||
502 | dev = dev->bus->self; | ||
503 | } | ||
504 | *pinp = pin + 1; | ||
505 | |||
506 | return PCI_SLOT(dev->devfn); | ||
507 | } | ||
508 | |||
509 | /* | ||
510 | * Swizzle the device pin each time we cross a bridge. | 483 | * Swizzle the device pin each time we cross a bridge. |
511 | * This might update pin and returns the slot number. | 484 | * This might update pin and returns the slot number. |
512 | */ | 485 | */ |
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index af7d3ff013ec..2fdb95433f0a 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c | |||
@@ -63,13 +63,7 @@ | |||
63 | * | 63 | * |
64 | * Where A = pin 1, B = pin 2 and so on and pin=0 = default = A. | 64 | * Where A = pin 1, B = pin 2 and so on and pin=0 = default = A. |
65 | * Thus, each swizzle is ((pin-1) + (device#-4)) % 4 | 65 | * Thus, each swizzle is ((pin-1) + (device#-4)) % 4 |
66 | * | ||
67 | * The following code swizzles for exactly one bridge. | ||
68 | */ | 66 | */ |
69 | static inline int bridge_swizzle(int pin, unsigned int slot) | ||
70 | { | ||
71 | return (pin + slot) & 3; | ||
72 | } | ||
73 | 67 | ||
74 | /* | 68 | /* |
75 | * This routine handles multiple bridges. | 69 | * This routine handles multiple bridges. |
@@ -81,15 +75,14 @@ static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp) | |||
81 | if (pin == 0) | 75 | if (pin == 0) |
82 | pin = 1; | 76 | pin = 1; |
83 | 77 | ||
84 | pin -= 1; | ||
85 | while (dev->bus->self) { | 78 | while (dev->bus->self) { |
86 | pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); | 79 | pin = pci_swizzle_interrupt_pin(dev, pin); |
87 | /* | 80 | /* |
88 | * move up the chain of bridges, swizzling as we go. | 81 | * move up the chain of bridges, swizzling as we go. |
89 | */ | 82 | */ |
90 | dev = dev->bus->self; | 83 | dev = dev->bus->self; |
91 | } | 84 | } |
92 | *pinp = pin + 1; | 85 | *pinp = pin; |
93 | 86 | ||
94 | return PCI_SLOT(dev->devfn); | 87 | return PCI_SLOT(dev->devfn); |
95 | } | 88 | } |