Commit 3e08601f authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes

PCI: alpha: use generic INTx swizzle from PCI core

Use the generic pci_common_swizzle() instead of arch-specific code.

Note that pci_common_swizzle() loops based on dev->bus->self, not
dev->bus->parent as the alpha common_swizzle() did.  I think they
are equivalent for this purpose.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 68feac87
...@@ -320,24 +320,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq) ...@@ -320,24 +320,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
} }
/* Most Alphas have straight-forward swizzling needs. */
u8 __init
common_swizzle(struct pci_dev *dev, u8 *pinp)
{
u8 pin = *pinp;
while (dev->bus->parent) {
pin = pci_swizzle_interrupt_pin(dev, pin);
/* Move up the chain of bridges. */
dev = dev->bus->self;
}
*pinp = pin;
/* The slot is the slot of the last bridge. */
return PCI_SLOT(dev->devfn);
}
void void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res) struct resource *res)
......
...@@ -107,7 +107,7 @@ struct pci_iommu_arena; ...@@ -107,7 +107,7 @@ struct pci_iommu_arena;
* Thus, each swizzle is ((pin-1) + (device#-4)) % 4 * Thus, each swizzle is ((pin-1) + (device#-4)) % 4
* *
* pci_swizzle_interrupt_pin() swizzles for exactly one bridge. The routine * pci_swizzle_interrupt_pin() swizzles for exactly one bridge. The routine
* common_swizzle below handles multiple bridges. But there are a * pci_common_swizzle() handles multiple bridges. But there are a
* couple boards that do strange things. * couple boards that do strange things.
*/ */
...@@ -179,7 +179,7 @@ extern int pci_probe_only; ...@@ -179,7 +179,7 @@ extern int pci_probe_only;
extern unsigned long alpha_agpgart_size; extern unsigned long alpha_agpgart_size;
extern void common_init_pci(void); extern void common_init_pci(void);
extern u8 common_swizzle(struct pci_dev *, u8 *); #define common_swizzle pci_common_swizzle
extern struct pci_controller *alloc_pci_controller(void); extern struct pci_controller *alloc_pci_controller(void);
extern struct resource *alloc_resource(void); extern struct resource *alloc_resource(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment