]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: omap: fix i207 errata handling
authorAlexander Kochetkov <al.kochet@gmail.com>
Fri, 21 Nov 2014 00:16:51 +0000 (04:16 +0400)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 22 Nov 2014 21:07:40 +0000 (22:07 +0100)
commit9cdefe311aaa6cf037d473be601003961c2e3158
tree78699fe2082f9add179925bf1add41bf78ff2312
parent76ad02038dfc90e4a736e86cb56a060b51d3d1d8
i2c: omap: fix i207 errata handling

commit 03ea084ea9dede7a14965b0b568337182942bd11 (i2c: omap: split out [XR]DR
and [XR]RDY) changed the way how errata i207 (I2C: RDR Flag May Be Incorrectly
Set) get handled. 03ea084ea9d code doesn't correspond to workaround provided by
errata.

According to errata ISR must filter out spurious RDR before data read not after.
ISR must read RXSTAT to get number of bytes available to read. Because RDR
could be set while there could no data in the receive FIFO.

Restored pre 03ea084ea9d way of handling errata.

Found by code review. Real impact haven't seen.
Tested on Beagleboard XM C.

Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Fixes: 03ea084ea9dede7a14965b i2c: omap: split out [XR]DR and [XR]RDY
Tested-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-omap.c