[PATCH] I2C: i.MX: early: Use internal udelay

John Watts contact at jookia.org
Mon Jan 30 22:33:41 PST 2023


On Tue, Jan 31, 2023 at 07:14:40AM +0100, Sascha Hauer wrote:
> On Tue, Jan 31, 2023 at 05:42:29AM +1100, John Watts wrote:
> > On Mon, Jan 30, 2023 at 05:36:58PM +0100, Sascha Hauer wrote:
> > > You can't disable MMU during runtime, but you can compile without MMU
> > > support, just disable CONFIG_MMU. However, the early I2C code already
> > > runs with MMU disabled, can't you just put in some test code there?
> > 
> > This is going to sound really silly but I'm not sure how to time the code
> > without a clock. I guess grabserial?
> 
> You could udelay(10000000) and measure the time with a stopwatch.
> That should be accurate enough for this purpose already, in the end
> the time will differ anyway between SoCs.
> 
> If you want to measure more exactly we have this little perl script
> which prints a timestamp for each line printed.

Right I shall try this- though I do wonder if this is a lost cause if the bus
clock changes in future i.MX chips.

Unless this is specific to the I2C clock. But I was under the assumption the
registers aren't dependent on the clock.

> Sascha

John.



More information about the barebox mailing list