History log of /src/sys/arch/evbarm/nslu2/nslu2_iic.c |
Revision | | Date | Author | Comments |
1.13 |
| 15-Sep-2025 |
thorpej | Encapsulate what's needed to attach an I2C bus into a iicbus_attach() inline.
|
1.12 |
| 07-Aug-2021 |
thorpej | Merge thorpej-cfargs2.
|
1.11 |
| 24-Apr-2021 |
thorpej | branches: 1.11.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.10 |
| 22-Dec-2019 |
thorpej | branches: 1.10.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.9 |
| 14-Feb-2016 |
chs | branches: 1.9.18; zero the i2c_attach_args structure before filling it in. fixes occasional crashes in iic_attach().
|
1.8 |
| 14-Oct-2012 |
msaitoh | branches: 1.8.14; struct device * -> device_t for IXP4xx (and nslu2). Tested with my NSLU2.
|
1.7 |
| 28-Jun-2008 |
tsutsui | branches: 1.7.30; 1.7.40; Fix inverted logic of IXP425_GPIO_GPOER register bits in the previous. Pointed out by Piotr Durlej on port-arm@.
|
1.6 |
| 09-Jun-2008 |
tsutsui | branches: 1.6.2; Emulate open collector output more properly to make it work with reorganized MI i2c_bitbang.c: - set GPOER register in set_dir function too according to GPOUTR value - in set_bits function, don't set SDA_BIT implicitly in input mode and check current direction to handle GPOER register - no need to check direction in read_check function because reading SCL is valid even if SDA is output
Tested by Donald T Hayford on port-arm.
|
1.5 |
| 28-Apr-2008 |
martin | branches: 1.5.2; Remove clause 3 and 4 from TNF licenses
|
1.4 |
| 19-Apr-2008 |
scw | branches: 1.4.2; Adapt to the recent i2c_bitbang changes, which provide more hints as to the SDA/SCL pin direction, by treating the direction as just that; a hint.
Instead, configure the SDA/SCL pins as outputs only when they are to be driven low (zero). Otherwise configure them as inputs and allow the pull-up resistors to do their jobs.
Check the SDA direction hint only if DIAGNOSTIC.
Fixes a problem reported by Donald T Hayford on port-arm@ whereby the kernel failed to read/write the RTC's registers.
|
1.3 |
| 06-Dec-2007 |
ad | branches: 1.3.12; 1.3.14; lockmgr -> mutex
|
1.2 |
| 26-Jun-2006 |
drochner | branches: 1.2.6; 1.2.20; 1.2.32; 1.2.34; 1.2.36; 1.2.42; 1.2.46; use the "i2cbus" interface attribute rather than putting a string name into the i2cbus attach args
|
1.1 |
| 28-Feb-2006 |
scw | branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14; 1.1.16; A port of NetBSD to the Linksys NSLU2 (a.k.a. "Slug").
The NSLU2 (Network Storage Link for USB 2.0 Disk Drives) is a small, *cheap* NAS device consisting of an Intel IXP420 (Xscale) CPU, a 10/100mbit Ethernet port, and two USB 2.0 ports. It has 32MB of SDRAM and 8MB of Flash memory, and runs RedBoot/Linux out of the box. Now it can also run NetBSD.
|
1.1.16.4 |
| 07-Dec-2007 |
yamt | sync with head
|
1.1.16.3 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.1.16.2 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.1.16.1 |
| 28-Feb-2006 |
yamt | file nslu2_iic.c was added on branch yamt-lazymbuf on 2006-06-21 14:50:54 +0000
|
1.1.14.1 |
| 13-Jul-2006 |
gdamore | Merge from HEAD.
|
1.1.10.2 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.1.10.1 |
| 28-Feb-2006 |
simonb | file nslu2_iic.c was added on branch simonb-timecounters on 2006-04-22 11:37:24 +0000
|
1.1.4.1 |
| 11-Aug-2006 |
yamt | sync with head
|
1.1.2.2 |
| 01-Mar-2006 |
yamt | sync with head.
|
1.1.2.1 |
| 28-Feb-2006 |
yamt | file nslu2_iic.c was added on branch yamt-uio_vmspace on 2006-03-01 09:27:46 +0000
|
1.2.46.1 |
| 08-Dec-2007 |
ad | Sync with head.
|
1.2.42.1 |
| 08-Dec-2007 |
mjf | Sync with HEAD.
|
1.2.36.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.2.34.1 |
| 09-Dec-2007 |
jmcneill | Sync with HEAD.
|
1.2.32.1 |
| 26-Dec-2007 |
rjs | Sync with HEAD.
|
1.2.20.1 |
| 09-Dec-2007 |
reinoud | Pullup to HEAD
|
1.2.6.2 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.2.6.1 |
| 26-Jun-2006 |
rpaulo | file nslu2_iic.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:38:55 +0000
|
1.3.14.2 |
| 17-Jun-2008 |
yamt | sync with head.
|
1.3.14.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.3.12.2 |
| 29-Jun-2008 |
mjf | Sync with HEAD.
|
1.3.12.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.4.2.2 |
| 04-May-2009 |
yamt | sync with head.
|
1.4.2.1 |
| 16-May-2008 |
yamt | sync with head.
|
1.5.2.2 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.5.2.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.6.2.1 |
| 03-Jul-2008 |
simonb | Sync with head.
|
1.7.40.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.7.40.1 |
| 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
1.7.30.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.8.14.1 |
| 19-Mar-2016 |
skrll | Sync with HEAD
|
1.9.18.1 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.10.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.11.8.1 |
| 04-Aug-2021 |
thorpej | Adapt to CFARGS().
|