i2c: iproc: Add support for more master error status
Add support for more master error status including FIFO underrun and RX FIFO full Signed-off-by: Michael Cheng <ccheng@broadcom.com> Signed-off-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Родитель
f34b8d9093
Коммит
1b23fa2e18
|
@ -73,6 +73,8 @@
|
|||
#define M_CMD_STATUS_NACK_ADDR 0x2
|
||||
#define M_CMD_STATUS_NACK_DATA 0x3
|
||||
#define M_CMD_STATUS_TIMEOUT 0x4
|
||||
#define M_CMD_STATUS_FIFO_UNDERRUN 0x5
|
||||
#define M_CMD_STATUS_RX_FIFO_FULL 0x6
|
||||
#define M_CMD_PROTOCOL_SHIFT 9
|
||||
#define M_CMD_PROTOCOL_MASK 0xf
|
||||
#define M_CMD_PROTOCOL_BLK_WR 0x7
|
||||
|
@ -536,6 +538,14 @@ static int bcm_iproc_i2c_check_status(struct bcm_iproc_i2c_dev *iproc_i2c,
|
|||
dev_dbg(iproc_i2c->device, "bus timeout\n");
|
||||
return -ETIMEDOUT;
|
||||
|
||||
case M_CMD_STATUS_FIFO_UNDERRUN:
|
||||
dev_dbg(iproc_i2c->device, "FIFO under-run\n");
|
||||
return -ENXIO;
|
||||
|
||||
case M_CMD_STATUS_RX_FIFO_FULL:
|
||||
dev_dbg(iproc_i2c->device, "RX FIFO full\n");
|
||||
return -ETIMEDOUT;
|
||||
|
||||
default:
|
||||
dev_dbg(iproc_i2c->device, "unknown error code=%d\n", val);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче