summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)AuthorFilesLines
2019-07-16Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2-90/+104
2019-07-15net: introduce MDIO DM class for MDIO devicesAlex Marginean1-0/+5
Adds UCLASS_MDIO DM class supporting MDIO buses that are probed as stand-alone devices. Useful in particular for systems that support DM_ETH and have a stand-alone MDIO hardware block shared by multiple Ethernet interfaces. Signed-off-by: Alex Marginean <alexm.osslist@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-15cmd: mii: Add the standard 1000BASE-T registersTrent Piepho1-5/+29
These are standard across gigabit phys. These mostly extend the auto-negotiation information with gigabit fields. Signed-off-by: Trent Piepho <tpiepho@impinj.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-15cmd: mii: Refactor some of the MII reg dump codeTrent Piepho1-85/+70
Share the code that prints out a register field with the function that prints out the "special" fields. There were two arrays the register dump list, one with reg number and name, another with a pointer to the field table and the table size. These two arrays had have each entry match what register is referred to. Combine them into just one table. Now they can't not match and there is just one table. Add some missing consts to pointers to string literals. The dump code was ignoring the regno field in the description table and assuming register 0 was at index 0, etc. Have it use the field. Change reg > max+1 into reg >= max, which doesn't fail if max+1 could overflow, besides just making more sense. Signed-off-by: Trent Piepho <tpiepho@impinj.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-15Merge tag 'mmc-2019-7-15' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmcTom Rini3-98/+0
- mmc spi driver model support - drop mmc_spi command - enhanced Strobe mmc HS400 support - minor mmc bug/fixes and optimization - omap hsmmc and mvbeu update - sdhci card detect support
2019-07-15cmd: Remove mmc_spi commandAnup Patel3-98/+0
The mmc_spi command was added to manually setup MMC over SPI bus using command. This was required by the legacy non-DM MMC_SPI driver. With DM based MMC_SPI driver in-place, we can now use all general storge commands and mmc command for MMC over SPI bus hence we remove the mmc_spi command all it's references. Suggested-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-14Merge tag 'u-boot-stm32-20190712' of ↵Tom Rini1-0/+1
https://gitlab.denx.de/u-boot/custodians/u-boot-stm - syscon: add support for power off - stm32mp1: add op-tee config - stm32mp1: add specific commands: stboard and stm32key - add stm32 mailbox driver - solve many stm32 warnings when building with W=1 - update stm32 gpio driver
2019-07-13cmd: nvedit: Add sub-command 'env info'Leo Ruan2-0/+121
Add sub-command 'env info' to display environment information: - env_valid : is environment valid - env_ready : is environment imported into hash table - env_use_default : is default environment using This command can be optionally used for evaluation in scripts: [-d] : evaluate whether default environment is used [-p] : evaluate whether environment can be persisted The result of multiple evaluations will be combined with AND. Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com> Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Do not enable by default] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-12cmd: pinmux: Fix warnings when compiling with W=1Patrick Delaunay1-0/+1
This patch solves the following warnings: cmd/pinmux.c: In function 'do_dev': cmd/pinmux.c:26:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (ret) { ^ cmd/pinmux.c:30:2: note: here case 1: ^~~~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12Merge tag 'dm-pull-9jul19-take2' of ↵Tom Rini1-6/+4
https://gitlab.denx.de/u-boot/custodians/u-boot-dm - Sandbox improvements including .dts refactor - Minor tracing and PCI improvements - Various other minor fixes - Conversion of patman, dtoc and binman to support Python 3
2019-07-11cmd: Add 'bcb' command to read/modify/write BCB fieldsEugeniu Rosca3-0/+358
'Bootloader Control Block' (BCB) is a well established term/acronym in the Android namespace which refers to a location in a dedicated raw (i.e. FS-unaware) flash (e.g. eMMC) partition, usually called "misc", which is used as media for exchanging messages between Android userspace (particularly recovery [1]) and an Android-capable bootloader. On higher level, this allows implementing a subset of Android Bootloader Requirements [2], amongst which is the Android-specific bootloader flow [3]. Regardless how the latter is implemented in U-Boot ([3] being the most memorable example), reading/writing/dumping the BCB fields in the development process from inside the U-Boot is a convenient feature. Hence, make it available to the users. Some usage examples of the new command recorded on R-Car H3ULCB-KF ('>>>' is an overlay on top of the original console output): => bcb bcb - Load/set/clear/test/dump/store Android BCB fields Usage: bcb load <dev> <part> - load BCB from mmc <dev>:<part> bcb set <field> <val> - set BCB <field> to <val> bcb clear [<field>] - clear BCB <field> or all fields bcb test <field> <op> <val> - test BCB <field> against <val> bcb dump <field> - dump BCB <field> bcb store - store BCB back to mmc Legend: <dev> - MMC device index containing the BCB partition <part> - MMC partition index or name containing the BCB <field> - one of {command,status,recovery,stage,reserved} <op> - the binary operator used in 'bcb test': '=' returns true if <val> matches the string stored in <field> '~' returns true if <val> matches a subset of <field>'s string <val> - string/text provided as input to bcb {set,test} NOTE: any ':' character in <val> will be replaced by line feed during 'bcb set' and used as separator by upper layers => bcb dump command Error: Please, load BCB first! >>> Users must specify mmc device and partition before any other call => bcb load 1 misc => bcb load 1 1 >>> The two calls are equivalent (assuming "misc" has index 1) => bcb dump command 00000000: 62 6f 6f 74 6f 6e 63 65 2d 73 68 65 6c 6c 00 72 bootonce-shell.r 00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r............. >>> The output is in binary/string format for convenience >>> The output size matches the size of inspected BCB field >>> (32 bytes in case of 'command') => bcb test command = bootonce-shell && echo true true => bcb test command = bootonce-shell- && echo true => bcb test command = bootonce-shel && echo true >>> The '=' operator returns 'true' on perfect match => bcb test command ~ bootonce-shel && echo true true => bcb test command ~ bootonce-shell && echo true true >>> The '~' operator returns 'true' on substring match => bcb set command recovery => bcb dump command 00000000: 72 65 63 6f 76 65 72 79 00 73 68 65 6c 6c 00 72 recovery.shell.r 00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r............. >>> The new value is NULL-terminated and stored in the BCB field => bcb set recovery "msg1:msg2:msg3" => bcb dump recovery 00000040: 6d 73 67 31 0a 6d 73 67 32 0a 6d 73 67 33 00 00 msg1.msg2.msg3.. 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ >>> --- snip --- >>> Every ':' is replaced by line-feed '\n' (0xA). The latter is used >>> as separator between individual commands by Android userspace => bcb store >>> Flush/store the BCB structure to MMC [1] https://android.googlesource.com/platform/bootable/recovery [2] https://source.android.com/devices/bootloader [3] https://patchwork.ozlabs.org/patch/746835/ ("[U-Boot,5/6] Initial support for the Android Bootloader flow") Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
2019-07-11configs: Rename CONFIG_IMAGE_FORMAT_LEGACY to CONFIG_LEGACY_IMAGE_FORMATTom Rini7-15/+15
The name CONFIG_LEGACY_IMAGE_FORMAT reads slightly better along with allowing us to avoid a rather nasty Kbuild/Kconfig issue down the line with CONFIG_IS_ENABLED(IMAGE_FORMAT_LEGACY). In a few places outside of cmd/ switch to using CONFIG_IS_ENABLED() to test what is set. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-11trace: do not limit trace buffer to 2GiBHeinrich Schuchardt1-6/+4
There is no good reason to limit the trace buffer to 2GiB on a 64bit system. Adjust the types of the relevant parameters. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-06-21Merge tag 'efi-2019-07-rc5-3' of ↵Tom Rini2-17/+24
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for v2019.07-rc5 (3) This pull request provides error fixes for the graphical output protocol, the text output protocol, and the extended text input protocol. Setting the boot device for the bootefi command is now not only supported by the 'load' command but also for the file system specific commands like 'fatload'.
2019-06-21cmd/led.c: fix typos in online helpAnatolij Gustschin1-1/+1
Remove square brackets around label in state command description. Fixes: ea41b15617fa ("cmd/led: check subcommand "list" instead "l"") Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-06-21efi_loader: consistent error handling in efidebug.cHeinrich Schuchardt1-7/+16
If a variable cannot be set, always show an information message. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-21efi_loader: consistent types in efidebug.cHeinrich Schuchardt1-11/+14
efi_status_t and int are of different size. Use separate variables for return codes of different type. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-21fs: do_load: pass device path for efi payloadMian Yousaf Kaukab1-5/+0
fatload command can be used to load the EFI payload since EFI system partition is always a FAT partition. Call into EFI code from do_load() to set the device path from which the last binary was loaded. An EFI application like grub2 can’t find its configuration file without the device path set. Since device path is now set in do_load() there is no need to set it in do_load_wrapper() for the load command. Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-17Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini1-0/+3
- Drop zipitz2 board (Tom) - Add DEPRECATED option (Tom) - Mark legacy or non-dm drivers as DEPRECATED (Jagan)
2019-06-14usb: gadget: error out if g_dnl registration failsSjoerd Simons1-3/+8
If g_dnl_register fails return an error rather then stubornly continuing onwards. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2019-06-13Kconfig: Add SPI / SPI_FLASH as dependenciesTom Rini1-0/+3
In order to use CMD_SF / CMD_SPI / ENV_IS_IN_SPI_FLASH we need to have the SPI (or SPI_FLASH/DM_SPI_FLASH, for CMD_SF) enabled. Express this in the Kconfigs. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-06-12Merge tag 'u-boot-stm32-20190606' of https://github.com/pchotard/u-bootTom Rini1-15/+21
- Add Ethernet support for STM32MP1 - Add saveenv support for STM32MP1 - Add STM32MP1 Avenger96 board support - Add SPI driver suport for STM32MP1 - Add watchdog support for STM32MP1 - Update power supply check via USB TYPE-C for STM32MP1 discovery board
2019-06-06env: enable saveenv command when one CONFIG_ENV_IS_IN is activatedPatrick Delaunay1-15/+21
Introduce ENV_IS_IN_DEVICE to test if one the CONFIG_ENV_IS_IN_ is defined and support the command saveenv even if CONFIG_ENV_IS_NOWHERE is activated Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-06-05Merge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efiTom Rini3-4/+17
Pull request for UEFI sub-system for v2019.07-rc4-2 Support for managing the non-volatile attribute of UEFI variables is added though we do not have a backend for persistence yet. Error messages for changes of UEFI variables are provided. UEFI boottime service implementations are corrected.
2019-06-05cmd/led: check subcommand "list" instead "l"Heiko Schocher1-2/+2
current implementation for checking if "led list" command is called checks only if "l" is passed to the led command. This prevents switching leds with name which starts also with a "l". So check for passing "list". While at it, also fix a typo in led command usage. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-06-05cmd: env: add -nv option for UEFI non-volatile variableAKASHI Takahiro2-4/+14
With this option, -nv, at "setenv -e" command, a variable will be defined as non-volatile. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-05cmd: efidebug: make some boot variables non-volatileAKASHI Takahiro1-0/+3
Boot####, BootOrder and BootNext should be non-volatile. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04cmd: env: print a message when setting UEFI variable failedAKASHI Takahiro1-1/+9
Error message will alert a user that setting/deleting a variable failed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-03Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efiTom Rini1-1/+9
Pull request for UEFI sub-system for v2019.07-rc4 Corrections for boottime services for protocols and for the SetTime() service are provided. Error messages for the 'setenv -e' and 'bootefi bootmgr' commands are added.
2019-06-01cmd: mdio: Fix access to arbitrary PHY addressesVladimir Oltean1-2/+7
Alex reported the following: " I'm doing some MDIO work on a freescale/NXP platform and I bumped into errors with this command: => mdio r emdio#3 5 3 Reading from bus emdio#3 "Synchronous Abort" handler, esr 0x8600000e elr: ffffffff862b8000 lr : 000000008200cce4 (reloc) ... mdio list does not list any PHYs currently because ethernet is using DM and the interfaces are not probed at this time. The PHY does exist on the bus though. The above scenario works with this commit reverted: e55047ec51a662c12ed53ff543ec7cdf158b2137 cmd: mdio: Switch to generic helpers when accessing the registers The current code using generic helpers only works for PHYs that have been registered and show up in bus->phymap and crashes for arbitrary IDs. I find it useful to allow reading from other addresses over MDIO too, certainly helpful for people debugging MDIO on various boards. " Fix this by reverting to use the raw MDIO bus operations in case there is no PHY probed based on DT at the specified address. This restores the old behavior for these PHYs, which means that the newly introduced MMD-over-C22 helpers won't be available for them, but at least they will be accessible again without crashing the system. Fixes: commit e55047ec51a6 ("cmd: mdio: Switch to generic helpers when accessing the registers") Reported-by: Alex Marginean <alexm.osslist@gmail.com> Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Alex Marginean <alexm.osslist@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-06-01cmd: env: print a message when setting UEFI variable failedAKASHI Takahiro1-1/+9
Error message will alert a user that setting/deleting a variable failed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-29cmd: remove unused `display` commandHeinrich Schuchardt3-62/+0
Compiling the display command leads to an error undefined reference to `display_set' No implementation of display_set() exists in U-Boot. Eliminate the `display` command as well as the accompanying files. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-05-21cmd: binop: Use hex2binMario Six1-25/+3
Use the new hex2bin function in the binop command instead of converting the data manually. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-05-21cmd: binop: Use new environment apiMario Six1-2/+2
Since the binop command was introduced, the environment API was changed. Use the new API to make the command work again. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-05-18CONFIG_SPL_SYS_[DI]CACHE_OFF: addTrevor Woerner1-1/+1
While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances where these configuration items are conditional on SPL. This commit adds SPL variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates the configurations as required. Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Trevor Woerner <trevor@toganlabs.com> [trini: Make the default depend on the setting for full U-Boot, update more zynq hardware] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-05-12efi_loader: comments for efi_install_fdt()Heinrich Schuchardt1-3/+8
Describe that efi_install_fdt() defaults to using the device tree indicated by environment variable fdtcontroladdr. ACPI tables and device trees are mutually exclusive. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: deduplicate code in cmd/bootefi.cHeinrich Schuchardt1-62/+37
Move duplicate initialization code to single instance. Adjust comments of concerned functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: make device path to text protocol customizableHeinrich Schuchardt1-0/+1
The device path to text protocol is not needed for EBBR compliance. So let's make it a customizable option. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-10cmd: ubifs: Remove select for non-existent optionChris Packham1-2/+0
There is no 'config CRC32', remove the select that was attempting to use it. Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-05-09Merge git://git.denx.de/u-boot-riscvTom Rini2-3/+7
- Correct SYS_TEXT_BASE for qemu. - Support booti. - Increase SYSBOOTM_LEN for Fedora/RISCV kernel. - Support SMP booting from flash.
2019-05-09RISCV: image: Add booti supportAtish Patra2-3/+7
This patch adds booti support for RISC-V Linux kernel. The existing bootm method will also continue to work as it is. It depends on the following kernel patch which adds the header to the flat Image. Gzip compressed Image (Image.gz) support is not enabled with this patch. https://patchwork.kernel.org/patch/10925543/ Tested on HiFive Unleashed and QEMU. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Karsten Merker <merker@debian.org> Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
2019-05-09Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini1-11/+16
- Various PHY fixes / enhancements. - TI K2G fixes
2019-05-07cmd: mdio: Switch to generic helpers when accessing the registersCarlo Caione1-11/+16
Switch to use the generic helpers to access the MMD registers so that we can used the same command also for C45 PHYs, C22 PHYs with direct and indirect access and PHYs implementing a custom way to access the registers. Signed-off-by: Carlo Caione <ccaione@baylibre.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-07efi_loader: clean up UEFI sub-system initializationHeinrich Schuchardt1-27/+0
allow_unaligned(), switch_to_non_secure_mode(), and efi_init_obj_list() are called in sequence in multiple places. Move calls to allow_unaligned() and switch_to_non_secure_mode() to efi_init_obj_list(). Remove unused includes. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-06Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini2-11/+15
- Various pinctrl / gpio fixes for R-Car
2019-05-05cmd: pxe: add board specific PXE default pathMarek Behún1-0/+3
The list of PXE default paths contains ARCH and SOC specific paths, but one PXE server can serve different board with the same ARCH and SOC. This is the case for Turris Omnia and Turris Mox, where ARCH=arm and SOC=mvebu. If CONFIG_SYS_BOARD is defined, also try "default-$ARCH-$SOC-$BOARD" path. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2019-05-04cmd: mmc: Make Mode: printout consistentMarek Vasut1-1/+1
The "Mode :" line is the only one in "mmc info" output that has a space in front of the colon. Drop the space to make it consistent with the rest of the output, e.g.: => mmc dev 1 ; mmc info switch to partitions #0, OK mmc1 is current device Device: sd@ee160000 Manufacturer ID: 3 OEM: 5344 Name: SL08G Bus Speed: 50000000 Mode : SD High Speed (50MHz) ^------------------------------ Remove this space Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 7.4 GiB Bus Width: 1-bit Erase Group Size: 512 Bytes Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> CC: Tom Rini <trini@konsulko.com>
2019-05-04cmd: clk: Handle ENODEV from clk_get_rateIsmael Luceno Cortes1-10/+14
clk_get_rate may return -ENODEV if the clock isn't valid. Also, make the error cases go through a single path. Fixes: ff8eee0330a6 ("cmd: clk: Add trivial implementation of clock dump for DM") Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
2019-05-03Merge tag 'efi-2019-07-rc2' of git://git.denx.de/u-boot-efiTom Rini4-48/+90
Pull request for UEFI sub-system for v2019.07-rc2 This pull request provides error fixes for the handling of GPT partitions and for the UEFI subsystem.
2019-05-02cmd: gpt: fix and tidy up help messageEugeniu Rosca1-6/+6
Apply the following changes: - Guard the 'gpt read' command by 'ifdef CONFIG_CMD_GPT_RENAME', since 'gpt read' is not available on CMD_GPT_RENAME=n - Prefix the {read,swap,rename} commands with one space for consistency - Prefix the 'guid' commands with 'gpt' for consistency Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>