blob: 5408a22bb6a4ae37340331cb513f7c3343d3b22d [file] [log] [blame]
Heiko Schocherab68f4d2010-02-10 08:03:21 +01001This implements a simple hwconfig infrastructure: an
2interface for software knobs to control hardware.
3
4This a is very simple implementation, i.e. it is implemented
5via the `hwconfig' environment variable. Later we could write
6some "hwconfig <enable|disable|list>" commands, ncurses
7interface for Award BIOS-like interface, and frame-buffer
8interface for AMI GUI[1] BIOS-like interface with mouse
9support[2].
10
11Current implementation details/limitations:
12
131. Doesn't support options dependencies and mutual exclusion.
14 We can implement this by integrating apt-get[3] into Das
15 U-Boot. But I haven't bothered yet.
16
172. Since we don't implement a hwconfig command, i.e. we're working
Robert P. J. Day1bce2ae2013-09-16 07:15:45 -040018 with the environment directly, there is no way to tell that
Heiko Schocherab68f4d2010-02-10 08:03:21 +010019 toggling a particular option will need a reboot to take
20 effect. So, for now it's advised to always reboot the
21 target after modifying the hwconfig variable.
22
233. We support hwconfig options with arguments. For example,
24
25 set hwconfig "dr_usb:mode=peripheral,phy_type=ulpi"
26
27 This selects three hwconfig options:
28 1. dr_usb - enable Dual-Role USB controller;
29 2. dr_usb_mode:peripheral - USB in Function mode;
30 3. dr_usb_phy_type:ulpi - USB should work with ULPI PHYs.
31
32The purpose of this simple implementation is to refine the
33internal API and then we can continue improving the user
34experience by adding more mature interfaces, like a hwconfig
35command with bells and whistles. Or not adding, if we feel
36that the current interface fits people's needs.
37
38[1] http://en.wikipedia.org/wiki/American_Megatrends
39[2] Regarding ncurses and GUI with mouse support -- I'm just
40 kidding.
41[3] The comment regarding apt-get is also a joke, meaning that
42 dependency tracking could be non-trivial. For example, for
43 enabling HW feature X we may need to disable Y, and turn Z
44 into reduced mode (like RMII-only interface for ethernet,
45 no MII).
46
47 It's quite trivial to implement simple cases though.