CVS log for src/sys/dev/i2c/gttwsi_core.c
Up to [cvs.NetBSD.org] / src / sys / dev / i2c
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Aug 7 16:19:11 2021 UTC (3 years, 4 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-ifq-base,
thorpej-ifq,
thorpej-i2c-spi-conf2-base,
thorpej-i2c-spi-conf2,
thorpej-altq-separation-base,
thorpej-altq-separation,
perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
netbsd-10-base,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10,
bouyer-sunxi-drm-base,
bouyer-sunxi-drm,
HEAD
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -4
lines
Merge thorpej-cfargs2.
Revision 1.17.8.1: download - view: text, markup, annotated - select for diffs
Wed Aug 4 18:53:26 2021 UTC (3 years, 4 months ago) by thorpej
Branches: thorpej-cfargs2
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +3 -4
lines
Adapt to CFARGS().
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Apr 24 23:36:54 2021 UTC (3 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf-base,
thorpej-i2c-spi-conf,
thorpej-futex2-base,
thorpej-futex2,
thorpej-cfargs2-base,
cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Branch point for: thorpej-cfargs2
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -3
lines
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?).
Revision 1.16.8.1: download - view: text, markup, annotated - select for diffs
Fri Apr 2 22:17:44 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16: +5 -3
lines
config_found_ia() -> config_found() w/ CFARG_IATTR.
Revision 1.7.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:05 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.7.2.1: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.2.1: +56 -93
lines
Merge changes from current as of 20200406
Revision 1.10.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:08 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.10.2.1: preferred, colored; branchpoint 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.2.1: +9 -2
lines
Sync with head.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Feb 15 23:42:01 2020 UTC (4 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-futex-base,
thorpej-futex,
thorpej-cfargs-base,
phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
is-mlppp-base,
is-mlppp,
bouyer-xenpvh-base2,
bouyer-xenpvh-base1,
bouyer-xenpvh-base,
bouyer-xenpvh,
ad-namecache-base3
Branch point for: thorpej-cfargs
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +9 -2
lines
Interrupt-driven I/O seems to completely go off the rails, at least
on AllWinner implementations of this controller, so force polled mode
for now.
Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:31 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +49 -49
lines
Sync with head.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Jan 13 12:53:46 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
CVS tags: ad-namecache-base2,
ad-namecache-base1
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3
lines
Fix silly mistake in rev 1.12.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Jan 13 09:53:54 2020 UTC (4 years, 10 months ago) by martin
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -4
lines
Fix debug printf formats.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Jan 13 00:09:28 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +35 -20
lines
Improve diagnostic messages:
- Pass an additional argument to gttwsi_wait() to indicate what's
going on, and report that, along with the error code from
cv_timedwait(), if a timeout occurs.
- In gttwsi_send_stop(), if we don't get the expected NRS status,
report which status we *did* get when a timeout occurs.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Jan 12 17:48:42 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +14 -29
lines
Clean up gttwsi's register access stuff:
- Garbage-collect the obsolete GTTWSI_ALLWINNER option; it hasn't been
needed since FDT'ization of the Allwinner support code.
- Redefine thw "TWSI_*" register definitions to clearly call out:
-> The Marvell flavor of the offsets
-> The Allwinner flavor of the offsets
...and make the regular definitions indices into a register map.
- Pass the appropriate register map from the front-end to the core.
- Remove the customer register read/write callbacks -- they are no longer
needed now that each front-end passes an appropriate register map to
the core.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Jan 11 22:21:25 2020 UTC (4 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -3
lines
In gttwsi_wait(), don't use cv_timedwait_sig() -- there's no reason to
catch signals here, and the code would need to handle them properly, which
this code does not.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Dec 25 14:08:47 2019 UTC (4 years, 11 months ago) by thorpej
Branches: MAIN
CVS tags: ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -14
lines
Remove assertions that no longer make sense now that the bus acquire / release
logic is handled by the upper layer.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Dec 22 23:23:32 2019 UTC (4 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -35
lines
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().
Revision 1.7.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:09 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +19 -12
lines
Sync with HEAD
Revision 1.3.2.3: download - view: text, markup, annotated - select for diffs
Sat Oct 20 06:58:31 2018 UTC (6 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.3.2.2: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.2: +19 -12
lines
Sync with head
Revision 1.2.12.1: download - view: text, markup, annotated - select for diffs
Mon Oct 15 03:09:07 2018 UTC (6 years, 1 month ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1
Diff to: previous 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2: +74 -30
lines
Pull up following revision(s) (requested by bouyer in ticket #1061):
sys/dev/i2c/gttwsi_core.c: revision 1.4-1.8 via patch
sys/dev/i2c/gttwsivar.h: revision 1.4 via patch
Use IPL_VM for bus lock so we can do i2c xfers from interrupt context
Don't sleep with IPL_VM lock held.
When initiating a transfer, if a device isn't present, we won't
get an ACK after sending the address. Check for this alternate
state and suppress the error message when it occurs.
Fixes PR kern/53356.
Bail early if gttwsi_send_start() fails in gttwsi_initiate_xfer() to
avoid unexpected state error message later (on Allwinner H5).
Expand code covered by sc->sc_mtx, to make sure an interrupt would not be
handled before the cv_timedwait_sig() call, or while polling.
Seems to fix "sunxitwi0: send STOP failed" messages frequently seen related
to axp20x0 sensors.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Oct 1 09:39:20 2018 UTC (6 years, 2 months ago) by bouyer
Branches: MAIN
CVS tags: phil-wifi-20191119,
phil-wifi-20190609,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
isaki-audio2-base,
isaki-audio2
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +19 -12
lines
Expand code covered by sc->sc_mtx, to make sure an interrupt would not be
handled before the cv_timedwait_sig() call, or while polling.
Seems to fix "sunxitwi0: send STOP failed" messages frequently seen related
to axp20x0 sensors.
Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:50 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.1: +35 -18
lines
Sync with HEAD
Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Jun 18 12:42:29 2018 UTC (6 years, 5 months ago) by jakllsch
Branches: MAIN
CVS tags: phil-wifi-base,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
jdolecek-ncqfixes-base,
jdolecek-ncqfixes
Branch point for: phil-wifi
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -3
lines
Bail early if gttwsi_send_start() fails in gttwsi_initiate_xfer() to
avoid unexpected state error message later (on Allwinner H5).
Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Jun 12 13:18:48 2018 UTC (6 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +32 -17
lines
When initiating a transfer, if a device isn't present, we won't
get an ACK after sending the address. Check for this alternate
state and suppress the error message when it occurs.
Fixes PR kern/53356.
Revision 1.3.2.1: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:05 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +18 -10
lines
Sync with HEAD
Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon May 7 15:03:19 2018 UTC (6 years, 7 months ago) by jmcneill
Branches: MAIN
CVS tags: pgoyette-compat-0521
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +17 -9
lines
Don't sleep with IPL_VM lock held.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu May 3 02:08:52 2018 UTC (6 years, 7 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -3
lines
Use IPL_VM for bus lock so we can do i2c xfers from interrupt context
Revision 1.1.12.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:02 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.1.12.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.12.2: +39 -3
lines
update from HEAD
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Oct 29 14:59:05 2017 UTC (7 years, 1 month ago) by jmcneill
Branches: MAIN
CVS tags: tls-maxphys-base-20171202,
pgoyette-compat-base,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +31 -4
lines
Allow drivers to provide their own read/write register functions. While
here, sprinkle KASSERTs to verify that the i2c lock is held where it
should be.
Revision 1.1.10.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 07:49:22 2014 UTC (10 years ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +12 -3
lines
Pull up following revision(s) (requested by jmcneill in ticket #257):
sys/arch/arm/allwinner/awin_twi.c: revision 1.5
sys/arch/arm/allwinner/awin_reg.h: revision 1.53
sys/arch/evbarm/conf/HUMMINGBIRD_A31: revision 1.20
sys/dev/i2c/gttwsi_core.c: revision 1.2
sys/dev/i2c/gttwsivar.h: revision 1.2
On Allwinner A31 you need to set the CONTROL_IFLG bit to clear it. Add
a "iflg-rwc" property to enable this behaviour.
--
Don't assume that U-Boot has enabled the TWI clock. Also, for A31, set
the "iflg-rwc" device property for gttwsi.
--
The SoC RTC works on this board but does not seem to be hooked up to the
battery. Thankfully, there is a PCF8563 attached to TWI2 at address 51h,
so use that instead.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Nov 23 13:37:27 2014 UTC (10 years ago) by jmcneill
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
nick-nhusb-base-20170825,
nick-nhusb-base-20170204,
nick-nhusb-base-20161204,
nick-nhusb-base-20161004,
nick-nhusb-base-20160907,
nick-nhusb-base-20160529,
nick-nhusb-base-20160422,
nick-nhusb-base-20160319,
nick-nhusb-base-20151226,
nick-nhusb-base-20150921,
nick-nhusb-base-20150606,
nick-nhusb-base-20150406,
nick-nhusb-base,
nick-nhusb,
netbsd-8-base,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
localcount-20160914,
jdolecek-ncq-base,
jdolecek-ncq,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: netbsd-8
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +12 -3
lines
On Allwinner A31 you need to set the CONTROL_IFLG bit to clear it. Add
a "iflg-rwc" property to enable this behaviour.
Revision 1.1.12.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:37 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.1.12.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.12.1: +353 -0
lines
Rebase to HEAD as of a few days ago.
Revision 1.1.8.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:21 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.1.8.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.8.1: +353 -0
lines
sync with head.
for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
Revision 1.1.6.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:37 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.1.6.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.6.1: +353 -0
lines
sync with head
Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 24 18:48:52 2014 UTC (10 years, 8 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.1: +353 -0
lines
Merge mvi2c from HEAD
Revision 1.1.12.1
Fri Sep 6 00:56:12 2013 UTC (11 years, 3 months ago) by tls
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.1: +0 -353
lines
file gttwsi_core.c was added on branch tls-maxphys on 2014-08-20 00:03:37 +0000
Revision 1.1.8.1
Fri Sep 6 00:56:12 2013 UTC (11 years, 3 months ago) by yamt
Branches: yamt-pagecache
FILE REMOVED
Changes since revision 1.1: +0 -353
lines
file gttwsi_core.c was added on branch yamt-pagecache on 2014-05-22 11:40:21 +0000
Revision 1.1.6.1
Fri Sep 6 00:56:12 2013 UTC (11 years, 3 months ago) by rmind
Branches: rmind-smpnet
FILE REMOVED
Changes since revision 1.1: +0 -353
lines
file gttwsi_core.c was added on branch rmind-smpnet on 2014-05-18 17:45:37 +0000
Revision 1.1.2.1
Fri Sep 6 00:56:12 2013 UTC (11 years, 3 months ago) by matt
Branches: matt-nb5-mips64
FILE REMOVED
Changes since revision 1.1: +0 -353
lines
file gttwsi_core.c was added on branch matt-nb5-mips64 on 2014-03-24 18:48:52 +0000
Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Sep 6 00:56:12 2013 UTC (11 years, 3 months ago) by matt
Branches: MAIN
CVS tags: yamt-pagecache-base9,
tls-maxphys-base,
tls-earlyentropy-base,
tls-earlyentropy,
rmind-smpnet-nbase,
rmind-smpnet-base,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
netbsd-7-base
Branch point for: yamt-pagecache,
tls-maxphys,
rmind-smpnet,
netbsd-7,
matt-nb5-mips64
Make gttswi MI and usuable from non-Marvell SoCs.
(should rename to mvi2c but ...)
CVSweb <webmaster@jp.NetBSD.org>