"Bradley D. LaRonde" wrote:
> I considered that, but since only this small chuck of run-once surrogate
> bios autoconfig code needs to know, I figured better keep it separate.
I would vote to put it inside the hose structure:
. It makes a workaround look like a real fix. :-)
. In other implementations of pci_auto, hose is the private sys data of a pci
dev. Having a bus number inside is very useful (e.g., pci_ops can tell whether
it is type0 of type1 configuration based on the bus number rather than a shaky
NULL parent bus pointer). In the future, all pci_auto should be combined into
the pci driver. So that is probably the right direction to go.
I think hose may evolve to be the data structure that represents the topology
of PCI buses. It should have more uses in the future (e.g., the standard IRQ
routing across PCI-PCI bridges).
> ----- Original Message -----
> From: "Jun Sun" <firstname.lastname@example.org>
> To: "Bradley D. LaRonde" <email@example.com>
> Cc: <firstname.lastname@example.org>; <email@example.com>
> Sent: Monday, October 29, 2001 2:24 PM
> Subject: Re: PATCH: pci_auto bridge support
> > Brad,
> > Have you considered embedding "topbus" argument into hose structure? That
> > sounds like potentially better solution.
> > "Bradley D. LaRonde" wrote:
> > >
> > > 2001-10-26 Bradley D. LaRonde <firstname.lastname@example.org>
> > >
> > > * PCI bridge support. See change log entry below.
> > >
> > > --- arch/mips/kernel/pci_auto.c 2001/08/18 06:21:53 1.1
> > > +++ arch/mips/kernel/pci_auto.c 2001/10/27 01:01:21
> > > @@ -4,6 +4,7 @@
> > > * Author: Matt Porter <email@example.com>
> > > *
> > > * Copyright 2000, 2001 MontaVista Software Inc.
> > > + * Copyright 2001 Bradley D. LaRonde <firstname.lastname@example.org>
> > > *
> > > * This program is free software; you can redistribute it and/or
> modify it
> > > * under the terms of the GNU General Public License as published by
> > > @@ -19,6 +20,15 @@
> > > * . change most int to u32.
> > > *
> > > * Further modified to include it as mips generic code,
> > > + *
> > > + * 2001-10-26 Bradley D. LaRonde <email@example.com>
> > > + * - Add a top_bus argument to the "early config" functions so that
> > > + * they can set a fake parent bus pointer to convince the underlying
> > > + * pci ops to use type 1 configuration for sub busses.
> > > + * - Set bridge base and limit registers correctly.
> > > + * - Align io and memory base properly before and after bridge setup.
> > > + * - Don't fall through to pci_setup_bars for bridge.
> > > + * - Reformat the debug output to look more like lspci's output.
> > > */