path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c
diff options
authorIan Lepore <ian@FreeBSD.org>2017-10-01 16:48:36 +0000
committerIan Lepore <ian@FreeBSD.org>2017-10-01 16:48:36 +0000
commit0bd904ed4730e481c5ad0dffc27794ec6ac70cfc (patch)
treee1408de194d7d82df4badd48fbf039ecbf684575 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c
parent529b326e632c433aa9a02dfd578b11b2358688f7 (diff)
Work around bcm283x silicon bugs to make i2c repeat-start work for the most
common case where it's needed -- a write followed by a read to the same slave. The i2c controller in this chip only performs complete transfers, it does not provide control over start/repeat-start/stop operations on the bus. Thus, we have gotten a full stop/start sequence rather than a repeat-start when doing a typical i2c slave access of "write address, read data". Some i2c slave devices require a repeat-start to work correctly. These changes cause the controller to do a repeat-start by pre-staging the read parameters in the controller registers immediate after the controller has latched the values for the initial write operation, but before any bytes are actually written. With the values pre-staged, when the write portion of the transfer completes, the state machine in the silicon sees a new start operation already staged and that causes it to perform a repeat-start. The key to tricking the buggy hardware into doing this is to avoid prefilling any output data in the transmit FIFO so that it is possible to catch the silicon in the state where transmit values are latched but the transmit isn't completed yet.
Notes: svn path=/head/; revision=324169
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c')
0 files changed, 0 insertions, 0 deletions