Re: [patch 2.5] 2-pass PCI probing, generic part

Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Fri, 10 Jan 2003 01:09:17 +0300


On Thu, Jan 09, 2003 at 06:52:15PM +0100, Benjamin Herrenschmidt wrote:
> Yes, On these, I'll skip the pci<->pci bridge in cases there is one on
> the path too, this will add some nasty logic to the pmac pci code, but
> that's ok as long as that crap doesn't leak out of
> arch/ppc/platforms/pmac_*

I don't see why it would add any extra logic to your pci code. You only
need to implement simple pmac-specific "FIXUP_EARLY" routine for I/O ASIC.
Something like this:

static void __init fixup_io_asic(struct pci_dev *asic)
{
struct pci_dev *bridge;

/* Set up asic->resource[] (using firmware info?) */
...
asic->skip_probe = 1;
/* Also, don't probe parent bridge */
bridge = asic->bus->self;
if (bridge && (bridge->class >> 8) == PCI_CLASS_BRIDGE_PCI)
bridge->skip_probe = 1;
}

And you've done with it.
Note that in most cases PCI-PCI bridges can be safely excluded from
pci_read_bases() simply because they have neither regular BARs nor
ROM BAR (even though PCI spec allows that).

Ivan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/