Home | History | Annotate | Download | only in apbus
History log of /src/sys/arch/newsmips/apbus/apbus.c
RevisionDateAuthorComments
 1.29  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28  24-Apr-2021  thorpej branches: 1.28.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.27  21-Nov-2020  thorpej branches: 1.27.2;
malloc(9) -> kmem(9)
 1.26  10-Nov-2019  chs branches: 1.26.8;
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.25  14-Oct-2018  tsutsui Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html
 1.24  30-Sep-2018  tsutsui Account APbus interrupts by evcnt(9).
 1.23  30-Sep-2018  tsutsui Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).
Should be pulled up to netbsd-8.
 1.22  20-Feb-2011  matt branches: 1.22.48; 1.22.54; 1.22.56;
Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
 1.21  09-Apr-2008  tsutsui branches: 1.21.22; 1.21.26; 1.21.32; 1.21.34;
Split device_t/softc, with misc cleanup.
 1.20  11-Dec-2005  christos branches: 1.20.74;
merge ktrace-lwp.
 1.19  03-Jun-2005  tsutsui constify.
 1.18  06-Feb-2005  tsutsui Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.
 1.17  15-Jul-2003  lukem branches: 1.17.8; 1.17.10;
__KERNEL_RCSID()
 1.16  10-May-2003  tsutsui branches: 1.16.2;
Rename apbus_intr_call() -> apbus_intr_dispatch().
 1.15  10-May-2003  tsutsui - Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
 1.14  03-May-2003  wiz DMA, not dma nor Dma.
 1.13  19-Apr-2003  tsutsui TAB/space cleanup.
 1.12  02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.11  01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.10  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8  14-Nov-2001  thorpej branches: 1.8.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
 1.7  28-Sep-2001  chs branches: 1.7.2;
don't depend on other headers to include sys/proc.h for us.
 1.6  26-Jul-2001  wiz branches: 1.6.2;
issueing -> issuing
 1.5  03-Dec-2000  matt branches: 1.5.4;
Make this stuff compile with -wstrict-prototpes -wmissing-prototypes.
More use of prototypes inside includes should be done.
 1.4  18-Oct-2000  onoe branches: 1.4.2;
Move APbus dependent unmapped DMA address stuff from bus.c to apbus.c
Support DMA mapping table with NEWSMIPS_DMAMAP_MAPTBL flag for APbus
(MAPTBL is not tested yet).
 1.3  12-Oct-2000  onoe Allow multiple interrupt handler on same interrupt event.
Clear interrupt mask for specified interrupt in apbus_intr_establish().
Add dma stuff; define apbus_dmamap_sync() to flush DMA write cache by
accessing the corresponding I/O port.
 1.2  23-Dec-1999  tsubai * Apply updates from Shimizu-san received after the initial commit.
* G/C unused.
* Many cosmetic changes.
* etc...
 1.1  22-Dec-1999  tsubai First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.
 1.4.2.3  08-Dec-2000  bouyer Sync with HEAD.
 1.4.2.2  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.4.2.1  18-Oct-2000  bouyer file apbus.c was added on branch thorpej_scsipi on 2000-11-20 20:17:14 +0000
 1.5.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.5.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.1  03-Aug-2001  lukem update to -current
 1.6.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.7.2.1  13-Nov-2001  thorpej Make the newsmips port compile with the thorpej-mips-cache branch.
 1.8.2.3  03-Jan-2003  thorpej Sync with HEAD.
 1.8.2.2  18-Oct-2002  nathanw Catch up to -current.
 1.8.2.1  14-Nov-2001  nathanw file apbus.c was added on branch nathanw_sa on 2002-10-18 02:39:09 +0000
 1.16.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.4  06-Feb-2005  skrll Sync with HEAD.
 1.16.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1  03-Aug-2004  skrll Sync with HEAD
 1.17.10.1  12-Feb-2005  yamt sync with head.
 1.17.8.1  29-Apr-2005  kent sync with -current
 1.20.74.1  02-Jun-2008  mjf Sync with HEAD.
 1.21.34.1  05-Mar-2011  bouyer Sync with HEAD
 1.21.32.1  06-Jun-2011  jruoho Sync with HEAD.
 1.21.26.1  05-Mar-2011  rmind sync with head
 1.21.22.1  29-Dec-2010  matt Adapt to the new interrupt framework.
Use mips_set_wbflush instead of playing preprocessor games.
 1.22.56.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.22.56.1  10-Jun-2019  christos Sync with HEAD
 1.22.54.1  20-Oct-2018  pgoyette Sync with head
 1.22.48.1  18-Nov-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #1095):

sys/arch/newsmips/apbus/apbus.c: revision 1.23
sys/arch/newsmips/apbus/apbus_subr.c: revision 1.10
sys/arch/newsmips/apbus/apbusvar.h: revision 1.10
sys/arch/newsmips/conf/std.newsmips: revision 1.18

Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626

Discussed with ryo@ (the original author of news5000 support).

Should be pulled up to netbsd-8.
 1.26.8.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.27.2.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.28.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed