From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 22 Sep 2011 07:47:06 +0200 Subject: [U-Boot] [PATCH 4/4 V4] I2C: mxc_i2c rework In-Reply-To: References: <1316485855-29782-1-git-send-email-marek.vasut@gmail.com> <201109220543.27351.marek.vasut@gmail.com> Message-ID: <201109220747.06315.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 22, 2011 06:54:22 AM Jason Hui wrote: > Hi, Marek, > > On Thu, Sep 22, 2011 at 11:43 AM, Marek Vasut wrote: > > On Thursday, September 22, 2011 04:45:20 AM Jason Hui wrote: > >> Hi, Marek, > >> > >> On Tue, Sep 20, 2011 at 10:35 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 ;-) > >> > > >> > Signed-off-by: Marek Vasut > >> > Cc: Stefano Babic > >> > Cc: Heiko Schocher > >> > Cc: Jason Hui > >> > --- > >> > drivers/i2c/mxc_i2c.c | 422 > >> > +++++++++++++++++++++++++++++++++---------------- 1 files changed, 289 > >> > insertions(+), 133 deletions(-) > >> > > >> > V2: Use PERCLK as a source. > >> > > >> > V3: Remove forgotten unused variables. > >> > > >> > V4: Add missing Cc field to commit message > >> > >> Test result on i.mx53evk, it shows that this patch does not work well, > >> here is the log: > >> > >> MX53EVK U-Boot > pmic dump 10 > >> PMIC ID: 0x0000ffff [Rev: unknown] > >> > >> 0x00: 0001ffff 00ffffff 0039ffff 0000ffff 00ffffff 0000ffff 0000ffff > >> 0000ffff 0x08: 0000ffff 0000ffff 0000ffff 0000ffff 0000ffff 0000ffff > >> 0000ffff 0040ffff > > > > It's strange, reading the registers with i2c md seems to work. > > Here is i2c md output: > MX53EVK U-Boot > i2c md 8 0 > 0000: 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > > seems not ok. 8 seems certainly not ok since the pmic is at 0x48 > > Jason Liu