[U-Boot] [PATCH v3 0/8] hwconfig and some its users

Anton Vorontsov avorontsov at ru.mvista.com
Thu Jun 11 19:01:23 CEST 2009


On Thu, Jun 11, 2009 at 10:55:33AM -0500, Kim Phillips wrote:
[...]
> if you don't want to type, things like this are possible but they
> have to depend on the order given:
> 
> dr_usb.mode = host; .phy_type = ulpi; esdhc;
> 
> however when automating/scripting concatenation of them, it's useful
> to not have to depend on their order:
> 
> dr_usb.mode = host; esdhc; dr_usb.phy_type = ulpi;
> 
> ...so as you can see I've come up with the dot ('.') in order to
> eliminate the less familiar (and therefore more misleading) colon
> (':').
> 
> What do you think?

"dr_usb.mode = host; .phy_type = ulpi; esdhc;" <- that isn't obvious
that .phy_type is a continuation of dr_usb. :-/

It's kind of more special format then the original...

> Kim
> 
> p.s., your representation above is the best, but now it's starting to
> look like the frontend to a C compiler:
> 
> "dr_usb { mode = host; phy_type = ulpi; }; esdhc;"

I like it too:
http://lists.denx.de/pipermail/u-boot/2009-May/051875.html

Wolfgang replied that we should keep things simple, and if we
want something complicated we should use device-tree:
http://lists.denx.de/pipermail/u-boot/2009-May/051886.html

Since hwconfig is designed to be *simple* hw configuration
interface, I tend to agree with Wolfgang.

Technically we don't need hwconfig, it is only needed to make
configuration easier for reference boards that have quite a
lot of hw options. Hwconfig can be substituted by

# mw 0x... 0x... # manually modify some bcsrs
# mw 0x... 0x... # manually modify pinmux
# fdt addr ... # now manually fixup the device tree
# fdt set ... ...
# fdt mknode ... ...


In a final product you barely need the hwconfig stuff, because
product boards only define things they use (and that's why we
must keep things working without CONFIG_HWCONFIG).

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2


More information about the U-Boot mailing list