From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 13 Jul 2011 23:51:26 +0200 Subject: [U-Boot] [PATCH] I2C: mxc_i2c rework In-Reply-To: <4E1DA41D.8080505@denx.de> References: <1310550794-27795-1-git-send-email-marek.vasut@gmail.com> <4E1DA41D.8080505@denx.de> Message-ID: <201107132351.26932.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday, July 13, 2011 03:56:45 PM Stefano Babic wrote: > On 07/13/2011 11:53 AM, Marek Vasut wrote: > > Rewrite the mxc_i2c driver. > > -- snip -- > > - while (!(readw(I2C_BASE + I2SR) & I2SR_IBB) && --timeout) > > + while (timeout--) { > > + if (readb(I2C_BASE + I2SR) & I2SR_IIF) { > > If we wait for completion, should we not check the ICF bit instead of > IIF, as done before your patch ? Hi, Stefano, for some reason, when I check for ICF, the i2c driver doesn't work. With IIF it does (and when IIF is asserted, so is ICF). Maybe ICF is asserted earlier or who knows. > > > +/* > > + * Start the controller > > + */ -- snip --