Hi Timur,

> -     i2c_bus_speed[0] = set_i2c_bus_speed(dev, gd->i2c1_clk, speed);
> +     temp = set_i2c_bus_speed(dev, gd->i2c1_clk, speed);
> +     if (gd->flags & GD_FLG_RELOC)
> +             i2c_bus_speed[0] = temp;

Does i2c_init() get called again after relocation?

If the I2C code is only ever used during flash startup,
then this is dead code.

The I2C controller needs to get initialized to read the
I2C SPD EEPROM, so that it can then setup DDR.

I guess in some cases a board with fixed DDR would not
need to initialize the I2C controller until after
relocation.

If you need I2C speed tracking code, why not just re-read
the I2C controller registers, and determine the speed from
there? That is independent of relocation.

Cheers,
Dave

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to