summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)AuthorFilesLines
2024-02-23Support specifying dtb in ${boot_syslinux_conf}Hal Feng1-0/+6
With this patch, you can specify dtb to bootup kernel, using fdtdir in ${boot_syslinux_conf}. Generally boot_syslinux_conf=extlinux/extlinux.conf Signed-off-by: Yingpeng Liu <yingpeng.liu@starfivetech.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29cmd: eeprom: Add StarFive VisionFive 2 board supportJianlong Huang3-28/+44
Rename CONFIG_SYS_DEF_EEPROM_ADDR to CONFIG_SYS_I2C_EEPROM_ADDR based on current usage. Convert CONFIG_SYS_I2C_EEPROM_BUS, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, CONFIG_SYS_EEPROM_SIZE, CONFIG_SYS_EEPROM_PAGE_WRITE_BITS and CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS to Kconfig. Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29cmd/eeprom: fix data type issue for parse_numeric_paramJianlong.Huang1-2/+2
This patch fixs parse_numeric_param issue on some platfrom which has different sizes of int and long, like riscv64. On riscv64, int is 4 bytes, but long is 8 bytes. on this situation: ulong addr = parse_numeric_param(argv[index]); if argv[index] is "0x80000000", this "ulong addr" will be 0xffffffff80000000. Signed-off-by: Jianlong.Huang <jianlong.huang@starfivetech.com> Co-developed-by: Wei Fu <wefu@redhat.com> Signed-off-by: Wei Fu <wefu@redhat.com>
2023-09-11cmd: fastboot: Fix failure to enter fastbootXingyu Wu1-2/+2
Only USB host and device are same IP and should be changed mode with initialization before fastboot in Devkits. Add the target of Devkits to math the board. Fixes: 67df54127e38 ("cmd: fastboot: Add presetting on StarFive SoC before fastboot") Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-09-07cmd: fastboot: Add presetting on StarFive SoC before fastbootXingyu Wu1-0/+8
Add the presetting about usb as device in fastboot function. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2021-09-13Merge tag 'mmc-2021-9-13' of https://source.denx.de/u-boot/custodians/u-boot-mmcTom Rini2-8/+54
Support using mmc command for enumerating mmc card in a given mode Fix device_remove in mmc Fix switch issue with send_status disabled Drop 1ms delay in fsl_esdhc command sending Revert "mmc: sdhci: set to INT_DATA_END when there are data"
2021-09-11efi_loader: eliminate EFI_CALL() in nvedit_efi.cHeinrich Schuchardt1-5/+4
Reduce the code size by avoiding using the external UEFI API and using our internal functions instead. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-09-10mmc: Add support for enumerating MMC card in a given mode using mmc commandAswath Govindraju2-8/+54
Add support for enumerating MMC card in a given mode using mmc rescan and mmc dev commands. The speed mode is provided as the last argument in these commands and is indicated using the index from enum bus_mode in include/mmc.h. A speed mode can be set only if it has already been enabled in the device tree. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-09-08common: Remove unused CONFIG_FIT_SHAxxx selectorsAlexandru Gagniuc1-0/+1
Originally CONFIG_FIT_SHAxxx enabled specific SHA algos for and only for hash_calculate() in common/image-fit.c. However, since commit 14f061dcb1 ("image: Drop IMAGE_ENABLE_SHAxxx"), the correct selector was changed to CONFIG_SHAxxx. The extra "_FIT_" variants are neither used, nor needed. Remove them. One defconfig disables FIT_SHA256, which is now changed to 'SHA256'. CMD_MVEBU_BUBT needs to select select SHA256 to avoid undefined references to "sha256_*()". bubt.c needs sha256, so this selection is correct. It is not clear why this problem did not manifest before. Note that SHA selection in SPL is broken for this exact reason. There is no corresponding SPL_SHAxxx. Fixing this is is beyond the scope of this change. Also note that we make CONFIG_FIT now imply SHA256, to make up for FIT_SHA256 previously being a default y option. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> [trini: Add imply SHA256 to FIT] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-27Merge tag 'xilinx-for-v2021.10-rc3' of ↵Tom Rini3-7/+12
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2021.10-rc3 xilinx: - Disable CONFIG_ARCH_FIXUP_FDT_MEMORY - Print information about cpu via soc drivers and enable DISPLAY_CPUINFO - Wire infrastructure for DTB_RESELECT and MULTI_DTB_FIT zynq: - Wire single QSPI - Use power-source instead of io-standard properties - Enable nor on zc770-xm012 zynqmp: - Change handling around multi_boot() - Setup offset for u-boot.itb in spi - Generate run time dfu_alt_info for capsule update - Use explicit values for enums (zynqmp_firmware.h) - Enable RTC/SHA1/BUTTON/BUTTON_GPIO command - Disable WDT driver by default - Bind usb/scsi via preboot because of EFI - DT updates/fixes - Add soc driver - Fix SPL SPI boot mode versal: - Add soc driver sdhci: - Update tap delay programming for zynq_sdhci driver cmd: - Fix RTC uclass handling in date command - Update pwm help message - Update reset help message watchdog: - Fix wwdt compilation rtc: - Deal with seq alias in rtc uclass - Add zynqmp RTC driver fdt: - Add kernel-doc for fdt_fixup_memory_banks()
2021-08-26cmd: boot: Update reset usage messageMichal Simek1-1/+2
The commit 573a3811edc8 ("sysreset: psci: support system reset in a generic way with PSCI") has added support for warm reset via PSCI but this hasn't been reflected in usage message and user has to look at the code how to run it. That's why update usage text to make this clear. Here is full help with updated usage: ZynqMP> help reset reset - Perform RESET of the CPU Usage: reset - cold boot without level specifier reset -w - warm reset if implemented Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2021-08-26cmd: pwm: Remove additional pwm descriptionMichal Simek1-3/+4
The first name is taken from command name that's why shouldn't be listed in help. And commands shouldn't be listed with <> which means value but value itself is command name. Also add description for commands to make it clear what it does. Before pwm pwm <invert> <pwm_dev_num> <channel> <polarity> pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns> ... After: pwm invert <pwm_dev_num> <channel> <polarity> - invert polarity pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM pwm enable <pwm_dev_num> <channel> - enable PWM output pwm disable <pwm_dev_num> <channel> - disable PWM output Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-06cmd: date: rtc: Update command to read the first RTC with seq 0Michal Simek1-3/+6
RTCs are using sequence number defined in aliases node. Date command with DM_RTC enabled is looking for the first RTC with index 0. But when RTC_EMULATION is enabled it gets likely most of the time index 0 even when system has rtc0 device via aliases node and gets sequence number 0. That's why extend the code to look for sequence 0 number first. If this fails continue to use existing device with index 0. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-08-05pci: Drop old code from pci commandSimon Glass1-212/+0
Drop the pre-driver model code from this file. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-04cmd:(cosmetic)Mentioned in 'chpart' command HELP text that it is for MTD devicesAdarsh Babu Kalepalli1-2/+2
Modified the help text of 'chpart' command ,mentioning that it is for MTD devices. Signed-off-by: Adarsh Babu Kalepalli <opensource.kab@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-04cmd:Elaborate 'blkcache' cmd HELP statementAdarsh Babu Kalepalli1-1/+2
HELP description is provided for ‘configure’ sub-command of ‘blkcache’. Signed-off-by: Adarsh Babu Kalepalli <opensource.kab@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-03Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini1-5/+4
- Fixed broken ICH SPI driver in software sequencer mode - Added "m25p,fast-read" to SPI flash node for x86 boards - Drop ROM_NEEDS_BLOBS and BUILD_ROM for x86 ROM builds - Define a default TSC timer frequency for all x86 boards - x86 MTRR MSR programming codes bug fixes - x86 "hob" command bug fixes - Don't program MTRR for DRAM for FSP1 - Move INIT_PHASE_END_FIRMWARE to FSP2 - Use external graphics card by default on Intel Crown Bay - tangier: Fix DMA controller IRQ polarity in CSRT
2021-08-02global: Convert simple_strtoul() with decimal to dectoul()Simon Glass41-95/+95
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass85-384/+385
It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02x86: cmd: hob: Fix display of resource type for system memoryBin Meng1-1/+1
The resource type for system memory is currently displayed as "unknown", which is wrong. Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <sjg@chromium.org>
2021-08-02x86: cmd: hob: Fix the command usage and help messagesBin Meng1-4/+3
At present the hob command usage and help messages are messed up in a single line. They should be separated. This was a regression introduced when [seq] and [-v] were added to the command. Fixes: d11544dfa9f4 ("x86: hob: Add way to show a single hob entry") Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <sjg@chromium.org>
2021-08-01fdt: Show the type of devicetree with fdt addrSimon Glass1-2/+3
It seems useful to show whether the address of the Control or Working devicetree is being shown. Add support for this. Drop the confusing 0x prefix since the command itself only accepts hex. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-01fdt: Tidy up the code a bit with fdt addrSimon Glass1-24/+13
Clean up the code a little before changing it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-28i2c: Rename CONFIG_SYS_I2C to CONFIG_SYS_I2C_LEGACYSimon Glass3-15/+15
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less than a year away. Also we want to have a CONFIG_I2C for U-Boot proper just like we have CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules. Rename this symbol so it is clear it is going away. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-07-28Rename DRIVERS_MISC_SUPPORT to DRIVERS_MISCSimon Glass1-1/+1
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-27cmd: setexpr: add format string handlingRoland Gaudig5-178/+295
Add format string handling operator to the setexpr command. It allows to use C or Bash like format string expressions to be evaluated with the result being stored inside the environment variable name. setexpr <name> fmt <format> [value]... The following example setexpr foo fmt "%d, 0x%x" 0x100 ff will result in $foo being set to "256, 0xff". Signed-off-by: Roland Gaudig <roland.gaudig@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-27cmd: printf: add helper functions from busyboxRoland Gaudig1-0/+121
Import the following helper functions from Busybox-1.33.1 which are required by printf.c: process_escape_sequence from libbb/process_escape_sequence.c, skip_whitespace from libbb/skip_whitespace.c, overlapping_strcpy from libbb/safe_strncpy.c src-url: https://git.busybox.net/busybox/ commit bcc5b0e6caca6c7602a6a41f "Bump version to 1.33.1" version: 1.33.1 Signed-off-by: Roland Gaudig <roland.gaudig@weidmueller.com>
2021-07-27cmd: printf: import busybox-1.33.1 printf.cRoland Gaudig1-0/+455
Import printf.c from the Busybox project, which provides Bash like format string handling. src-url: https://git.busybox.net/busybox/ commit bcc5b0e6caca6c7602a6a41f "Bump version to 1.33.1" version: 1.33.1 Signed-off-by: Roland Gaudig <roland.gaudig@weidmueller.com>
2021-07-24command: Fix SMC and HVC maximum number of argumentsSiew Chin Lim1-3/+3
smc and hvc commands take upto 8 user input arguments, the maximum number of arguments of the U_BOOT_CMD macro should set to 9. Besides, fix the typo (arg7 -> arg6) in hvc command's help message. Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-23cmd: part: Correct error handlingAnders Dellien1-1/+1
As 'part_get_info_by_name' now returns more status codes than just -1 to indicate failure, we need to update the return value check. Signed-off-by: Anders Dellien <anders.dellien@arm.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2021-07-23cmd: pinmux: support pin name in status commandPatrick Delaunay1-9/+37
Allow pin name parameter for pimux staus command, as gpio command to get status of one pin. The possible usage of the command is: > pinmux dev pinctrl > pinmux status > pinmux status -a > pinmux status <pin-name> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-23cmd: pinmux: update result of do_statusPatrick Delaunay1-14/+17
Update the result of do_status and always returns a CMD_RET_ value (-ENOSYS was a possible result of show_pinmux). This patch also adds pincontrol name in error messages (dev->name) and treats correctly the status sub command when pin-controller device is not selected. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-19treewide: Test on CONFIG_USB_HOST (or CONFIG_CMD_USB) not CONFIG_USBTom Rini1-1/+1
As the logic here is only used when we have a USB host controller, test on CONFIG_USB_HOST rather than CONFIG_USB in general. This lets us move towards using CONFIG_USB only as a menu symbol to say that we have some form of USB, and then USB_HOST or USB_GADGET depending on the role that USB plays within the build. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-08usb: Add correct depends for CMD_USB_MASS_STORAGETom Rini1-0/+1
We cannot build this without USB_GADGET_DOWNLOAD support enabled, add the appropriate depends line. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-06cmd: net: add a 'net list' command to list network devsTim Harvey1-0/+46
In a system with multiple network controllers it can be difficult to know the names of the various devices available. This is especially true for USB ether devices as they do not display device names upon detection. This is being added as a net sub-system in case other commands may want to be added or moved here. Note that this is only enabled for DM_ETH Example: U-Boot > net net - NET sub-system Usage: net list - list available devices U-Boot > net list eth0 : ethernet@2188000 00:d0:12:98:f5:47 active eth1 : e1000#0 00:d0:12:98:f5:48 eth2 : asix_eth 8c:ae:4c:f5:84:9d eth3 : asix_eth 8c:ae:4c:f9:41:e3 Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-05env: efi: fix a wrong address dereferenceAKASHI Takahiro1-2/+1
Probably, a pointer to a variable in an inner block should not be exposed to an outer block. Fixes: c70f44817d46 ("efi_loader: simplify 'printenv -e'") Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> [trini: Don't make guid const now] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-05Merge branch 'next'Tom Rini5-11/+272
2021-06-30Revert "TEST: USB_HOST not USB"Tom Rini1-1/+1
This reverts commit 4e1903a645453deab5ec5dd1cf4f0061469b99c3. This local commit was not intended to be pushed out. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-06-30TEST: USB_HOST not USBTom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-06-28Merge tag 'v2021.07-rc5' into nextTom Rini3-6/+21
Prepare v2021.07-rc5 # gpg: Signature made Mon 28 Jun 2021 03:39:36 PM EDT # gpg: using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C # gpg: Good signature from "Thomas Rini <trini@konsulko.com>" [ultimate] # Conflicts: # configs/am64x_evm_r5_defconfig
2021-06-28efidebug: correct display of BootOrderHeinrich Schuchardt1-1/+1
Display the number of the boot option and not its index. Fixes: 2ecee31017bf ("efi_loader: use efi_create_indexed_name()") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-06-24cmd: mtd: expand <name> argument definition in command helpMarek Behún1-1/+1
The <name> argument can now also be MTD's DM device name or OF path. Mention this is command help. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Cc: Priyanka Jain <priyanka.jain@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com>
2021-06-24cmd: mtd: print device OF path in listingMarek Behún1-0/+7
Print MTD's device OF path in the output of `mtd list` command. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Cc: Priyanka Jain <priyanka.jain@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com>
2021-06-22mmc: Update environment variable with active partitionReuben Dowle1-5/+9
This patch allows uboot scripts make choices about where to boot from based on the active mmc boot partition. This allows having two copies of kernel, filesystems etc, and choosing which to boot from based off of the active bootloader partition. Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-06-18cmd: pxe_utils: sysboot: fix crash if either board or soc are not set.Dimitri John Ledkov1-0/+8
If the environment does not have "soc" or "board" set, and fdtdir option is specified in extlinux.conf, the bootloader will crash whilst dereferencing a null pointer. Add a guard against null soc or board. Fixes a crash of qemu-riscv64_smode configuration, which does not have CONFIG_SYS_SOC defined. Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-06-11cmd: ti: pd: Add debug command for K3 power domainsTero Kristo3-0/+194
Add support command for debugging K3 power domains. This is useful with the HSM rearch setup, where power domains are directly controlled by SPL instead of going through the TI SCI layer. The debugging support is only available in the u-boot codebase though, so the raw register access power domain layer must be enabled on u-boot side for this to work. By default, u-boot side uses the TI SCI layer, and R5 SPL only uses the direct access methods. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-06-11clk: add support for setting clk rate from cmdlineTero Kristo1-2/+51
Add new clk subcommand "clk setfreq", for setting up a clock rate directly from u-boot cmdline. This is handy for any debugging purposes towards clocks. Acked-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
2021-06-11clk: fix clock tree dump to properly dump out every registered clockTero Kristo1-8/+19
Some clocks are not associated to a DM node, so just parsing the DM is not enough. This is especially true for root clocks, which typically don't have any parents. Instead, fetch every registered UCLASS_CLK instance, and dump these out. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
2021-06-09cmd: Add dependency for ums commandPatrick Delaunay1-1/+4
Add the missing dependency for the command ums: - CONFIG_BLK: call of blk_* functions in usb_mass_storage.c - CONFIG_USB_GADGET: required to select CONFIG_USB_FUNCTION_MASS_STORAGE Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-05-25efi_loader: simplify accessing variablesHeinrich Schuchardt1-15/+18
Use efi_get_variable_int() instead of EFI_CALL(RT->get_variable()). Use efi_set_variable_int() instead of EFI_CALL(efi_set_variable()). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>