Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127367
b: refs/heads/master
c: f14d766
h: refs/heads/master
i:
  127365: 0c498ff
  127363: 0284a91
  127359: 3da4efa
v: v3
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Jan 7, 2009
1 parent 42c7bec commit 57ab6d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 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: 57c2cf71c12318b72ebaa5720d210476b6bac4d4
refs/heads/master: f14d766a1a438fdc69d04b876965d6b26b071f14
6 changes: 3 additions & 3 deletions trunk/arch/arm/kernel/bios32.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,17 +491,17 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
*/
u8 __devinit pci_std_swizzle(struct pci_dev *dev, u8 *pinp)
{
int pin = *pinp - 1;
int pin = *pinp;

while (dev->bus->self) {
pin = (pin + PCI_SLOT(dev->devfn)) & 3;
pin = pci_swizzle_interrupt_pin(dev, pin);
/*
* move up the chain of bridges,
* swizzling as we go.
*/
dev = dev->bus->self;
}
*pinp = pin + 1;
*pinp = pin;

return PCI_SLOT(dev->devfn);
}
Expand Down
11 changes: 2 additions & 9 deletions trunk/arch/arm/mach-integrator/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,7 @@
*
* Where A = pin 1, B = pin 2 and so on and pin=0 = default = A.
* Thus, each swizzle is ((pin-1) + (device#-4)) % 4
*
* The following code swizzles for exactly one bridge.
*/
static inline int bridge_swizzle(int pin, unsigned int slot)
{
return (pin + slot) & 3;
}

/*
* This routine handles multiple bridges.
Expand All @@ -81,15 +75,14 @@ static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp)
if (pin == 0)
pin = 1;

pin -= 1;
while (dev->bus->self) {
pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
pin = pci_swizzle_interrupt_pin(dev, pin);
/*
* move up the chain of bridges, swizzling as we go.
*/
dev = dev->bus->self;
}
*pinp = pin + 1;
*pinp = pin;

return PCI_SLOT(dev->devfn);
}
Expand Down

0 comments on commit 57ab6d9

Please sign in to comment.