[U-Boot] [PATCH v5 0/8] Extend LPC32xx functionality and add LPC32xx-based work_92015 board

Simon Glass sjg at chromium.org
Wed Apr 8 05:20:22 CEST 2015


Hi Albert,

On 24 March 2015 at 02:09, Albert ARIBAUD <albert.aribaud at 3adev.fr> wrote:
> Bonjour Simon,
>
> Le Mon, 23 Mar 2015 17:55:56 -0600, Simon Glass <sjg at chromium.org> a
> écrit :
>
>> Hi Albert,
>>
>> On 16 March 2015 at 14:28, Albert ARIBAUD <albert.u.boot at aribaud.net> wrote:
>> > Hello Simon,
>> >
>> > On Mon, 16 Mar 2015 11:40:54 -0600, Simon Glass <sjg at chromium.org>
>> > wrote:
>> >> Hi Anish,
>> >>
>> >> On 16 March 2015 at 10:28, Anish Khurana <anish.khurana130181 at gmail.com> wrote:
>> >> > Hi Simon,
>> >> >
>> >> > can you please share the git branch so that I can also review it. I am
>> >> > writing for LPC2148 board.
>> >>
>> >> This is Albert's work. Once he shares if I am sure it will be public.
>> >
>> > Since this is a derivative of the patch series I've posted here, I
>> > could hardly see a problem in making it public anyway.
>> >
>> > I've pushed the broken series, the one with I2C DM and COMPAT, as
>> > branch dm-i2c of repo u-boot-arm. Anyone feel free to fiddle with
>> > it.
>>
>> This does not build for me - e.g. lpc32xx_i2c_set_bus_speed() uses a
>> struct i2c_adaptor * when it should use struct udevice *.
>>
>> Do I have the right version?
>
> Yes you have, but it most probably misses attempts I did at fixing
> the LPC32XX driver, sorry.
>
> Since the problem is not with this driver /per se/, try with removing
> the lpc32xx driver from the build altogether; you should end up with
> "only" these errors:
>
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/drivers/rtc/ds1374.c:
>> In function ‘rtc_read’:
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/drivers/rtc/ds1374.c:217:2:
>> warning: implicit declaration of function ‘i2c_reg_read’
>> [-Wimplicit-function-declaration]
>>   return (i2c_reg_read (CONFIG_SYS_I2C_RTC_ADDR, reg));
>>   ^
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/drivers/rtc/ds1374.c:
>> In function ‘rtc_write’:
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/drivers/rtc/ds1374.c:224:3:
>> warning: implicit declaration of function ‘i2c_reg_write’
>> [-Wimplicit-function-declaration]
>>    i2c_reg_write (CONFIG_SYS_I2C_RTC_ADDR, reg, val);
>>    ^
>> make[1]: *** [drivers/i2c] Error 2
>> make[1]: *** Waiting for unfinished jobs....
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_date.c:
>> In function ‘do_date’:
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_date.c:42:14:
>> error: ‘CONFIG_SYS_RTC_BUS_NUM’ undeclared (first use in this
>> function)
>>   I2C_SET_BUS(CONFIG_SYS_RTC_BUS_NUM);
>>               ^
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_date.c:42:14:
>> note: each undeclared identifier is reported only once for each
>> function it appears in
>> make[2]: *** [common/cmd_date.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_eeprom.c:
>> In function ‘eeprom_read’:
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_eeprom.c:155:16:
>> error: ‘I2C_RXTX_LEN’ undeclared (first use in this function)
>>    if (maxlen > I2C_RXTX_LEN)
>>                 ^
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_eeprom.c:155:16:
>> note: each undeclared identifier is reported only once for each
>> function it appears in
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_eeprom.c:
>> In function ‘eeprom_write’:
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_eeprom.c:253:16:
>> error: ‘I2C_RXTX_LEN’ undeclared (first use in this function)
>>    if (maxlen > I2C_RXTX_LEN)
>>                 ^
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_dtt.c:
>> In function ‘dtt_init’:
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_dtt.c:41:14:
>> error: ‘CONFIG_SYS_DTT_BUS_NUM’ undeclared (first use in this
>> function)
>>   I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM);
>>               ^
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_dtt.c:41:14:
>> note: each undeclared identifier is reported only once for each
>> function it appears in
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_dtt.c:
>> In function ‘dtt_i2c’:
>> /usr/local/google/c/cosarm/src/third_party/u-boot/files/common/cmd_dtt.c:65:14:
>> error: ‘CONFIG_SYS_DTT_BUS_NUM’ undeclared (first use in this
>> function)
>>   I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM);
>>               ^
>> make[2]: *** [common/cmd_eeprom.o] Error 1
>> make[2]: *** [common/cmd_dtt.o] Error 1
>> make[1]: *** [common] Error 2
>> make[1]: *** wait: No child processes.  Stop.
>
> Of course the link stage will probably fail, but I guess once the
> compiler stage works for ds1374, date, eeprom and dtt, the linking
> should work.

Well the problem is that we don't have driver model support in rtc, We
do have an eeprom uclass, but it is currently implemented only for
sandbox. We don't have a hwmon uclass (although there is thermal, and
I wonder if that is similar?

I'd be willing to create an rtc uclass and convert over ds1374 if you
are happy to test it?

Regards,
Simon


More information about the U-Boot mailing list