[U-Boot] [PATCH] w1: fix build without CONFIG_W1_EEPROM
Martin Fuzzey
martin.fuzzey at flowbird.group
Tue Oct 23 14:09:46 UTC 2018
On 23/10/18 10:40, Eugen.Hristev at microchip.com wrote:
>
> 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
>
Yes sure that's great.
Somewhat diverting this thread....
I noticed that currently "w1 read" displays the data in hex with "%x",
which means it prints just one character if in range 00-0f.
And as there is no seperator the output isn't currently useful.
That's a trivial fix of course but it got me thinking about what do we
want to "w1 read" to do?
A lot of other storage reading commands use "read" to mean "read to
memory" and take a destination RAM address parameter.
Eg mmc read, sf read, ...
There are counter examples though like "mii read" or "pmic read" which
just print the output but they don't read aribitary
user defined data like an eeprom.
So I was wondering if it would be better to modify "w1 read" to mean
"read to memory" and add a new "w1 dump" command
to do what "w1 read" currently does (as it is much more convenient for
quickly checking the eeprom contents than
having to use md).
The type of use case I'm thinking of for "read to memory" is if someone
wants to put a device tree blob on an eeprom.
What do you think?
Regards,
Martin
>> Regards,
>>
>> Martin
>>
>>
More information about the U-Boot
mailing list