Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/mips/alchemy/dev/ausmbus_psc.c
RevisionDateAuthorComments
 1.17  15-Sep-2025  thorpej Encapsulate what's needed to attach an I2C bus into a iicbus_attach()
inline.
 1.16  18-Jun-2022  andvar fix typos in word "functions" in comments, mainly s/fuctions/functions/.
 1.15  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.14  24-Apr-2021  thorpej branches: 1.14.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.13  22-Dec-2019  thorpej branches: 1.13.10;
Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.12  14-Feb-2016  chs branches: 1.12.18;
zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
 1.11  03-Jan-2012  kiyohara branches: 1.11.6; 1.11.24;
Use device_t instead of 'struct device *'.
Call aprint_* in auto-config time.
 1.10  01-Jul-2011  dyoung branches: 1.10.2; 1.10.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9  20-Apr-2009  pgoyette One more implementation of the quick_{read,write} I2C protocol. Note
that this is currently used only by the I2C_SCAN code (disabled by
default).

XXX Not tested due to lack of hardware. Reviewed by simon@ and shige@.
 1.8  17-Oct-2007  garbled branches: 1.8.20; 1.8.28; 1.8.34;
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.7  14-Aug-2007  kiyohara branches: 1.7.2;
Remove white-spaces.
 1.6  26-Jun-2006  drochner branches: 1.6.6; 1.6.16; 1.6.24; 1.6.30; 1.6.34;
use the "i2cbus" interface attribute rather than putting a string name
into the i2cbus attach args
 1.5  25-Jun-2006  kiyohara Supoort read/write word.
 1.4  27-Mar-2006  shige branches: 1.4.2; 1.4.6; 1.4.8;
Add waits after bus_space_write.
 1.3  06-Mar-2006  shige branches: 1.3.2; 1.3.4; 1.3.6;
Change name of SMBus include: smbusreg.h => ausmbus_pscreg.h.
 1.2  06-Mar-2006  shige Remove working-debug codes.
I apologize sincerely...
 1.1  06-Mar-2006  shige Add support for On-chip PSC SMBus protocol.
 1.3.6.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.3.4.5  11-Aug-2006  yamt sync with head
 1.3.4.4  26-Jun-2006  yamt sync with head.
 1.3.4.3  01-Apr-2006  yamt sync with head.
 1.3.4.2  13-Mar-2006  yamt sync with head.
 1.3.4.1  06-Mar-2006  yamt file ausmbus_psc.c was added on branch yamt-pdpolicy on 2006-03-13 09:06:58 +0000
 1.3.2.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.4.8.4  03-Sep-2007  yamt sync with head.
 1.4.8.3  30-Dec-2006  yamt sync with head.
 1.4.8.2  21-Jun-2006  yamt sync with head.
 1.4.8.1  27-Mar-2006  yamt file ausmbus_psc.c was added on branch yamt-lazymbuf on 2006-06-21 14:53:28 +0000
 1.4.6.1  13-Jul-2006  gdamore Merge from HEAD.
 1.4.2.2  22-Apr-2006  simonb Sync with head.
 1.4.2.1  27-Mar-2006  simonb file ausmbus_psc.c was added on branch simonb-timecounters on 2006-04-22 11:37:41 +0000
 1.6.34.1  16-Aug-2007  jmcneill Sync with HEAD.
 1.6.30.1  15-Aug-2007  skrll Sync with HEAD.
 1.6.24.1  03-Oct-2007  garbled Sync with HEAD
 1.6.16.1  20-Aug-2007  ad Sync with HEAD.
 1.6.6.2  09-Sep-2006  rpaulo sync with head
 1.6.6.1  26-Jun-2006  rpaulo file ausmbus_psc.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:14 +0000
 1.7.2.1  06-Nov-2007  matt sync with HEAD
 1.8.34.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.28.1  28-Apr-2009  skrll Sync with HEAD.
 1.8.20.1  04-May-2009  yamt sync with head.
 1.10.6.1  18-Feb-2012  mrg merge to -current.
 1.10.2.1  17-Apr-2012  yamt sync with head
 1.11.24.1  19-Mar-2016  skrll Sync with HEAD
 1.11.6.1  03-Dec-2017  jdolecek update from HEAD
 1.12.18.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.13.10.1  23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.14.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed