| From 25b46c5af5c77989fbd0d4ebe2e90c30194c784c Mon Sep 17 00:00:00 2001 |
| From: Wolfram Sang <wsa@the-dreams.de> |
| Date: Wed, 12 Feb 2020 10:35:30 +0100 |
| Subject: [PATCH] i2c: jz4780: silence log flood on txabrt |
| |
| commit 9e661cedcc0a072d91a32cb88e0515ea26e35711 upstream. |
| |
| The printout for txabrt is way too talkative and is highly annoying with |
| scanning programs like 'i2cdetect'. Reduce it to the minimum, the rest |
| can be gained by I2C core debugging and datasheet information. Also, |
| make it a debug printout, it won't help the regular user. |
| |
| Fixes: ba92222ed63a ("i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780") |
| Reported-by: H. Nikolaus Schaller <hns@goldelico.com> |
| Tested-by: H. Nikolaus Schaller <hns@goldelico.com> |
| Signed-off-by: Wolfram Sang <wsa@the-dreams.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c |
| index 25dcd73acd63..8f0e1f802f2d 100644 |
| --- a/drivers/i2c/busses/i2c-jz4780.c |
| +++ b/drivers/i2c/busses/i2c-jz4780.c |
| @@ -73,25 +73,6 @@ |
| #define JZ4780_I2C_STA_TFNF BIT(1) |
| #define JZ4780_I2C_STA_ACT BIT(0) |
| |
| -static const char * const jz4780_i2c_abrt_src[] = { |
| - "ABRT_7B_ADDR_NOACK", |
| - "ABRT_10ADDR1_NOACK", |
| - "ABRT_10ADDR2_NOACK", |
| - "ABRT_XDATA_NOACK", |
| - "ABRT_GCALL_NOACK", |
| - "ABRT_GCALL_READ", |
| - "ABRT_HS_ACKD", |
| - "SBYTE_ACKDET", |
| - "ABRT_HS_NORSTRT", |
| - "SBYTE_NORSTRT", |
| - "ABRT_10B_RD_NORSTRT", |
| - "ABRT_MASTER_DIS", |
| - "ARB_LOST", |
| - "SLVFLUSH_TXFIFO", |
| - "SLV_ARBLOST", |
| - "SLVRD_INTX", |
| -}; |
| - |
| #define JZ4780_I2C_INTST_IGC BIT(11) |
| #define JZ4780_I2C_INTST_ISTT BIT(10) |
| #define JZ4780_I2C_INTST_ISTP BIT(9) |
| @@ -529,21 +510,8 @@ static irqreturn_t jz4780_i2c_irq(int irqno, void *dev_id) |
| |
| static void jz4780_i2c_txabrt(struct jz4780_i2c *i2c, int src) |
| { |
| - int i; |
| - |
| - dev_err(&i2c->adap.dev, "txabrt: 0x%08x\n", src); |
| - dev_err(&i2c->adap.dev, "device addr=%x\n", |
| - jz4780_i2c_readw(i2c, JZ4780_I2C_TAR)); |
| - dev_err(&i2c->adap.dev, "send cmd count:%d %d\n", |
| - i2c->cmd, i2c->cmd_buf[i2c->cmd]); |
| - dev_err(&i2c->adap.dev, "receive data count:%d %d\n", |
| - i2c->cmd, i2c->data_buf[i2c->cmd]); |
| - |
| - for (i = 0; i < 16; i++) { |
| - if (src & BIT(i)) |
| - dev_dbg(&i2c->adap.dev, "I2C TXABRT[%d]=%s\n", |
| - i, jz4780_i2c_abrt_src[i]); |
| - } |
| + dev_dbg(&i2c->adap.dev, "txabrt: 0x%08x, cmd: %d, send: %d, recv: %d\n", |
| + src, i2c->cmd, i2c->cmd_buf[i2c->cmd], i2c->data_buf[i2c->cmd]); |
| } |
| |
| static inline int jz4780_i2c_xfer_read(struct jz4780_i2c *i2c, |
| -- |
| 2.7.4 |
| |