summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-octeon-core.h
diff options
context:
space:
mode:
authorSuneel Garapati <sgarapati@marvell.com>2024-04-23 10:46:07 +0300
committerAndi Shyti <andi.shyti@kernel.org>2024-05-06 01:56:40 +0300
commitb9960b902f42c80ef436bf172666f20acbda32ac (patch)
treefa4046f262a9b0fa757ed68fdcf44f27d3dc60ad /drivers/i2c/busses/i2c-octeon-core.h
parent0b042c72d90de2f53d6d6d768158614f4b717b16 (diff)
downloadlinux-b9960b902f42c80ef436bf172666f20acbda32ac.tar.xz
i2c: octeon: Handle watchdog timeout
Add watchdog timeout handling to cater to the unhandled warnings seen during validation on boards with different I2C slaves. This status code reflects the state that controller couldn't receive any response from slave while being in non-idle state and HW recommends to reset before any further bus access. Signed-off-by: Suneel Garapati <sgarapati@marvell.com> Signed-off-by: Piyush Malgujar <pmalgujar@marvell.com> Acked-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-octeon-core.h')
-rw-r--r--drivers/i2c/busses/i2c-octeon-core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-octeon-core.h b/drivers/i2c/busses/i2c-octeon-core.h
index 39481e23e36f..7af01864da75 100644
--- a/drivers/i2c/busses/i2c-octeon-core.h
+++ b/drivers/i2c/busses/i2c-octeon-core.h
@@ -73,6 +73,7 @@
#define STAT_SLAVE_ACK 0xC8
#define STAT_AD2W_ACK 0xD0
#define STAT_AD2W_NAK 0xD8
+#define STAT_WDOG_TOUT 0xF0
#define STAT_IDLE 0xF8
/* TWSI_INT values */
@@ -107,6 +108,9 @@ struct octeon_i2c_reg_offset {
#define TWSX_MODE_HS_MODE BIT(0)
#define TWSX_MODE_HS_MASK (TWSX_MODE_REFCLK_SRC | TWSX_MODE_HS_MODE)
+/* Set BUS_MON_RST to reset bus monitor */
+#define BUS_MON_RST_MASK BIT(3)
+
struct octeon_i2c {
wait_queue_head_t queue;
struct i2c_adapter adap;