aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers/pci/pci.c')
-rw-r--r--arch/sh/drivers/pci/pci.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index d3839e609aa..e36c7b87086 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -21,26 +21,6 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24static inline u8 bridge_swizzle(u8 pin, u8 slot)
25{
26 return (((pin - 1) + slot) % 4) + 1;
27}
28
29static u8 __init simple_swizzle(struct pci_dev *dev, u8 *pinp)
30{
31 u8 pin = *pinp;
32
33 while (dev->bus->parent) {
34 pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
35 /* Move up the chain of bridges. */
36 dev = dev->bus->self;
37 }
38 *pinp = pin;
39
40 /* The slot is the slot of the last bridge. */
41 return PCI_SLOT(dev->devfn);
42}
43
44static int __init pcibios_init(void) 24static int __init pcibios_init(void)
45{ 25{
46 struct pci_channel *p; 26 struct pci_channel *p;
@@ -61,7 +41,7 @@ static int __init pcibios_init(void)
61 busno = bus->subordinate + 1; 41 busno = bus->subordinate + 1;
62 } 42 }
63 43
64 pci_fixup_irqs(simple_swizzle, pcibios_map_platform_irq); 44 pci_fixup_irqs(pci_common_swizzle, pcibios_map_platform_irq);
65 45
66 return 0; 46 return 0;
67} 47}