summaryrefslogtreecommitdiff
path: root/include/stdio_dev.h
diff options
context:
space:
mode:
authorMichael Auchter <michael.auchter@ni.com>2019-12-09 18:16:16 +0000
committerHeiko Schocher <hs@denx.de>2019-12-11 06:25:13 +0100
commit3104162a8b967919d2b65211650299018e10c61e (patch)
tree7556f579952c3559d1d305290317fa34cd2adad9 /include/stdio_dev.h
parent520f9559020894950d4e962aba52220c8a1d6bfe (diff)
i2c: i2c_cdns: fix write timeout on fifo boundary
This fixes an issue that would cause I2C writes to timeout when the number of bytes is a multiple of the FIFO depth (i.e. 16 bytes). Within the transfer loop, after writing the data register with a new byte to transfer, if the transfer size equals the FIFO depth, the loop pauses until the INTERRUPT_COMP bit asserts to indicate data has been sent. This same check is performed after the loop as well to ensure data has been transferred prior to returning. In the case where the amount of data to be written is a multiple of the FIFO depth, the transfer loop would wait for the INTERRUPT_COMP bit to assert after writing the final byte, and then wait for this bit to assert once more. However, since the transfer has finished at this point, no new data has been written to the data register, and hence INTERRUPT_COMP will never assert. Fix this by only waiting for INTERRUPT_COMP in the transfer loop if there's still data to be written. Signed-off-by: Michael Auchter <michael.auchter@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/stdio_dev.h')
0 files changed, 0 insertions, 0 deletions