mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
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>
This commit is contained in:
parent
b28626da34
commit
1bc39ac5da
@ -339,15 +339,13 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|||||||
* 26 1 29
|
* 26 1 29
|
||||||
* 27 1 30
|
* 27 1 30
|
||||||
*/
|
*/
|
||||||
irq = 27 + ((slot + pin - 1) & 3);
|
irq = 27 + ((slot - 24 + pin - 1) & 3);
|
||||||
|
|
||||||
printk("PCI map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq);
|
|
||||||
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hw_pci versatile_pci __initdata = {
|
static struct hw_pci versatile_pci __initdata = {
|
||||||
.swizzle = NULL,
|
.swizzle = pci_std_swizzle,
|
||||||
.map_irq = versatile_map_irq,
|
.map_irq = versatile_map_irq,
|
||||||
.nr_controllers = 1,
|
.nr_controllers = 1,
|
||||||
.setup = pci_versatile_setup,
|
.setup = pci_versatile_setup,
|
||||||
|
Loading…
Reference in New Issue
Block a user