diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-10 06:32:34 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-05-13 12:12:16 -0400 |
commit | 1bc39ac5dab265b76ce6e20d6c85f900539fd190 (patch) | |
tree | 03cd4a54b1a44d7f2b346536e6be6fc9e8b9d7cd /arch/arm/mach-versatile | |
parent | b28626da344ea3d9f9c518a6c082db9306f534ff (diff) |
ARM: PCI: versatile: fix PCI interrupt setup
This is at odds with the documentation in the file; it says pin 1 on
slots 24,25,26,27 map to IRQs 27,28,29,30, but the function will always
be entered with slot=0 due to the lack of swizzle function. Fix this
function to behave as the comments say, and use the standard PCI
swizzle.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r-- | arch/arm/mach-versatile/pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index d2268be8c34c..24dd4b1490bd 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -339,15 +339,13 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
339 | * 26 1 29 | 339 | * 26 1 29 |
340 | * 27 1 30 | 340 | * 27 1 30 |
341 | */ | 341 | */ |
342 | irq = 27 + ((slot + pin - 1) & 3); | 342 | irq = 27 + ((slot - 24 + pin - 1) & 3); |
343 | |||
344 | printk("PCI map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); | ||
345 | 343 | ||
346 | return irq; | 344 | return irq; |
347 | } | 345 | } |
348 | 346 | ||
349 | static struct hw_pci versatile_pci __initdata = { | 347 | static struct hw_pci versatile_pci __initdata = { |
350 | .swizzle = NULL, | 348 | .swizzle = pci_std_swizzle, |
351 | .map_irq = versatile_map_irq, | 349 | .map_irq = versatile_map_irq, |
352 | .nr_controllers = 1, | 350 | .nr_controllers = 1, |
353 | .setup = pci_versatile_setup, | 351 | .setup = pci_versatile_setup, |