On Tue, Sep 01, 2009 at 01:09:26PM -0500, Timur Tabi wrote:
> Anton Vorontsov wrote:
>
> > - for (i = 0, p = &e; i < sizeof(e); i += 8, p += 8) {
> > + do {
> > ret = i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, i,
> > CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
> > - p, min((sizeof(e) - i), 8));
> > + (void *)&e + i, min((sizeof(e) - i), 8));
> > if (ret)
> > break;
> > udelay(5000); /* 5ms write cycle timing */
> > - }
> > + i += 8;
> > + } while (i < sizeof(e));
>
> Or we could remove the loop altogether and just do the write in one shot. Is
> there any reason to believe that any of Freescale's 8[356]xx boards can't
> handle a large I2C block write of about 50 bytes or so?
I guess "udelay(5000); /* 5ms write cycle timing */" hints that
it's EEPROM chip dependant, so has nothing to do with i2c controller
capabilities.
Thanks,
--
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot