[U-Boot-Users] [PATCH 1/1] Fix I2C for m547x/548x and m5445x processors.

Luigi 'Comio' Mantellini
2008-07-09T13:40:18Z

On mer, 2008-07-09 at 09:25 -0400, Timur Tabi wrote:

> On Jul 7, 2008, at 10:17 AM, Luigi 'Comio' Mantellini wrote:
>
> > ---
> > drivers/i2c/fsl_i2c.c | 68 ++++++++++++++++++++++++++++++++++++++++
> > +++++++++
> > 1 files changed, 68 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
> > index 0690340..8fd73c0 100644
> > --- a/drivers/i2c/fsl_i2c.c
> > +++ b/drivers/i2c/fsl_i2c.c
> > @@ -78,6 +78,73 @@ static const struct fsl_i2c *i2c_dev[2] = {

...

> > + {.fdr=0x3B, .divider=1024}, {.fdr=0x18, .divider=1152},
> > {.fdr=0x19, .divider=1280},
> > + /*{.fdr=0x3C, .divider=1280},*/ {.fdr=0x1A, .divider=1536}, /
> > *{.fdr=0x3D, .divider=1536},*/

....

> NAK. There's a better way to do this. Don't just copy/paste my data
> structures and comment-out specific fields like this.
>

The values are from the 547x manual because the fsl_i2c on coldfire is a
little different (e.g. there isn't the default filter register).
The entries commented are just synonymous of others. For example the
divider 1280 can be obtained using both the fdr values 0x19 and 0x3C
(always on coldfire cpus).

> I'm on vacation this week. Next week, I'll take a closer look at your
> patch and suggest something better.
>

Thanks, I just reported a problem (i think)... the patches is just the
quick solution that I have adopted on my application.

Best regards and have a good vacation!

luigi

> What is the reason you are commenting-out those specific entries in
> fsl_i2c_speed_map[]?

Industrie Dial Face S.p.A.
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4
20068 Peschiera Borromeo (MI), Italy
Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
E-mail: luigi.mantellini at idf-hit.com
GPG fingerprint: 3DD1 7B71 FBDF 6376
1B4A
B003 175F E979 907E
1650
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080709/d7ad416b/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idf_logo.gif
Type: image/gif
Size: 4122 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080709/d7ad416b/attachment.gif