Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110075
b: refs/heads/master
c: f4d15f1
h: refs/heads/master
i:
  110073: 2296b5a
  110071: 22a5196
v: v3
  • Loading branch information
Ralf Baechle committed Sep 27, 2008
1 parent 8b5bb5a commit 5588fa8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 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: 19506fc51852e859bb08ab5abbdb8fd02b7392f2
refs/heads/master: f4d15f1c877644a604f8c8c3d094c13f9f8bdcf2
40 changes: 31 additions & 9 deletions trunk/arch/mips/pci/pci-ip27.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,48 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
* on any one of the hubs connected to its xbow.
*/
int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
return 0;
}

/* Most MIPS systems have straight-forward swizzling needs. */
static inline u8 bridge_swizzle(u8 pin, u8 slot)
{
return (((pin - 1) + slot) % 4) + 1;
}

static inline struct pci_dev *bridge_root_dev(struct pci_dev *dev)
{
while (dev->bus->parent) {
/* Move up the chain of bridges. */
dev = dev->bus->self;
}

return dev;
}

/* Do platform specific device initialization at pci_enable_device() time */
int pcibios_plat_dev_init(struct pci_dev *dev)
{
struct bridge_controller *bc = BRIDGE_CONTROLLER(dev->bus);
int irq = bc->pci_int[slot];
struct pci_dev *rdev = bridge_root_dev(dev);
int slot = PCI_SLOT(rdev->devfn);
int irq;

irq = bc->pci_int[slot];
if (irq == -1) {
irq = bc->pci_int[slot] = request_bridge_irq(bc);
irq = request_bridge_irq(bc);
if (irq < 0)
panic("Can't allocate interrupt for PCI device %s\n",
pci_name(dev));
return irq;

bc->pci_int[slot] = irq;
}

irq_to_bridge[irq] = bc;
irq_to_slot[irq] = slot;

return irq;
}
dev->irq = irq;

/* Do platform specific device initialization at pci_enable_device() time */
int pcibios_plat_dev_init(struct pci_dev *dev)
{
return 0;
}

Expand Down

0 comments on commit 5588fa8

Please sign in to comment.