]> git.baikalelectronics.ru Git - kernel.git/commit
i2c-designware: Set Tx/Rx FIFO threshold levels
authorShinya Kuribayashi <shinya.kuribayashi@necel.com>
Fri, 6 Nov 2009 12:48:12 +0000 (21:48 +0900)
committerBen Dooks <ben-linux@fluff.org>
Wed, 9 Dec 2009 00:19:11 +0000 (00:19 +0000)
commit7fc706cc33f4494c76e84271f3bbe0b35dbf38cc
tree0ca9f5254f74590f8f3bd72064b327a77395e01c
parentf25fc59f46e416d6eb2f855224c794c94b759424
i2c-designware: Set Tx/Rx FIFO threshold levels

As a hardware feature, DW I2C core generates a STOP condition whenever
the Tx FIFO becomes empty (strictly speaking, whenever the last byte in
the Tx FIFO is sent out), even if we have more bytes to be written.

In other words, we must never make "Tx FIFO underrun" happen during
a transaction, except for the last byte.  For the safety's sake, we'd
make TX_EMPTY interrupt get triggered every time one byte is processed.

The Rx FIFO threshold needs to be set as well.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
drivers/i2c/busses/i2c-designware.c