From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Thu, 10 Sep 2009 08:07:36 -0500 Subject: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable In-Reply-To: References: Message-ID: <4AA8FA18.20103@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Joakim Tjernlund wrote: > BTW, the fdr and dfsr calculations appears totally bogus. It seems > like the table is taken from some examples in AN2919 and it is pure luck > that it works most of the time. For me it does not work 100%, instead I get > random errors which hangs both the controller and the RTC device. Well, the problem is that for a given frequency, there are several values of fdr/dfsr that theoretically work. So I picked what I thought would be good values for dfsr, but maybe it's not possible to pick such values. A while back, someone posted a version of this code that computed the values of fdr/dfsr. I nack'd that patch because I thought the algorithm was too convoluted, but perhaps what we really need is a combination of sorts. The code should read the value of DFSR from the register, and then calculate an appropriate FDR to go with it. -- Timur Tabi Linux kernel developer at Freescale