[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YaUjd747t94Ge/VA@kunai>
Date: Mon, 29 Nov 2021 20:01:11 +0100
From: Wolfram Sang <wsa@...nel.org>
To: Chris Packham <chris.packham@...iedtelesis.co.nz>
Cc: rjui@...adcom.com, sbranden@...adcom.com,
bcm-kernel-feedback-list@...adcom.com, linux-i2c@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Richard Laing <richard.laing@...iedtelesis.co.nz>
Subject: Re: [PATCH v3] i2c: bcm-iproc: Add i2c recovery support
Hi Chris,
sorry for the long delay.
All looks good except for this:
> @@ -806,6 +954,7 @@ static int bcm_iproc_i2c_xfer_wait(struct bcm_iproc_i2c_dev *iproc_i2c,
> /* flush both TX/RX FIFOs */
> val = BIT(M_FIFO_RX_FLUSH_SHIFT) | BIT(M_FIFO_TX_FLUSH_SHIFT);
> iproc_i2c_wr_reg(iproc_i2c, M_FIFO_CTRL_OFFSET, val);
> + iproc_i2c_lockup_recover(iproc_i2c);
> return -ETIMEDOUT;
> }
>
> @@ -814,6 +963,7 @@ static int bcm_iproc_i2c_xfer_wait(struct bcm_iproc_i2c_dev *iproc_i2c,
> /* flush both TX/RX FIFOs */
> val = BIT(M_FIFO_RX_FLUSH_SHIFT) | BIT(M_FIFO_TX_FLUSH_SHIFT);
> iproc_i2c_wr_reg(iproc_i2c, M_FIFO_CTRL_OFFSET, val);
> + iproc_i2c_lockup_recover(iproc_i2c);
> return ret;
> }
I2C specs suggest recovery at the beginning of a transfer when SDA is
detected low. Not at the end of a transfer.
Happy hacking,
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists