u-boot/common
Anton Vorontsov 93f9dcf9e8 Add simple hwconfig infrastructure
This patch implements simple hwconfig infrastructure: an
interface for software knobs to control a hardware.

This is very simple implementation, i.e. it is implemented
via `hwconfig' environment variable. Later we could write
some "hwconfig <enable|disable|list>" commands, ncurses
interface for Award BIOS-like interface, and frame-buffer
interface for AMI GUI[1] BIOS-like interface with mouse
support[2].

Current implementation details/limitations:

1. Doesn't support options dependencies and mutual exclusion.
   We can implement this by integrating apt-get[3] into the
   u-boot. But I didn't bother yet.

2. Since we don't implement hwconfig command, i.e. we're working
   with the environement directly, there is no way to tell that
   toggling a particular option will need a reboot to take
   an effect. So, for now it's advised to always reboot the
   target after modifying hwconfig variable.

3. We support hwconfig options with arguments. For example,

   set hwconfig dr_usb:mode=peripheral,phy_type=ulpi

   That means:
   - dr_usb - enable Dual-Role USB controller;
   - dr_usb:mode=peripheral - USB in Function mode;
   - dr_usb:phy_type=ulpi - USB should work with ULPI PHYs;

The purpose of this simple implementation is to define some
internal API and then we can continue improving user experience
by adding more mature interface, like hwconfig command with
bells and whistles. Or not adding, if we feel that current
interface fits its needs.

[1] http://en.wikipedia.org/wiki/American_Megatrends
[2] Regarding ncurses and GUI with mouse support -- I'm just
    kidding.
[3] The comment regarding apt-get is also a joke, meaning that
    dependency tracking could be non-trivial. For example, for
    enabling HW feature X we may need to disable Y, and turn Z
    into reduced mode (like RMII-only interface for ethernet,
    no MII).

    It's quite trivial to implement simple cases though.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-16 22:23:53 +02:00
..
Makefile Add simple hwconfig infrastructure 2009-07-16 22:23:53 +02:00
bedbug.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
circbuf.c Add support for Siemens SX1 mobile phone; 2004-03-12 00:14:09 +00:00
cmd_ambapp.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_bdinfo.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_bedbug.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_bmp.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_boot.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_bootldr.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_bootm.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_cache.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_console.c Command usage cleanup 2009-01-28 08:49:52 +01:00
cmd_cplbinfo.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_dataflash_mmc_mux.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_date.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_dcr.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_df.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_diag.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_display.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_doc.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_dtt.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_eeprom.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_elf.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_ext2.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_fat.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_fdc.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_fdos.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_fdt.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_flash.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_fpga.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_i2c.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_ide.c MPC512x: remove include/mpc512x.h 2009-06-12 20:47:16 +02:00
cmd_immap.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_irq.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_itest.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_jffs2.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_license.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_load.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_log.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mac.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mem.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mfsl.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mgdisk.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mii.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_misc.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mmc.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mp.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_mtdparts.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_nand.c nand/onenand: Fix missing argument checking for "markbad" command 2009-07-07 17:58:05 -05:00
cmd_net.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_nvedit.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_onenand.c nand/onenand: Fix missing argument checking for "markbad" command 2009-07-07 17:58:05 -05:00
cmd_otp.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_pci.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_pcmcia.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_portio.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_reginfo.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_reiser.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_sata.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_scsi.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_setexpr.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_sf.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_source.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_spi.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_spibootldr.c Blackfin: new spibootldr command 2009-06-14 20:01:04 -04:00
cmd_strings.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_terminal.c Command usage cleanup 2009-01-28 08:49:52 +01:00
cmd_ubi.c Handle VID header offset in ubi part command 2009-07-09 09:57:54 +02:00
cmd_ubifs.c Command improvements for ubifs 2009-07-09 13:04:25 +02:00
cmd_universe.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_usb.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_vfd.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_ximg.c General help message cleanup 2009-06-12 20:47:16 +02:00
cmd_yaffs2.c General help message cleanup 2009-06-12 20:47:16 +02:00
command.c General help message cleanup 2009-06-12 20:47:16 +02:00
console.c common/console: avoid ifdef CONFIG_CONSOLE_MUX when it's possible 2009-02-18 00:55:18 +01:00
ddr_spd.c fsl-ddr: add the DDR3 SPD infrastructure 2009-03-30 13:33:50 -05:00
devices.c arm: add uart dcc support 2009-02-22 15:49:28 +01:00
dlmalloc.c Fix merge problems 2008-08-06 14:05:38 +02:00
dlmalloc.src * Code cleanup: 2003-06-27 21:31:46 +00:00
docecc.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
env_common.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
env_dataflash.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_eeprom.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
env_embedded.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
env_flash.c rename CONFIG_CMD_ENV to CONFIG_CMD_SAVEENV 2009-02-18 00:47:43 +01:00
env_mgdisk.c mflash: Initial mflash support 2009-04-03 23:47:06 +02:00
env_nand.c nand_spl: read environment early, when booting from NAND using nand_spl 2009-07-07 17:58:07 -05:00
env_nowhere.c env_nowhere: Move conditional compilation to Makefile 2008-09-10 22:48:01 +02:00
env_nvram.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
env_onenand.c env_onenand: change env_address type from unsigned long to loff_t 2009-07-07 17:58:11 -05:00
env_sf.c env_sf: support embedded environments 2008-12-16 00:47:10 +01:00
exports.c Add functions to list of exported functions 2007-08-06 00:45:40 +02:00
fdt_support.c 83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xx 2009-06-12 20:47:17 +02:00
flash.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
hush.c General help message cleanup 2009-06-12 20:47:16 +02:00
hwconfig.c Add simple hwconfig infrastructure 2009-07-16 22:23:53 +02:00
image.c common/image.c: Relocate strings in tables. 2009-04-04 23:33:12 +02:00
iomux.c IOMUX: Add console multiplexing support. 2008-12-07 01:23:35 +01:00
kallsyms.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
kgdb.c common/{hush, kgdb, serial}.c: build by COBJS-$(...) in Makefile 2009-02-11 23:05:57 +01:00
lcd.c General help message cleanup 2009-06-12 20:47:16 +02:00
lynxkdi.c Fix implicit declaration of function 'eth_[gs]etenv_enetaddr' 2009-03-28 20:16:16 +01:00
main.c Remove inline qualifier from show_boot_progress() 2009-05-15 22:04:04 +02:00
memsize.c Sequential accesses to non-existent memory must be synchronized, 2006-11-06 17:06:36 +01:00
miiphyutil.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
modem.c make MODEM SUPPORT generic instead of duplicate it 2009-06-12 20:45:47 +02:00
s_record.c Initial revision 2002-08-17 09:36:01 +00:00
serial.c 8xxx: Second UART port added for MPC85xx, MPC83xx, MPC86xx processors 2009-07-02 08:34:13 -05:00
system_map.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
update.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
usb.c usb_scan_devices: fix output with no devices 2009-01-28 19:57:31 +01:00
usb_kbd.c usb : usb_kbd : Populating 'priv' member of USB keyboard device_t structure 2009-01-28 19:57:28 +01:00
usb_storage.c Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
xyzModem.c Coding Style cleanup. 2006-08-31 16:46:53 +02:00