linux-stable/drivers/i2c
Peter Swain 1bb1ff3e7c i2c: octeon: Improve performance if interrupt is early
There is a race between the TWSI interrupt and the condition
that is required before proceeding:

Low-level: interrupt flag bit must be set
High-level controller: valid bit must be clear

If the interrupt comes too early and the condition is not met
the wait will time out, and the transfer is aborted leading
to very poor performance.

To avoid this race retry for the condition ~80 µs later.
The retry is avoided on the very first invocation of
wait_event_timeout() (which tests the condition before entering
the wait and is therefore always wrong in this case).

EEPROM reads on 100kHz i2c now measure ~5.2kB/s, about 1/2 what's
achievable, and much better than the worst-case 100 bytes/sec before.

While at it remove the debug print from the low-level wait function.

Signed-off-by: Peter Swain <pswain@cavium.com>
Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-04-26 23:19:40 +02:00
..
algos i2c: algo-bit: add I2C_AQ_NO_CLK_STRETCH 2015-11-30 18:37:25 +01:00
busses i2c: octeon: Improve performance if interrupt is early 2016-04-26 23:19:40 +02:00
muxes i2c: mux: pinctrl: fix indentation for better readability 2016-04-24 23:11:41 +02:00
i2c-boardinfo.c i2c: i2c-boardinfo: sort includes 2016-02-20 23:33:38 +01:00
i2c-core.c i2c: let I2C masters ignore their children for PM 2016-04-12 23:07:28 +02:00
i2c-core.h i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-dev.c i2c: i2c-dev: sort includes 2016-02-20 23:33:38 +01:00
i2c-mux.c i2c: mux: drop old unused i2c-mux api 2016-04-22 15:00:19 +02:00
i2c-slave-eeprom.c i2c: Drop owner assignment from i2c_driver 2015-08-10 08:37:35 +02:00
i2c-smbus.c i2c: i2c-smbus: sort includes 2016-02-20 23:33:39 +01:00
i2c-stub.c i2c: i2c-stub: sort includes 2016-02-20 23:33:39 +01:00
Kconfig kconfig: use bool instead of boolean for type definition attributes 2015-01-07 13:08:04 +01:00
Makefile i2c: slave-eeprom: add eeprom simulator driver 2014-12-11 22:25:54 +01:00