summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* cmd/led.c: Remove unnecessary check on 'cmd' valueTom Rini2017-05-121-2/+0
| | | | | | | | | | | We first check that if argc is less than 2 we return CMD_RET_USAGE. We then see if argc is greater than 2 and if so call get_led_cmd() to set 'cmd' and otherwise set it to LEDST_COUNT (which will always be positive as it's an enum with 0 already assigned). Therefore the test on if cmd is less than 0 will always be false and simply be omitted. Reported by clang-3.8. Signed-off-by: Tom Rini <trini@konsulko.com>
* cmd/io.c: Fix comparison of unsigned expression warningTom Rini2017-05-121-1/+2
| | | | | | | | The function cmd_get_data_size() returns an int and not unsigned. So we should assign it to an int rather than unsigned so that we can later compare the return value. Reported by clang-3.8. Signed-off-by: Tom Rini <trini@konsulko.com>
* cmd/bdinfo.c: Fix unused function warningTom Rini2017-05-121-1/+1
| | | | | | | On most architectures we do not call print_std_bdinfo() so mark it with __maybe_unused. Reported by clang-3.8. Signed-off-by: Tom Rini <trini@konsulko.com>
* common: env: remove superfluous assignmentxypron.glpk@gmx.de2017-05-121-1/+0
| | | | | | | | The value assigned to variable 'value' is never used. The problem was indicated by clang scan-build. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: cpu: refactor to ensure devices are probed and improve code styleÁlvaro Fernández Rojas2017-05-101-17/+13
| | | | | | | | | | | Use uclass_first_device and uclass_next_device in order to avoid exceptions for drivers that aren't probed when cpu ops are requested. Improve code style and fix indentations. Fix incorrect line break when cpu info is not available. Remove unneeded brackets. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: cpu: fix NULL cpu feature printsÁlvaro Fernández Rojas2017-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 740d5d3 added two new features but only one feature name, which results in NULL prints when device_id feature is selected. Before: HG556a # cpu detail -1: cpu@0 BCM6358A1 ID = 0, freq = 300 MHz: L1 cache, MMU, NULL Device ID 0x2a010 -1: cpu@1 BCM6358A1 ID = 1, freq = 300 MHz: L1 cache, MMU, NULL Device ID 0x2a010 After: HG556a # cpu detail -1: cpu@0 BCM6358A1 ID = 0, freq = 300 MHz: L1 cache, MMU, Device ID Device ID 0x2a010 -1: cpu@1 BCM6358A1 ID = 1, freq = 300 MHz: L1 cache, MMU, Device ID Device ID 0x2a010 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm64: mvebu: Fix the bubt comamnd NAND device supportKonstantin Porotchkin2017-05-091-6/+7
| | | | | | | | | | | Fix the NAND structures in bubt command according to latest changes in MTD API. Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Cc: Stefan Roese <sr@denx.de> Cc: Igal Liberman <igall@marvell.com> Cc: Nadav Haklai <nadavh@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
* cmd: add Kconfig option for 'date' commandChris Packham2017-05-011-0/+7
| | | | | | Signed-off-by: Chris Packham <judge.packham@gmail.com> [trini: default y if DM_RTC, re-sync] Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_DISPLAY to KconfigSimon Glass2017-04-301-0/+8
| | | | | | | This converts the following to Kconfig: CONFIG_CMD_DISPLAY Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_CMD_DIAG to KconfigSimon Glass2017-04-301-0/+8
| | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_DIAG Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_DIAG on some keymile configs] Signed-off-by: Tom Rini <trini@konsulko.com>
* fs: Kconfig: Add a separate option for FS_CRAMFSSimon Glass2017-04-301-0/+1
| | | | | | | | | | | Rather than using CMD_CRAMFS for both the filesystem and its command, we should have a separate option for each. This allows us to enable CRAMFS support without the command, if desired, which reduces U-Boot's size slightly. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply FS_CRAMFS for keymile] Signed-off-by: Tom Rini <trini@konsulko.com>
* fs: Convert CONFIG_CMD_CRAMFS to KconfigSimon Glass2017-04-301-0/+10
| | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_CRAMFS Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_CRAMFS for keymile] Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_CLK to KconfigSimon Glass2017-04-301-0/+9
| | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_CLK Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_CLK on ARCH_ZYNQ] Signed-off-by: Tom Rini <trini@konsulko.com>
* fs: Kconfig: Add a separate config for FS_CBFSSimon Glass2017-04-301-0/+1
| | | | | | | | | | | Rather than using CMD_CBFS for both the filesystem and its command, we should have a separate option for each. This allows us to enable CBFS support without the command, if desired, which reduces U-Boot's size slightly. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply FS_CBFS on SYS_COREBOOT] Signed-off-by: Tom Rini <trini@konsulko.com>
* fs: Convert CONFIG_CMD_CBFS to KconfigSimon Glass2017-04-301-0/+9
| | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_CBFS Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_CBFS on SYS_COREBOOT] Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_BSP to KconfigSimon Glass2017-04-301-0/+10
| | | | | | | This converts the following to Kconfig: CONFIG_CMD_BSP Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_CMD_BMP to KconfigSimon Glass2017-04-301-0/+12
| | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_BMP Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add depends on LCD || DM_VIDEO || VIDEO] Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_BLOB to KconfigSimon Glass2017-04-302-1/+45
| | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_BLOB Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add imply CMD_BLOB under CHAIN_OF_TRUST] Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_BEDBUG to KconfigSimon Glass2017-04-301-0/+11
| | | | | | | This converts the following to Kconfig: CONFIG_CMD_BEDBUG Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_CMD_AES et al to KconfigSimon Glass2017-04-301-0/+10
| | | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_AES CONFIG_AES Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add select AES to CMD_AES] Signed-off-by: Tom Rini <trini@konsulko.com>
* add Kconfig for fsuuid commandJosua Mayer2017-04-271-0/+5
| | | | | | | | CONFIG_CMD_FS_UUID was neither whitelisted, nor was it declared in Kconfig. Now it can be enabled in .config and defconfig as expected. Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini2017-04-181-1/+1
|\
| * cmd: ubi: remove unnecessary logical constraintxypron.glpk@gmx.de2017-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | A size_t variable can never be negative. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* | cmd: remove Blackfin specific commandsMasahiro Yamada2017-04-187-734/+0
| | | | | | | | | | | | | | | | These commands have no user since commit ea3310e8aafa ("Blackfin: Remove"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | cmd: cramfs: use map_sysmem for sandbox supportTyler Hall2017-04-181-3/+11
|/ | | | | | | | As with most other commands, this needs to factor in the sysmem offset in the sandbox or it will try to dereference the simulated physical address directly. Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
* dm: led: Add a new 'led' commandSimon Glass2017-04-143-0/+155
| | | | | | | When driver model is used for LEDs, provide a command to allow LED access. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
* led: Mark existing driver as legacySimon Glass2017-04-142-3/+3
| | | | | | | | The existing 'led' command does not support driver model. Rename it to indicate that it is legacy code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
* sandbox: Add some test LEDsSimon Glass2017-04-141-0/+0
| | | | | | | Add some LEDs to the standard sandbox device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2017-04-131-1/+1
|\ | | | | | | | | | | Drop CONFIG_STACKSIZE from include/configs/imx6_logic.h Signed-off-by: Tom Rini <trini@konsulko.com>
| * cmd_mmc: fix arg parsing for setdsr subcmdMarkus Niebel2017-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | The handler do_setdsr receives only the dsr parameter, the action is parsed before. Error was introduced when restructuring the mmc command implementation in commit 1fd93c6e7d8a1e4d6261058cefab11b875ded252. Reported-by: Michael Krummsdorf <Michael.Krummsdorf@tq-group.com> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
* | pci: Add a command to show PCI regionsSimon Glass2017-04-131-2/+49
| | | | | | | | | | | | | | Add 'pci regions' which lists the I/O and memory regions accessible from the PCI controller. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Rename aes.h to uboot_aes.hStefano Babic2017-04-121-1/+1
| | | | | | | | | | | | | | | | | | aes.h is a too generic name if this file can be exported and used by a program. Rename it to avoid any conflicts with other files (for example, from openSSL). Signed-off-by: Stefano Babic <sbabic@denx.de>
* | cmd: nand: Make the NAND options default to NAND_SUNXIMaxime Ripard2017-04-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we depend on the ARCH_SUNXI configuration option, the boards that do not have NAND support enabled (with the associated options) will not compile anymore. Depend on the NAND driver configuration option to make sure that is not the case. Reported-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | cmd: ubifs: Add a dependency on CMD_UBIMaxime Ripard2017-04-071-0/+1
| | | | | | | | | | | | | | | | CMD_UBIFS can't compile without CMD_UBI enabled. Make sure we can't end up in that case. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Heiko Schocher <hs@denx.de>
* | sunxi: Enable UBI and NAND supportHans de Goede2017-04-071-0/+4
| | | | | | | | | | | | | | | | | | Enable the NAND and UBI support in the configuration header so that we can (finally) use it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jagan Teki <jagan@openedev.com>
* | cmd: nand: Expose optional suboptions in KconfigBoris Brezillon2017-04-071-0/+18
| | | | | | | | | | | | | | | | | | Sometime we need to enable advanced suboptions of the nand command set. Expose these suboptions in Kconfig. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* | cmd: Expose a Kconfig option to enable UBIFS commandsBoris Brezillon2017-04-071-0/+8
| | | | | | | | | | | | | | | | | | Create a new Kconfig entry to allow CMD_UBIFS selection from Kconfig and add an hidden LZO option that can be selected by CMD_UBIFS. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jagan Teki <jagan@openedev.com>
* | cmd: Add Kconfig option for CMD_MTDPARTS and related optionsMaxime Ripard2017-04-072-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMD_MTDPARTS is something the user might or might not want to select, and might depends on (or be selected by) other options too. This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that might change from one board to another, or from one user to the other, depending on what it expects and what storage devices are available. In order to ease that configuration, add those options to Kconfig. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* | OpenRISC: RemoveTom Rini2017-04-051-15/+1
| | | | | | | | | | | | | | | | The OpenRISC architecture is currently unmaintained, remove. Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | SPARC: RemoveTom Rini2017-04-054-622/+0
| | | | | | | | | | | | | | The SPARC architecture is currently unmaintained, remove. Cc: Francois Retief <fgretief@spaceteq.co.za> Signed-off-by: Tom Rini <trini@konsulko.com>
* | Blackfin: RemoveTom Rini2017-04-053-118/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The architecture is currently unmaintained, remove. Cc: Benjamin Matthews <mben12@gmail.com> Cc: Chong Huang <chuang@ucrobotics.com> Cc: Dimitar Penev <dpn@switchfin.org> Cc: Haitao Zhang <hzhang@ucrobotics.com> Cc: I-SYST Micromodule <support@i-syst.com> Cc: M.Hasewinkel (MHA) <info@ssv-embedded.de> Cc: Marek Vasut <marex@denx.de> Cc: Martin Strubel <strubel@section5.ch> Cc: Peter Meerwald <devel@bct-electronic.com> Cc: Sonic Zhang <sonic.adi@gmail.com> Cc: Valentin Yakovenkov <yakovenkov@niistt.ru> Cc: Wojtek Skulski <info@skutek.com> Cc: Wojtek Skulski <skulski@pas.rochester.edu> Signed-off-by: Tom Rini <trini@konsulko.com>
* | dm: core: Add flags parameter to device_remove()Stefan Roese2017-04-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the flags parameter to device_remove() and changes all calls to this function to provide the default value of DM_REMOVE_NORMAL for "normal" device removal. This is in preparation for the driver specific pre-OS (e.g. DMA cancelling) remove support. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* | Merge git://git.denx.de/u-boot-dmTom Rini2017-04-041-15/+147
|\ \
| * | lib: tpm: Add command to list resourcesmario.six@gdsys.cc2017-03-261-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is sometimes convenient to know how many and/or which resources are currently loaded into a TPG, e.g. to test is a flush operation succeeded. Hence, we add a command that lists the resources of a given type currently loaded into the TPM. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | cmd: tpm: Fix flush commandmario.six@gdsys.cc2017-03-261-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7690be35de ("lib: tpm: Add command to flush resources") added a command to flush resources from a TPM. However, a previous development version was accidentially used to generate the patch, resulting in a non-functional command. This patch fixes the flush command. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | tpm: Add function to load keys via their parent's SHA1 hashmario.six@gdsys.cc2017-03-261-0/+49
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we want to load a key into a TPM, we need to know the designated parent key's handle, so that the TPM is able to insert the key at the correct place in the key hierarchy. However, if we want to load a key whose designated parent key we also previously loaded ourselves, we first need to memorize this parent key's handle (since the handles for the key are chosen at random when they are inserted into the TPM). If we are, however, unable to do so, for example if the parent key is loaded into the TPM during production, and its child key during the actual boot, we must find a different mechanism to identify the parent key. To solve this problem, we add a function that allows U-Boot to load a key into the TPM using their designated parent key's SHA1 hash, and the corresponding auth data. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
* | i2c: Set default I2C bus numberLukasz Majewski2017-03-281-0/+10
|/ | | | | | | | | | This patch allows using i2c commands (e.g. "i2c probe", "i2c md", etc) without the need to first select the bus number with e.g. "i2c dev 0". This is the "i2c" command behavior similar to the one from pre DM, where by default bus 0 was immediately accessible. Signed-off-by: Lukasz Majewski <lukma@denx.de>
* gpt: Fix uuid string formatVincent Tinelli2017-03-171-1/+1
| | | | | | | Change GPT UUID string format from UUID to GUID per specification. Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: itest: correct calculus for long formatSebastien Colleur2017-03-171-1/+2
| | | | | | | | | itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values. Signed-off-by: Sebastien Colleur <sebastienx.colleur@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Kconfig: introduce md5sum command selectionAndre Przywara2017-03-171-0/+14
| | | | | | | | | | So far CONFIG_MD5SUM would need to be set by a board's include file. Since the command is really generic, move it over to Kconfig to allow it to be defined by either a board's defconfig, menuconfig or some config snippet merged via mergeconfig.sh. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>