Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/x68k/dev/intio.c
RevisionDateAuthorComments
 1.52  26-May-2022  tsutsui Explicitly include "ioconf.h" for struct cfdriver.
 1.51  17-Dec-2021  skrll Correct copypaste comment grammar.
 1.50  17-Dec-2021  skrll Trailing whitespace
 1.49  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.48  24-Apr-2021  thorpej branches: 1.48.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.47  14-Jun-2020  chs branches: 1.47.4;
replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.46  10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.45  31-May-2016  dholland branches: 1.45.18;
fix flagrantly wrong indent
 1.44  26-Feb-2016  christos PR/50859: David Binderman: Remove redundant code.
 1.43  27-Jan-2012  para branches: 1.43.6; 1.43.24;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.42  18-Jan-2009  isaki branches: 1.42.14; 1.42.18;
- malloc() + memset(0) -> malloc(M_ZERO).
- remove temporary variable.
 1.41  18-Jan-2009  isaki Delete 10 years old #if 0'd comments in intio.c, locore.s.
According to the old comment, the interrupt handler via intiotrap
should set his interrupt level again, but it's not right. And
don't set it again by interrupt hander.
 1.40  18-Jan-2009  isaki Clean up header files.
 1.39  17-Jan-2009  isaki Purge x68k_config_found() to simplify consinit routine.
config_console() calls initialization of grf, ite, mfp
directly, instead of tracing special device tree with an
emulated 'struct device'.
 1.38  18-Dec-2008  isaki Sync with other m68k ports.
- Remove PHYS_IODEV, PHYS_INTIODEV. These are real copy of INTIOBASE.
- Define IIOV() (and IIOP()) and use it, rather than INTIO_ADDR().
 1.37  25-Jun-2008  isaki branches: 1.37.4;
Split device_t/softc. Use aprint*() and device_xname().
 1.36  23-Jun-2008  isaki Make intio_intr_establish() use evcnt(9),
instead of dynamic allocation of intrnames/intrcnt.
 1.35  10-May-2008  martin branches: 1.35.2;
Minor typo in license
 1.34  28-Apr-2008  martin branches: 1.34.2;
Remove clause 3 and 4 from TNF licenses
 1.33  17-Oct-2007  garbled branches: 1.33.16; 1.33.18; 1.33.20;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.32  12-May-2007  isaki branches: 1.32.10;
Clean up white spaces and tabs.
 1.31  11-Mar-2007  isaki branches: 1.31.2; 1.31.8;
white space, indent and KNF.
 1.30  05-Mar-2007  he branches: 1.30.2;
Cast to char* before doing pointer arithmetic.
 1.29  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.28  11-Dec-2005  christos branches: 1.28.26;
merge ktrace-lwp.
 1.27  26-Aug-2005  drochner s/locdesc_t/int/g
 1.26  30-Jun-2005  drochner branches: 1.26.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.25  18-Jan-2005  chs de-__P, remove register, ansify.
 1.24  13-Dec-2004  chs branches: 1.24.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.23  04-Jan-2004  wiz Spell controller with two ls. Inspired by miod@openbsd.
 1.22  01-Nov-2003  jdolecek the storagesize parameter of extent_create() is a size_t, not a pointer
 1.21  05-Oct-2003  nsmrtks print PC in stray interrupt
 1.20  15-Jul-2003  lukem rcsid
 1.19  03-May-2003  wiz branches: 1.19.2;
DMA, not dma nor Dma.
 1.18  01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.17  01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.16  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.15  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13  27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.12  27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.11  27-Dec-2001  wiz bcopy/bcmp/bzero -> memcpy/memcmp/memset
 1.10  11-Nov-2001  isaki Support BUS_SPACE_MAP_SHIFTED_EVEN for bus_space_map().
Now BUS_SPACE_MAP_SHIFTED means BUS_SPACE_MAP_SHIFTED_ODD.
It is needed for Nereid Ethernet.
 1.9  26-Aug-2001  mrg branches: 1.9.4; 1.9.6;
remove bogus comment. noted by Tetsuya Isaki <isaki@par.odn.ne.jp> in private email.
 1.8  29-Jun-2000  mrg branches: 1.8.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.7  16-Jan-2000  minoura branches: 1.7.4;
Minor cleanups & corrections.
 1.6  05-May-1999  minoura branches: 1.6.2;
Add missing ia_size argument.
 1.5  24-Mar-1999  minoura branches: 1.5.2; 1.5.4; 1.5.6;
Shut up gcc -Wall.
 1.4  22-Mar-1999  minoura Use intio_debug flag variable.
 1.3  18-Mar-1999  minoura Shut up gcc -Wall
 1.2  16-Mar-1999  minoura Merged minoura_x68k_bus_h branch.
 1.1  23-Dec-1998  minoura branches: 1.1.2;
file intio.c was initially added on branch minoura_x68k_bus_h.
 1.1.2.8  14-Mar-1999  minoura Use a single (inline) function instead of refering the bus_space switch.
 1.1.2.7  12-Mar-1999  minoura Gather interrupt statics.
 1.1.2.6  13-Feb-1999  minoura Implemented BUS_SPACE_MAP_SHIFTED.
Some of the devices are mapped only on the odd addresses for hardware
simplicity. To share drivers with other platforms, this should be
made transparent through the bus_space layer.
 1.1.2.5  02-Feb-1999  minoura I/O controler support.
 1.1.2.4  31-Jan-1999  minoura Attach arg dmaintr.
 1.1.2.3  30-Jan-1999  minoura Added DMAC driver.
 1.1.2.2  27-Dec-1998  minoura Match device names.
 1.1.2.1  23-Dec-1998  minoura First import of bus_space implementation for x68k port.
 1.5.6.1  30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.5.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.5.2.1  21-Jun-1999  perry pullup 1.5->1.6 (minoura)
 1.6.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.4.1  06-Jan-2002  he Pull up revision 1.10 (requested by isaki):
Support mapping devices with BUS_SPACE_MAP_SHIFTED_EVEN.
 1.8.4.3  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.4.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.9.6.4  03-Jan-2003  thorpej Sync with HEAD.
 1.9.6.3  18-Oct-2002  nathanw Catch up to -current.
 1.9.6.2  08-Jan-2002  nathanw Catch up to -current.
 1.9.6.1  26-Aug-2001  nathanw file intio.c was added on branch nathanw_sa on 2002-01-08 00:28:39 +0000
 1.9.4.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.19.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.5  24-Jan-2005  skrll Sync with HEAD.
 1.19.2.4  18-Dec-2004  skrll Sync with HEAD.
 1.19.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1  03-Aug-2004  skrll Sync with HEAD
 1.24.2.1  29-Apr-2005  kent sync with -current
 1.26.2.2  03-Sep-2007  yamt sync with head.
 1.26.2.1  21-Jun-2006  yamt sync with head.
 1.28.26.2  17-May-2007  yamt sync with head.
 1.28.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.30.2.2  27-May-2007  ad Sync with head.
 1.30.2.1  13-Mar-2007  ad Sync with head.
 1.31.8.1  22-May-2007  matt Update to HEAD.
 1.31.2.1  11-Jul-2007  mjf Sync with head.
 1.32.10.1  06-Nov-2007  matt sync with HEAD
 1.33.20.2  04-May-2009  yamt sync with head.
 1.33.20.1  16-May-2008  yamt sync with head.
 1.33.18.1  18-May-2008  yamt sync with head.
 1.33.16.3  17-Jan-2009  mjf Sync with HEAD.
 1.33.16.2  29-Jun-2008  mjf Sync with HEAD.
 1.33.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.34.2.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.34.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.35.2.1  27-Jun-2008  simonb Sync with head.
 1.37.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.42.18.1  18-Feb-2012  mrg merge to -current.
 1.42.14.1  17-Apr-2012  yamt sync with head
 1.43.24.2  09-Jul-2016  skrll Sync with HEAD
 1.43.24.1  19-Mar-2016  skrll Sync with HEAD
 1.43.6.1  03-Dec-2017  jdolecek update from HEAD
 1.45.18.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.47.4.6  05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.47.4.5  05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.47.4.4  04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.47.4.3  03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.47.4.2  21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.47.4.1  20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.48.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed