Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9076
b: refs/heads/master
c: 997a51a
h: refs/heads/master
v: v3
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed Sep 19, 2005
1 parent bfb321e commit 89eec57
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 044a500e46742d39d22f1781cfb64ba93b463e39
refs/heads/master: 997a51ae373df6484cdd4a5fc61a9c9bec82cd68
41 changes: 23 additions & 18 deletions trunk/arch/alpha/kernel/sys_dp264.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,22 @@ clipper_init_irq(void)
* 10 64 bit PCI option slot 3 (not bus 0)
*/

static int __init
isa_irq_fixup(struct pci_dev *dev, int irq)
{
u8 irq8;

if (irq > 0)
return irq;

/* This interrupt is routed via ISA bridge, so we'll
just have to trust whatever value the console might
have assigned. */
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8);

return irq8 & 0xf;
}

static int __init
dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
Expand All @@ -407,25 +423,13 @@ dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0} /* IdSel 10 slot 3 */
};
const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5;

struct pci_controller *hose = dev->sysdata;
int irq = COMMON_TABLE_LOOKUP;

if (irq > 0) {
if (irq > 0)
irq += 16 * hose->index;
} else {
/* ??? The Contaq IDE controller on the ISA bridge uses
"legacy" interrupts 14 and 15. I don't know if anything
can wind up at the same slot+pin on hose1, so we'll
just have to trust whatever value the console might
have assigned. */

u8 irq8;
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8);
irq = irq8;
}

return irq;
return isa_irq_fixup(dev, irq);
}

static int __init
Expand Down Expand Up @@ -453,7 +457,8 @@ monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/
};
const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5;
return COMMON_TABLE_LOOKUP;

return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP);
}

static u8 __init
Expand Down Expand Up @@ -507,7 +512,8 @@ webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ 47, 47, 46, 45, 44}, /* IdSel 17 slot 3 */
};
const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5;
return COMMON_TABLE_LOOKUP;

return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP);
}

static int __init
Expand All @@ -524,14 +530,13 @@ clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ -1, -1, -1, -1, -1} /* IdSel 7 ISA Bridge */
};
const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5;

struct pci_controller *hose = dev->sysdata;
int irq = COMMON_TABLE_LOOKUP;

if (irq > 0)
irq += 16 * hose->index;

return irq;
return isa_irq_fixup(dev, irq);
}

static void __init
Expand Down

0 comments on commit 89eec57

Please sign in to comment.