[U-Boot] [PATCH 5/5] Add env var giving the board revision
Benoît Thébaudeau
benoit.thebaudeau at advansee.com
Sat Aug 11 21:11:32 CEST 2012
Hi Mike,
On Saturday 11 August 2012 19:48:33 Mike Frysinger wrote:
> On Friday 10 August 2012 13:46:08 Benoît Thébaudeau wrote:
> > The board revision can be a useful env var, like its serial number.
>
> unless i missed something, there is no standard "rev" variable today,
> which
> means this change can easily break anyone who happens to already be
> using a
> variable named "rev".
I have searched such a usage in the tree, but did not find any, so this should
not break anything.
> i also don't see value here in hardcoding another variable that:
> - no one is setting
Well, I am setting it for my local boards that are not yet ready for upstream,
so I thought that it could also be useful for others.
> - is way too generic (rev of *what* ? cpu ? board ? u-boot ?
> something else ?)
It could be renamed to hwrev, board_rev or whatever you like. This is not really
an issue. Its purpose is the board hardware revision. The CPU revision can often
be read from the CPU and is printed upon startup. U-Boot's revision already has
the ver env var and the version command. On the contrary, the board revision can
not always be determined by analyzing the hardware (OTP, fuses, EEPROM, GPIOs,
etc.), so it can be useful to have an official env var to store it in the backed
up env, exactly like for the serial# env var that can not always be stored in
some dedicated hardware location.
> - adds nothing on top of the existing "serial#"
This is all the contrary. If you think that a rev variable would be useless,
then you can also remove the serial# variable. And if you mean that a rev
variable would duplicate the serial# information, this is wrong: The serial#
variable gives a UID for a board, while the rev variable would give the hardware
revision of that board. These are completely different things, and the board
revision can not always be easily derived from its serial number.
> so NAK from me
> -mike
Best regards,
Benoît
More information about the U-Boot
mailing list