qianfan Zhao
8461bfdca9
hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs
TWI_CNTR_INT_FLAG is W1C(write 1 to clear and write 0 has non-effect)
register on SUN6i based SoCs, we should lower interrupt when the guest
set this bit.
The linux kernel will hang in irq handler(mv64xxx_i2c_intr) if no
device connected on the i2c bus, next is the trace log:
allwinner_i2c_write write CNTR(0x0c): 0xc4 A_ACK BUS_EN INT_EN
allwinner_i2c_write write CNTR(0x0c): 0xcc A_ACK INT_FLAG BUS_EN INT_EN
allwinner_i2c_read read CNTR(0x0c): 0xcc A_ACK INT_FLAG BUS_EN INT_EN
allwinner_i2c_read read STAT(0x10): 0x20 STAT_M_ADDR_WR_NACK
allwinner_i2c_write write CNTR(0x0c): 0x54 A_ACK M_STP BUS_EN
allwinner_i2c_write write CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read STAT(0x10): 0xf8 STAT_IDLE
allwinner_i2c_write write CNTR(0x0c): 0x54 A_ACK M_STP BUS_EN
allwinner_i2c_write write CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read CNTR(0x0c): 0x4c A_ACK INT_FLAG BUS_EN
allwinner_i2c_read read STAT(0x10): 0xf8 STAT_IDLE
...
Fix it.
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
Reviewed-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
Tested-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-06 14:08:12 +00:00
..
2023-02-23 19:49:33 +01:00
2022-09-29 14:38:05 +04:00
2023-02-15 11:01:03 -05:00
2023-02-10 14:12:06 +01:00
2023-03-05 13:44:08 -08:00
2022-08-31 14:08:05 -03:00
2023-03-06 14:08:12 +00:00
2023-02-06 19:22:56 +01:00
2022-04-06 10:50:37 +02:00
2023-02-15 20:04:30 +01:00
2023-03-01 08:22:50 +00:00
2023-02-17 13:31:33 +08:00
2023-02-23 14:10:17 +01:00
2023-03-05 13:44:07 -08:00
2022-06-28 10:53:32 +02:00
2023-01-19 10:18:28 +01:00
2022-09-13 17:18:21 +01:00
2023-02-16 12:13:46 -07:00
2023-03-01 09:09:22 +00:00
2023-03-05 13:44:07 -08:00
2023-02-14 09:11:27 +01:00
2023-01-08 01:54:22 -05:00
2022-10-26 12:54:59 +04:00
2022-04-21 17:03:51 +04:00
2022-09-23 14:36:33 +02:00