Skip to content
Commit 28a377c7 authored by Sonic Zhang's avatar Sonic Zhang Committed by Wolfram Sang
Browse files

i2c:i2c-bfin-twi: TWI fails to restart next transfer in high system load.



Current driver was developed based on BF537 0.2 HRM. In high system load, BUFRDERR error
interrupt may be raised if XMTSERV interrupt of last TX byte is not served in time
(set RSTART bit), which breaks restart tranfer as expected.

"Buffer Read Error (BUFRDERR)" description in Blackfin HRM only applys to BF537
rev. < 0.3. In later rev. and later announced Blackfin chips, such as BF527 and
BF548, a new TWI master feature "Clock Stretching" is added into the TWI controller,
BUFRDERR interrupt is not triggered after TX FIFO is empty.

This patch sets RSTART bit at the beginning of the first transfer. The SCL and SDA
is hold till XMTSERV interrupt of last TX byte is served. Restart transfer is not broken
in high system load.

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>

[wsa: fixed spaces around operators]

Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
parent 2ee74eb9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment