[U-Boot] [PATCH v3] OMAP: I2C: New read, write and probe functions

Lubomir Popov lpopov at mm-sol.com
Thu May 30 21:34:07 CEST 2013


Hi Tom,

> On Thu, May 30, 2013 at 10:37:42AM -0400, Tom Rini wrote:
>> On Thu, May 30, 2013 at 01:24:42AM +0300, Lubomir Popov wrote:
>>
>> > Tested on OMAP4/5 only, but should work on older OMAPs and
>> > derivatives as well.
>> >
>> > - Rewritten i2c_read to operate correctly with all types of chips
>> >   (old function could not read consistent data from some I2C slaves).
>> > - Optimised i2c_write.
>> > - New i2c_probe, optionally selectable via CONFIG_I2C_PROBE_WRITE,
>> >   performs write access vs read. The old probe could hang the system
>> >   under certain conditions (e.g. unconfigured pads).
>> > - The read/write/probe functions try to identify unconfigured bus.
>> > - Status functions now read irqstatus_raw as per TRM guidelines
>> >   (except for OMAP243X and OMAP34XX).
>> > - Driver now supports up to I2C5 (OMAP5).
>> >
>> > Signed-off-by: Lubomir Popov <lpopov at mm-sol.com>
>>
>> With CONFIG_I2C_PROBE_WRITE set:
>> Tested-by: Tom Rini <trini at ti.com> on Beagleboard / Beagleboard xM
>
> But, crap, breaks am335x_evm (and probably beaglebones, etc).  I'll
> dig into this more to see if I can spot something obvious tomorrow.

How does it actually break? Does not build, or I2C is not working,
or what?

If I2C is not working, could you try changing the condition

#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)

to

#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || defined(CONFIG_AM33XX)

found in 3 places in driver (lines 155, 554, 585) and test again?

Thanks,
Lubo



More information about the U-Boot mailing list