[U-Boot-Users] get_timer on ppc and bugs related to calling it (fsl_i2c)

Kumar Gala galak at kernel.crashing.org
Tue Jul 29 18:27:01 CEST 2008


On Jul 29, 2008, at 9:48 AM, Kumar Gala wrote:

> In debugging moving the bss outside of the image on 85xx I run into in
> issue with the SPD code using fsl_i2c before we are running in ram and
> setup the BSS.
>
> It looks like i2c_wait4bus() [in fsl_i2c.c] calls get_timer().
>
> get_timer implemented in lib_ppc/interrupts.c and uses a global
> timestamp that exists in the BSS.  This seems pretty bad in that we
> have been just getting a bogus value for timestamp out of flash.
> Luckily we don't write timestamp until interrupts are enabled and at
> that point we've relocated to memory.
>
> However it seems like fsl_i2c.c should NOT be using get_timer().  Is
> there another global interface to get relative time that we can just
> use time base for?
>
> - k

Ok, I've got a patch that fixes fsl_i2c.c to use get_ticks and  
usec2ticks.  I'll be posting it shortly.

- k




More information about the U-Boot mailing list