[U-Boot] Revert "cmd: Kconfig: Do not include EEPROM if DM_I2C is used without DM_I2C_COMPAT"

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Mon Mar 25 20:20:05 UTC 2019



On 25.03.19 18:17, Tom Rini wrote:
> On Mon, Mar 25, 2019 at 05:42:13PM +0100, Simon Goldschmidt wrote:
>> Tom Rini <trini at konsulko.com> schrieb am Mo., 25. März 2019, 16:43:
>>
>>> On Thu, Mar 14, 2019 at 09:57:42PM +0100, Simon Goldschmidt wrote:
>>>
>>>> This reverts commit 65a97e7fcf54feb7c4ebe1aee8a572830af4cf51.
>>>>
>>>> The 'eeprom' command has been converted to work with DM_I2C in a patch
>>>> submitted around the same time as this commit:
>>>> commit 0c07a9b4078d ("eeprom: Add device model based I2C support to
>>> eeprom command")
>>>>
>>>> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
>>>> ---
>>>>
>>>>   cmd/Kconfig | 1 -
>>>>   1 file changed, 1 deletion(-)
>>>
>>> As is, nope:
>>> make O=/home/jenkins/u-boot/build-am335x_evm -s am335x_evm_defconfig
>>> make O=/home/jenkins/u-boot/build-am335x_evm -s -j8
>>> ../cmd/eeprom.c: In function 'eeprom_rw_block':
>>> ../cmd/eeprom.c:149:9: warning: implicit declaration of function
>>> 'i2c_read'; did you mean 'ide_read'? [-Wimplicit-function-declaration]
>>>     ret = i2c_read(addr[0], offset, alen - 1, buffer, len);
>>>           ^~~~~~~~
>>>           ide_read
>>> ../cmd/eeprom.c:151:9: warning: implicit declaration of function
>>> 'i2c_write'; did you mean 'ide_write'? [-Wimplicit-function-declaration]
>>>     ret = i2c_write(addr[0], offset, alen - 1, buffer, len);
>>>           ^~~~~~~~~
>>>           ide_write
>>> cmd/built-in.o: In function `eeprom_rw_block':
>>> /home/jenkins/u-boot/build-am335x_evm/../cmd/eeprom.c:149: undefined
>>> reference to `i2c_read'
>>> /home/jenkins/u-boot/build-am335x_evm/../cmd/eeprom.c:151: undefined
>>> reference to `i2c_write'
>>> /home/jenkins/u-boot/Makefile:1497: recipe for target 'u-boot' failed
>>> make[1]: *** [u-boot] Error 1
>>> Makefile:148: recipe for target 'sub-make' failed
>>> make: *** [sub-make] Error 2
>>>
>>
>> Ehrm, ok, let me check that. Do you have a Travis build with more errors or
>> is this the only one?
> 
> This was in my local jenkins setup as that's on a board I have and test.
> There was a travis run but I force-pushed over it to test my branch
> again.

OK, so it turns out the current code isn't fully convert cmd/eeprom to 
DM as the code now still relies on CONFIG_SYS_I2C_EEPROM_BUS being defined.

I'll prepare a patch to make it work without that define. Being like 
that, it's for the next merge window, of course.

Regards,
Simon


More information about the U-Boot mailing list