diff options
Diffstat (limited to 'arch/sh/drivers/pci/fixups-sh03.c')
-rw-r--r-- | arch/sh/drivers/pci/fixups-sh03.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/arch/sh/drivers/pci/fixups-sh03.c b/arch/sh/drivers/pci/fixups-sh03.c index 57ac26c2171f..2e8a18b7ee53 100644 --- a/arch/sh/drivers/pci/fixups-sh03.c +++ b/arch/sh/drivers/pci/fixups-sh03.c | |||
@@ -3,11 +3,7 @@ | |||
3 | #include <linux/types.h> | 3 | #include <linux/types.h> |
4 | #include <linux/pci.h> | 4 | #include <linux/pci.h> |
5 | 5 | ||
6 | /* | 6 | int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) |
7 | * IRQ functions | ||
8 | */ | ||
9 | |||
10 | int __init pcibios_map_platform_irq(u8 slot, u8 pin, struct pci_dev *dev) | ||
11 | { | 7 | { |
12 | int irq; | 8 | int irq; |
13 | 9 | ||
@@ -17,8 +13,9 @@ int __init pcibios_map_platform_irq(u8 slot, u8 pin, struct pci_dev *dev) | |||
17 | case 8: return 5; /* eth1 */ | 13 | case 8: return 5; /* eth1 */ |
18 | case 6: return 2; /* PCI bridge */ | 14 | case 6: return 2; /* PCI bridge */ |
19 | default: | 15 | default: |
20 | printk("PCI: Bad IRQ mapping request for slot %d\n", slot); | 16 | printk(KERN_ERR "PCI: Bad IRQ mapping request " |
21 | return 2; | 17 | "for slot %d\n", slot); |
18 | return 2; | ||
22 | } | 19 | } |
23 | } else { | 20 | } else { |
24 | switch (pin) { | 21 | switch (pin) { |
@@ -32,30 +29,3 @@ int __init pcibios_map_platform_irq(u8 slot, u8 pin, struct pci_dev *dev) | |||
32 | } | 29 | } |
33 | return irq; | 30 | return irq; |
34 | } | 31 | } |
35 | |||
36 | static u8 __init sh03_no_swizzle(struct pci_dev *dev, u8 *pin) | ||
37 | { | ||
38 | /* no swizzling */ | ||
39 | return PCI_SLOT(dev->devfn); | ||
40 | } | ||
41 | |||
42 | static int sh03_pci_lookup_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
43 | { | ||
44 | int irq = -1; | ||
45 | |||
46 | /* now lookup the actual IRQ on a platform specific basis (pci-'platform'.c) */ | ||
47 | irq = pcibios_map_platform_irq(slot, pin, dev); | ||
48 | if( irq < 0 ) { | ||
49 | pr_debug("PCI: Error mapping IRQ on device %s\n", pci_name(dev)); | ||
50 | return irq; | ||
51 | } | ||
52 | |||
53 | pr_debug("Setting IRQ for slot %s to %d\n", pci_name(dev), irq); | ||
54 | |||
55 | return irq; | ||
56 | } | ||
57 | |||
58 | void __init pcibios_fixup_irqs(void) | ||
59 | { | ||
60 | pci_fixup_irqs(sh03_no_swizzle, sh03_pci_lookup_irq); | ||
61 | } | ||