i2c: octeon: thunderx: Limit register access retries
authorJan Glauber <jglauber@cavium.com>
Fri, 9 Dec 2016 09:31:57 +0000 (10:31 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 17 Dec 2016 18:27:44 +0000 (19:27 +0100)
commit493ff7e2cdda9182fb709d3681315180d9165bd8
treeb3c5e698aade608c5d84736dad5bd7a1da9a36a6
parent59331c215daf600a650e281b6e8ef3e1ed1174c2
i2c: octeon: thunderx: Limit register access retries

Do not infinitely retry register readq and writeq operations
in order to not lock up the CPU in case the TWSI gets stuck.

Return -EIO in case of a failed data read. For all other
cases just return so subsequent operations will fail
and trigger the recovery.

Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-octeon-core.c
drivers/i2c/busses/i2c-octeon-core.h