Home | History | Annotate | Download | only in sbus
History log of /src/sys/dev/sbus/qec.c
RevisionDateAuthorComments
 1.55  25-Sep-2022  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.54  22-Jan-2022  thorpej Change the devhandle_from_*() functions to also take a "super handle",
from which the newly created handle will inherit it's implementation.
The root implementation for a new handle type is used if an invalid
"super handle" is passed.
 1.53  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.52  10-May-2021  thorpej branches: 1.52.4;
Associate the OpenBoot / OpenFirmware node with attached devices
at config_found() time.
 1.51  24-Apr-2021  thorpej branches: 1.51.2; 1.51.4;
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.50  19-Sep-2009  tsutsui branches: 1.50.80;
u_intNN_t -> uintNN_t
 1.49  19-Sep-2009  tsutsui Split device_t/softc.
Tested on:
---
qec0 at sbus0 slot 3 offset 0x20000: 128K memory
be0 at qec0 slot 0 offset 0x0 level 4 (ipl 7): rev 1, address 00:80:17:xx:xx:xx
 1.48  18-Sep-2009  tsutsui Use uint8_t pointers for TX/RX buffers to avoid extra pointer casts.
 1.47  18-Sep-2009  tsutsui - wrap a long line
- ANSIfy
 1.46  18-Sep-2009  tsutsui - use device_private(), proper types and variables for device_t/softc
- remove unnecessary casts against void pointer

XXX: many inconsistent use of aprint_*(9) and printf(9)
 1.45  17-Sep-2009  tsutsui Remove struct sbusdev and related functions sbus_establish() and sbusreset().
They are derived from 4.4BSD/sparc and have been there since initial import
of NetBSD/sparc in 1993, but the struct sbusdev is almost unused for years,
nothing calls sbusreset(), and all (*sd->sd_reset)() functions look bogus.

Suggested by mrg@ and martin@, and tested on SS1+ and SS20.
 1.44  17-May-2009  tsutsui Use device_private() to get struct sbus_softc from device_t parent.

XXX: sbus_softc has been split from device_t on sparc, but not on sparc64!?
 1.43  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.42  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.41  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.40  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.39  28-Apr-2008  martin branches: 1.39.8; 1.39.14;
Remove clause 3 and 4 from TNF licenses
 1.38  05-Apr-2008  cegger branches: 1.38.2; 1.38.4;
use aprint_*_dev and device_xname
 1.37  19-Oct-2007  ad branches: 1.37.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.36  04-Mar-2007  christos branches: 1.36.2; 1.36.14; 1.36.16; 1.36.20;
fix fallout from caddr_t changes.
 1.35  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.34  11-Dec-2005  christos branches: 1.34.26;
merge ktrace-lwp.
 1.33  30-May-2005  christos branches: 1.33.2;
avoid shadow variables.
 1.32  04-Feb-2005  perry de-__P
 1.31  30-Jun-2004  pk branches: 1.31.4; 1.31.6;
Introduce bus_space_tag_alloc() for the common parts of bus tag allocation.
 1.30  28-Jun-2004  pk Put back qec_bus_map(), since sparc64's mainbus and sbus drivers do not
use the tag's translation ranges yet.
 1.29  27-Jun-2004  pk Bus tags should now be constructed by copying the parent's bus tag and
then changing the fields that need to be handled by the child bus.
 1.28  17-Mar-2004  pk Rename PROM_getprop*() => prom_getprop*().
 1.27  27-Aug-2003  mrg change PROM_getprop() from taking a "void **" for the storage, to a
"void *", and do the extra de-reference directly in the function. this
avoids having to cast dozens of different types to "void **", which sets
of GCC3's strict-aliasing. testing by martin@
 1.26  10-Dec-2002  pk branches: 1.26.6;
Remove the `flags' argument from bus_intr_establish().
 1.25  10-Dec-2002  pk bus_intr_establish() signature change.

The additional `fast trap' argument is ignored in these drivers.
 1.24  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.23  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.22  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.21  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.20  23-Aug-2002  thorpej Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
 1.19  20-Mar-2002  eeh branches: 1.19.4; 1.19.6;
Clean up bus space a bit. XXX is sc_buffer ever actually used after it's
mapped in?
 1.18  11-Mar-2002  pk Get rid of `bus_type_t' and use BUS_ADDR() (in sbus_bus_map()) to construct
a `bus_addr_t' to pass on to bus_space_map().

Drop `va' argument from sbus_bus_map(); it should not be used by MI Sbus
drivers.
 1.17  14-Jan-2002  tsutsui Call malloc(9) with M_ZERO flag instead of bzero() after malloc().
 1.16  04-Dec-2001  wiz Replace some misuses of "then" with "than".
 1.15  15-Nov-2001  lukem don't need <sys/types.h> when including <sys/param.h>
 1.14  13-Nov-2001  lukem add RCSIDs
 1.13  26-Sep-2001  eeh getprop* -> PROM_getprop*
 1.12  04-Dec-2000  fvdl branches: 1.12.2; 1.12.4; 1.12.6;
Avoid compile warning on sparc64 32bit. sc_buffer doesn't seem to be
used at all, this line can probably be removed.
 1.11  09-Jul-2000  pk Add a `device class' interrupt level argument (from machine/intr.h)
to bus_interrupt_establish().

It's currently only used in sparc64/dev/psycho.c to assign a CPU interrupt
level to devices in PCI slots.
 1.10  11-Jan-2000  pk branches: 1.10.4;
Remove old-style boot device recognition.
 1.9  24-Jun-1999  pk branches: 1.9.2;
Issue a reset command when initializing.
 1.8  17-Jan-1999  pk branches: 1.8.4;
Share ring buffer code and data structure for `be' and `qe' in
the QEC module. Adapt the QEC interrupt establish code to suit the
needs of the `qe' device.
 1.7  16-Jan-1999  pk Convert to bus_space(9).
Add buffer allocations needed by the be driver.
 1.6  30-Aug-1998  pk Use sbus attach args features.
getpropA() => getprop()
 1.5  29-Aug-1998  pk Nuke unnecessary header files.
 1.4  21-Aug-1998  pk vm_offset_t => vaddr_t.
 1.3  29-Jul-1998  pk Use sbus_destroy_attach_args().
 1.2  28-Jul-1998  pk Fix #includes.
Remove #ifdef SUN4C & SUN4M.
 1.1  27-Jul-1998  pk qec `bus' driver; much like lebuffer.
 1.8.4.1  01-Jul-1999  thorpej Sync w/ -current.
 1.9.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.9.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.10.4.1  19-Jul-2000  mrg pull up sparc/sparc64 bus_intr_establish() changes, necessary for sparc64
(originally done by pk, approved by thorpej):

>Add a `device class' interrupt level argument (from machine/intr.h)
>to bus_interrupt_establish().
>
>It's currently only used in sparc64/dev/psycho.c to assign a CPU interrupt
>level to devices in PCI slots.
 1.12.6.1  01-Oct-2001  fvdl Catch up with -current.
 1.12.4.6  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.12.4.5  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.12.4.4  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.4.3  16-Mar-2002  jdolecek Catch up with -current.
 1.12.4.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.12.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.2.8  11-Dec-2002  thorpej Sync with HEAD.
 1.12.2.7  18-Oct-2002  nathanw Catch up to -current.
 1.12.2.6  27-Aug-2002  nathanw Catch up to -current.
 1.12.2.5  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.12.2.4  28-Feb-2002  nathanw Catch up to -current.
 1.12.2.3  08-Jan-2002  nathanw Catch up to -current.
 1.12.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.12.2.1  08-Oct-2001  nathanw Catch up to -current.
 1.19.6.1  22-Nov-2002  tron Pull up revision 1.20 (requested by martin in ticket #948):
Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
 1.19.4.1  29-Aug-2002  gehenna catch up with -current.
 1.26.6.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.26.6.4  04-Feb-2005  skrll Sync with HEAD.
 1.26.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.26.6.1  03-Aug-2004  skrll Sync with HEAD
 1.31.6.1  12-Feb-2005  yamt sync with head.
 1.31.4.1  29-Apr-2005  kent sync with -current
 1.33.2.2  27-Oct-2007  yamt sync with head.
 1.33.2.1  03-Sep-2007  yamt sync with head.
 1.34.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.36.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.36.16.1  06-Nov-2007  matt sync with HEAD
 1.36.14.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.36.2.1  23-Oct-2007  ad Sync with head.
 1.37.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.38.4.5  11-Mar-2010  yamt sync with head
 1.38.4.4  20-Jun-2009  yamt sync with head
 1.38.4.3  16-May-2009  yamt sync with head
 1.38.4.2  04-May-2009  yamt sync with head.
 1.38.4.1  16-May-2008  yamt sync with head.
 1.38.2.1  18-May-2008  yamt sync with head.
 1.39.14.2  23-Jul-2009  jym Sync with HEAD.
 1.39.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.39.8.1  28-Apr-2009  skrll Sync with HEAD.
 1.50.80.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.51.4.1  31-May-2021  cjep sync with head
 1.51.2.1  13-May-2021  thorpej Sync with HEAD.
 1.52.4.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed