From: Tony Lindgren <tony@atomide.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Komal Shah <komal_shah802003@yahoo.com>,
David Brownell <david-b@pacbell.net>,
r-woodruff2@ti.com, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@osdl.org>, Greg KH <gregkh@suse.de>,
i2c@lm-sensors.org
Subject: Re: [PATCH] OMAP: I2C driver for TI OMAP boards #3
Date: Thu, 10 Aug 2006 16:19:26 +0300 [thread overview]
Message-ID: <20060810131925.GJ30195@atomide.com> (raw)
In-Reply-To: <20060810102944.a12329b9.khali@linux-fr.org>
* Jean Delvare <khali@linux-fr.org> [060810 11:30]:
> Hi Tony, Komal,
>
> > Hmmm, this sounds like a bug somewhere. TRM for 5912 says the I2C clock
> > must be prescaled to be between 7 - 12 MHz [1]. The XOR input clock is
> > typically 12, 13 or 19.2 MHz. So we should have code that produces:
> >
> > XOR Mhz Divider Prescaler
> > 12 1 0
> > 13 2 1
> > 19.2 2 1
>
> Not that 13 MHz cannot actually be prescaled between 7 and 12 MHz, no
> matter how you look at it.
True :) But that's what the docs say..
> > Then again the original old code produces something different too [2]...
> >
> > I suspect the original code had some hw workarounds and and later code
> > may have a conversion bug somewhere :)
> >
> > I suggest we keep the code as is for now since it's known to work on
> > all omaps, and then submit a follow-up patch later once we have
> > verified that that code based on the TRM works on all omaps.
>
> I've now taken Komal's patch (#4). Here is a proposed patch which brings
> the prescaler computation formula in line with your comment and table
> above. It could be applied on top of Komal's patch unless it causes a
> problem on some of the OMAP systems. For XOR = 13 MHz, it changes the
> prescaler from 0 to 1. For XOR = 19.2 MHz it changes the prescaler from
> 2 to 1.
OK cool. As far as I'm concerned, I'm fine with it too:
Signed-off-by: Tony Lindgren <tony@atomide.com>
> I don't have any hardware to test it, though. If it happens to be
> better to be slightly over 12 MHz than slightly below 7 MHz, the
> "> 12000000" condition below can be replaced with "> 14000000".
Thanks, we'll test it on various omaps and let you know if it works.
Tony
next prev parent reply other threads:[~2006-08-10 13:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1154689868.12791.267626769@webmail.messagingengine.com>
2006-08-05 8:31 ` [PATCH] OMAP: I2C driver for TI OMAP boards #3 Jean Delvare
2006-08-07 14:58 ` Tony Lindgren
2006-08-08 12:57 ` Komal Shah
2006-08-08 13:09 ` Jean Delvare
2006-08-10 8:29 ` Jean Delvare
2006-08-10 13:19 ` Tony Lindgren [this message]
2006-12-04 17:49 ` Jean Delvare
2006-12-06 22:45 ` Tony Lindgren
2006-08-06 14:35 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060810131925.GJ30195@atomide.com \
--to=tony@atomide.com \
--cc=akpm@osdl.org \
--cc=david-b@pacbell.net \
--cc=gregkh@suse.de \
--cc=i2c@lm-sensors.org \
--cc=khali@linux-fr.org \
--cc=komal_shah802003@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=r-woodruff2@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.