From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 15 Sep 2011 04:07:39 +0200 Subject: [U-Boot] [PATCH V3+] I2C: mxc_i2c rework In-Reply-To: References: <1310594283-19819-1-git-send-email-marek.vasut@gmail.com> <201109142139.29539.marek.vasut@gmail.com> Message-ID: <201109150407.39333.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 Thursday, September 15, 2011 03:43:42 AM Jason Hui wrote: > On Thu, Sep 15, 2011 at 3:39 AM, Marek Vasut wrote: > > On Friday, July 29, 2011 08:55:14 AM Jason Hui wrote: > >> Hi, Marek, > >> > >> On Thu, Jul 14, 2011 at 5:58 AM, Marek Vasut wrote: > >> > Rewrite the mxc_i2c driver. > >> > * This version is much closer to Linux implementation. > >> > * Fixes IPG_PERCLK being incorrectly used as clock source > >> > * Fixes behaviour of the driver on iMX51 > >> > * Clean up coding style a bit ;-) > >> > >> why you change i2c clock from IPG_PERCLK to IPG_CLK? > >> > >> [...] > > > > Ok, I investigated a bit deeper and I suspect the clock.c is the culprit. > > > > Apparently, the PERCLK doesn't run at the frequency the clock.c reports > > it runs on. Therefore, the i2c miscalculates the divider etc -- falling > > crap model (waterfall model). > > But apparently, the i2c function clock should be IPG_PERCLK not IPG > clock. And Linux also fix it already. Then there's bulls**t in your mx51 and mx53 datasheet or what ? besides, PERCLK is faster than IPGCLK on MX51 so it makes even less sense! Can you please talk to the HW guys or whatever to clear this once and for all ? I smell noone really knows where the clock are sourced from and all this crap is just blind guessing.