Home | History | Annotate | Download | only in pci
History log of /src/sys/arch/i386/pci/gscpcib.c
RevisionDateAuthorComments
 1.20  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.19  24-Apr-2021  thorpej branches: 1.19.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.18  13-Nov-2011  mbalmer branches: 1.18.66;
Pickup NGPIO.
 1.17  04-Sep-2011  sborrill branches: 1.17.2;
Don't attach GPIO framework if NGPIO = 0
 1.16  01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.15  08-Jan-2010  dyoung Move all copies of ifattr_match() to sys/kern/subr_autoconf.c.
 1.14  18-Aug-2009  dyoung Fix the gscpcib(4) detachment routine: add a call to pcibdetach().

Write child-detachment and rescan routines to let us detach and
re-attach gpio0 and isa0 at gscpcib0:

# drvctl -d isa0
# drvctl -d gpio0
# drvctl -r -a isabus gscpcib0
# drvctl -r -a gpiobus gscpcib0
 1.13  17-Aug-2009  mbalmer Add struct pcib_softc to the gscpcib's softc, it is needed since we call
pcibattach() later. This fixes the driver and lets the GPIO pins attach.
While here, remove the empty gscpcib_childdetach function. Fixes GPIO
on my Soekris net4801 where I can now control the error LED...

"please commit" joerg@
 1.12  04-May-2009  cegger struct cfdata * -> cfdata_t
 1.11  05-May-2008  xtraeme branches: 1.11.14;
device_t/softc split and other related cosmetic changes.
 1.10  03-Jan-2008  dyoung branches: 1.10.6; 1.10.8; 1.10.10;
Support detachment of geodegcb(4) and its children, geodecntr(4)
and geodewdog(4). Support detachment of gscpcib0 and its child,
gpio0.
 1.9  11-Dec-2007  lukem use __KERNEL_RCSID()
 1.8  16-Nov-2006  christos branches: 1.8.28; 1.8.34; 1.8.38; 1.8.40; 1.8.42;
__unused removal on arguments; approved by core.
 1.7  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.6  24-Sep-2006  jmcneill Nuke checks for SMALL_KERNEL define; this is not a NetBSD option.
 1.5  26-Dec-2005  perry branches: 1.5.18; 1.5.22; 1.5.24;
u_intN_t -> uintN_t
 1.4  24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3  11-Dec-2005  christos merge ktrace-lwp.
 1.2  11-Oct-2005  drochner branches: 1.2.6;
kill gba_name in attach arg, specify interface attribute
 1.1  27-Sep-2005  jmcneill Add NS Geode PCI-ISA bridge GPIO support.
 1.2.6.2  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.6.1  11-Oct-2005  skrll file gscpcib.c was added on branch ktrace-lwp on 2005-11-10 13:56:53 +0000
 1.5.24.2  10-Dec-2006  yamt sync with head.
 1.5.24.1  22-Oct-2006  yamt sync with head
 1.5.22.1  18-Nov-2006  ad Sync with head.
 1.5.18.4  21-Jan-2008  yamt sync with head
 1.5.18.3  30-Dec-2006  yamt sync with head.
 1.5.18.2  21-Jun-2006  yamt sync with head.
 1.5.18.1  26-Dec-2005  yamt file gscpcib.c was added on branch yamt-lazymbuf on 2006-06-21 14:52:30 +0000
 1.8.42.2  08-Jan-2008  bouyer Sync with HEAD
 1.8.42.1  13-Dec-2007  bouyer Sync with HEAD
 1.8.40.1  11-Dec-2007  yamt sync with head.
 1.8.38.1  26-Dec-2007  ad Sync with head.
 1.8.34.1  18-Feb-2008  mjf Sync with HEAD.
 1.8.28.1  09-Jan-2008  matt sync with HEAD
 1.10.10.4  11-Mar-2010  yamt sync with head
 1.10.10.3  19-Aug-2009  yamt sync with head.
 1.10.10.2  16-May-2009  yamt sync with head
 1.10.10.1  16-May-2008  yamt sync with head.
 1.10.8.1  18-May-2008  yamt sync with head.
 1.10.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.11.14.4  27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.11.14.3  24-Oct-2010  jym Sync with HEAD
 1.11.14.2  01-Nov-2009  jym Sync with HEAD.
 1.11.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.2.1  17-Apr-2012  yamt sync with head
 1.18.66.2  26-Mar-2021  thorpej gscpcib_rescan(): "gpiobus" doesn't have locators, so no need to pass any
to config_found().
 1.18.66.1  22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.19.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed