In message <[EMAIL PROTECTED]> you wrote:
> Prevent i2c_init() in fsl_i2c.c from writing to the data segment before
> relocation. Commit d8c82db4 added the ability for i2c_init() to program the
> I2C bus speed and save the value in i2c_bus_speed[], which is a global
> variable. It is an error to
In message <[EMAIL PROTECTED]> you wrote:
>
> I guess in some cases a board with fixed DDR would not
> need to initialize the I2C controller until after
> relocation.
If ever - let's keep in mind that U-Boot initializes only devices
which it actually uses itself.
Best regards,
Wolfgang Denk
--
In message <[EMAIL PROTECTED]> you wrote:
>
> > + if (gd->flags & GD_FLG_RELOC)
> Maybe a macro will more clear like
> if(is_relacated())
Actually, I disagree here.
Also, for consistency you would have to change many other uses of
(gd->flags & GD_FLG_???) as well.
Let's keep as is.
Best
Timur Tabi wrote:
> David Hawkins wrote:
>> Hi Timur,
[snip]
>> 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.
>
> I suppose we could do that.
That won't work for soft (bit-bang
David Hawkins wrote:
> 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 relocati
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
Jean-Christophe PLAGNIOL-VILLARD wrote:
> Maybe a macro will more clear like
> if(is_relacated())
> i2c_bus_speed[0] = temp;
I'm just following the same pattern as other code. The code "if (gd->flags &
GD_FLG_RELOC)" is used in a number of other places.
Someone else can crea
On 14:26 Mon 21 Jul , Timur Tabi wrote:
> Prevent i2c_init() in fsl_i2c.c from writing to the data segment before
> relocation. Commit d8c82db4 added the ability for i2c_init() to program the
> I2C bus speed and save the value in i2c_bus_speed[], which is a global
> variable. It is an error t