[U-Boot] MPC8572E I2C bus speed after emulator reset
Timur Tabi
timur at freescale.com
Fri Mar 27 18:57:39 CET 2009
On Fri, Mar 27, 2009 at 11:52 AM, Scott Coulter
<scott.coulter at cyclone.com> wrote:
> I have an older version of U-boot for the board which is based of the
> initial port that Kumar did (no MP support, etc.). With this version of
> U-boot in flash, the "inn" "go" sequence works fine. The only thing
> that I can think of is that the older U-boot has a different init
> sequence.
You're right, it does. I wrote the new code. :-)
Previously, U-Boot programmed the same values into the FDR and DFSR
registers, regardless of the input clock rate or whatever divider the
SOC used. CONFIG_SYS_I2C_SPEED was ignored.
The new code uses a lookup table to determine the best values for FDR
and DFSR for a given input clock rate. It tries to take into account
the actual divider that your specific SOC uses. This is done in
function get_clocks(). It's possible that the divider is
miscalculated.
> Does anyone know of way to ensure that the I2C input clock is stable
> before attempting I2C operations?
What is the value of CONFIG_SYS_I2C_SPEED in your board header file?
What values does function set_i2c_bus_speed() in fsl_i2c.c program
into the FDR and DFSR registers?
--
Timur Tabi
Linux kernel developer at Freescale
More information about the U-Boot
mailing list