aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-footbridge/cats-pci.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-08-08 16:22:35 -0400
committerBen Dooks <ben-linux@fluff.org>2008-08-09 08:51:53 -0400
commite38d523fd0932a5d4ef2865360d8828efcf05392 (patch)
tree1caacf42bf7cf09104f88fa95a128c2bc26764e4 /arch/arm/mach-footbridge/cats-pci.c
parent29210475945f13c61a7994b54ccf37692a075aeb (diff)
[ARM] CATS: Do not try and map bad PCI IRQ numbers
The cats_map_irq() function in the Simtec CATS support code is mapping IRQ 255 (invalid IRQ) into what is a supposedly valid interrupt numner which can cause problems with other devices then seeing an interrupt they cannot claim. If the IRQ number if >= 255, then return -1 as this is not something we can map. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-footbridge/cats-pci.c')
-rw-r--r--arch/arm/mach-footbridge/cats-pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c
index 35eb232a649a..ae3e1c8c7583 100644
--- a/arch/arm/mach-footbridge/cats-pci.c
+++ b/arch/arm/mach-footbridge/cats-pci.c
@@ -18,6 +18,9 @@ static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
18 18
19static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 19static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
20{ 20{
21 if (dev->irq >= 255)
22 return -1; /* not a valid interrupt. */
23
21 if (dev->irq >= 128) 24 if (dev->irq >= 128)
22 return dev->irq & 0x1f; 25 return dev->irq & 0x1f;
23 26