From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable
Date: Thu, 10 Sep 2009 11:13:03 -0500 [thread overview]
Message-ID: <4AA9258F.8070402@freescale.com> (raw)
In-Reply-To: <OF4C79B629.D9D25607-ONC125762D.0056B7D9-C125762D.00574EF9@transmode.se>
Joakim Tjernlund wrote:
> This calculation does not seem to match AN2919.
When I wrote the code, AN2919 was much smaller than what you have today.
> Suppose one used only Table 7(almost what we have if you exclude dfsr!= 1)
> Table 7 is valid for 1 <= dfsr <=5 so how about replacing the current dfsr
> with:
> #ifdef __PPC__
> u8 dfsr;
> dfsr = (5*(i2c_clk/1000))/(100000);
> if (dfsr > 5)
> dfsr = 5;
> if (!dfsr)
> dfsr = 1;
> debug("i2c_clk:%d, dfsr:%d\n", i2c_clk, dfsr);
> writeb(dfsr, &dev->dfsrr); /* set default filter */
> #endif
The value of FDR is dependent on the value of DFSR, so if I calculate DFSR, I have to also calculate FDR. This means the table goes away. I'm okay with that (since my table is no longer a viable approach, it seems), but it's more work than I'm willing to do at the moment. Especically since this is going to need a lot of testing before I'm willing to push it.
Another way of handling this is to edit the table so that it only includes values of DFSR between 1 and 5, which is (unfortunately) *every* entry with a DFSR != 1.
--
Timur Tabi
Linux kernel developer at Freescale
next prev parent reply other threads:[~2009-09-10 16:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 9:19 [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable Joakim Tjernlund
2009-09-09 14:24 ` Timur Tabi
2009-09-09 14:33 ` Joakim Tjernlund
2009-09-10 8:15 ` Joakim Tjernlund
2009-09-10 13:07 ` Timur Tabi
2009-09-10 13:20 ` Joakim Tjernlund
2009-09-10 13:29 ` Timur Tabi
2009-09-10 13:58 ` Joakim Tjernlund
2009-09-10 15:22 ` Timur Tabi
2009-09-10 15:46 ` Joakim Tjernlund
2009-09-10 15:57 ` Timur Tabi
2009-09-10 14:57 ` Joakim Tjernlund
2009-09-10 15:26 ` Timur Tabi
2009-09-10 15:53 ` Joakim Tjernlund
2009-09-10 16:13 ` Timur Tabi [this message]
2009-09-10 16:30 ` Joakim Tjernlund
2009-09-10 17:13 ` Joakim Tjernlund
2009-09-11 8:44 ` Joakim Tjernlund
[not found] ` <4AAA6ACD.9040905@free <4AAE55FA.4070702@freescale.com>
2009-09-11 15:20 ` Timur Tabi
2009-09-14 13:53 ` Detlev Zundel
2009-09-14 14:18 ` Wolfgang Grandegger
2009-09-14 14:40 ` Timur Tabi
2009-09-14 15:54 ` Joakim Tjernlund
2009-09-15 11:53 ` Wolfgang Grandegger
2009-09-15 12:24 ` Joakim Tjernlund
2009-09-15 18:53 ` Joakim Tjernlund
2009-09-14 16:01 ` Wolfgang Grandegger
2009-09-14 16:18 ` Joakim Tjernlund
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=4AA9258F.8070402@freescale.com \
--to=timur@freescale.com \
--cc=u-boot@lists.denx.de \
/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.