[PATCH] I2C: i.MX: early: Use a custom delay on i.MX6

John Watts contact at jookia.org
Wed Feb 1 23:58:21 PST 2023


On Thu, Feb 02, 2023 at 08:35:27AM +0100, Sascha Hauer wrote:
> I rounded up to 100 cycles and rephrased this to be a little less i.MX6
> centric:
> 
> 	/*
> 	 * We lack udelay on the 32bit i.MX SoCs, so delay manually: On an
> 	 * i.MX6 with a 66Mhz I2C peripheral clock one cycle of this loop
> 	 * takes 1.30us. Let's be generous and round up to 100 cycles. Other
> 	 * i.MX SoCs do not have a higher peripheral clock, so we should be
> 	 * safe here as well.
> 	 */
> 
> In the end it doesn't hurt when it takes a little longer.

Makes sense. Thanks!

> Applied, thanks
> 
> Sascha

John.



More information about the barebox mailing list