aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/serial167.c
diff options
context:
space:
mode:
authorShinya Kuribayashi <shinya.kuribayashi@necel.com>2009-11-06 21:50:40 +0900
committerBen Dooks <ben-linux@fluff.org>2009-12-09 00:19:12 +0000
commit201d6a70b72d1e6ca5a8e03f5f41a7741241401a (patch)
tree4e14e3f9ed1eb0f4aac57890d59d653f8b1e5641 /drivers/char/serial167.c
parent41c4e35037337cfcd297322f3f60770955156683 (diff)
i2c-designware: Process all i2c_msg messages in the interrupt handler
Currently we process the first i2c_dw_xfer_msg() in i2c_dw_xfer(), but in this case there is a possibility to be interrupted by certain interrupts. As described before in this patchset, we need to keep providing new transmit data within a given time period, otherwise Tx FIFO underrun takes place and STOP condition will be generated on the bus, even if we have more bytes to be written. In order to exclude all such possibilities, change TX_EMPTY interrupt usage as below: * DW_IC_INTR_DEFAULT_MASK: Define a default interrupt mask set, and put TX_EMPTY there. * i2c_dw_xfer_init: Enable DW_IC_INTR_DEFAULT_MASK prior to initiating a new I2C transaction. The first TX_EMPTY will be triggered shortly. With the help of it, we can make the first call to i2c_dw_xfer_msg() in the interrupt handler. * i2c_dw_xfer_msg: Fixup intr_mask operation accordingly. Make sure that TX_EMPTY operations need to be reversed. * request_irq: Set IRQF_DISABLED so that we could load transmit data into Tx FIFO without being distracted by other interrupts. * Remove i2c_dw_xfer_msg() in i2c_dw_xfer(). Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/char/serial167.c')
0 files changed, 0 insertions, 0 deletions