
On 23.10.2018 11:31, Martin Fuzzey wrote:
On 23/10/18 09:07, Eugen.Hristev@microchip.com wrote:
On 22.10.2018 19:51, Martin Fuzzey wrote:
Building with CONFIG_W1 and CONFIG_CMD_W1 but without CONFIG_W1_EEPROM fails with drivers/w1/w1-uclass.c:104: undefined reference to `w1_eeprom_register_new_device' cmd/w1.c:93: undefined reference to `w1_eeprom_read_buf'
Fix this.
I would prefer if you let the w1 read command to be accessible regardless if CONFIG_W1_EEPROM is defined or not. Hence have only the w1 eeprom reads under the ifdef... The w1_read checks for devices anyway and for the bus, so it should print invalid bus/device if nothing is present there. Any opinion on this ?
I don't really have a strong opinion on this.
Completely removing non implemented commands seems to be a common thing to do in u-boot (cmd/i2c.c for instance) presumably to keep the image size as small as possible. But for the one wire case the code space saving is likely to be small and, currently at least, there is little point buiding without CONFIG_W1_EEPROM, not sure if that will change some day - of course there are other types of one wire devices like various sensors but they are probably of less interest in the context of a bootloader.
Let's wait a bit and see what Maxime or anyone else has to say about this.
I tried as much as possible to decouple the W1 bus from the W1 EEPROM memories. It is possible that we will have a different framework for EEPROMs that will include both 1wire and i2c eeproms, and then the interfacing would be pretty easy to change to.
That's why I am thinking that w1 bus read should not be much affected if the 1w EEPROMs are unknown to U-boot
Regards,
Martin