RE: [PATCH] i2c: tegra: Add delay before reset the controller

From: Alok Chauhan
Date: Fri Dec 23 2011 - 06:15:14 EST


Hi,

(Adding Laxman Dewangan)

>This change causes problems systems with some models of i2c TPMs, since the first transaction to them will always time out (TPM quirk), and the delay means that the tpm will have time to go back to sleep and thus timeout >even on the retry. So you'll never make progress.
Working on this.

-Alok


-----Original Message-----
From: Olof Johansson [mailto:olof@xxxxxxxxx]
Sent: Friday, December 23, 2011 2:48 AM
To: Alok Chauhan
Cc: khali@xxxxxxxxxxxx; ben-linux@xxxxxxxxx; Stephen Warren; bones@xxxxxxxxxxxx; paul.gortmaker@xxxxxxxxxxxxx; linux-i2c@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-tegra@xxxxxxxxxxxxxxx; dgreid@xxxxxxxxxx
Subject: Re: [PATCH] i2c: tegra: Add delay before reset the controller

Hi,

(Adding linux-tegra and Dylan Reid who was debugging this before)

On Thu, Dec 22, 2011 at 2:41 AM, Alok Chauhan <alokc@xxxxxxxxxx> wrote:
> From: Alok Chauhan <alokc@xxxxxxxxxx>
>
> In NACK error condition, I2C controller violates clock-to-data setup
> time before stop. In Software, because of this reset of controller is
> happening before I2C controller could complete STOP condition.
>
> Added worst case delay of 1 ms (assuming lowest clock frequency will
> be 1 KHZ) before reset the controller in case of NACK error.

This change causes problems systems with some models of i2c TPMs, since the first transaction to them will always time out (TPM quirk), and the delay means that the tpm will have time to go back to sleep and thus timeout even on the retry. So you'll never make progress.

In other words: this patch will break some systems and thus shouldn't be applied.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/