summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2023-03-30cli: run_commandf(): small fixupsEvgeny Bachinin
* vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable ‘i’ set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30include: kernel.h: port find_closest() from LinuxChris Packham
The find_closest() macro can be used to find an element in a sorted array that is closest to an input value. Bring in this macro from Linux v6.3-rc1-2-g8ca09d5fa354. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio ↵Rasmus Villemoes
controllers The API is more convenient to use if one doesn't have to know upfront which gpio controller has a line with the name one is searching for, and arrange to look that device up somehow. Or implement this loop oneself. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30test: Add test for new command pci_mpsStephen Carlson
Adds a test for the new pci_mps command to ensure that it can set the Maximum Payload Size (MPS) of all devices to 256 bytes in the sandbox environment. Enables the pci_mps command in the sandbox environment so that this test can be run. Signed-off-by: Stephen Carlson <[email protected]>
2023-03-30cmd: pci: Add command to set MPS of all PCIe devicesStephen Carlson
Enable tuning of the PCI Express MPS (Maximum Payload Size) of each device. The Maximum Read Request Size is not altered. The SAFE method uses the largest MPS value supported by all devices in the system for each device. This method is the same algorithm as used by Linux pci=pcie_bus_safe. The PEER2PEER method sets all devices to the minimal (128 byte) MPS, which allows hot plug of devices later that might only support the minimum size, and ensures compatibility of DMA between two devices on the bus. Signed-off-by: Stephen Carlson <[email protected]>
2023-03-30colibri-imx8x: set bootaux memory base and sizeAndrejs Cainikovs
Move i.MX auxiliary core memory base and size configuration to defconfig where it should belong. Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: update env memory layoutMarcel Ziswiler
Update the distro config env memory layout for the Colibri iMX8X: - kernel_comp_addr_r=0xb0000000 temporary area for uncompressing (ie FIT images or Image.gz booted using booti) - kernel_comp_size=0x08000000 - loadaddr=0x95400000 avoiding any reserved areas located before that - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Idea of memory layout taken from commit a9f1e35bedc4 ("apalis-imx8: update env memory layout"). Note that for our regular BSP Layers and Reference Images for Yocto Project an updated distro boot script is required (see meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot). Signed-off-by: Marcel Ziswiler <[email protected]> Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: switch from fatload to loadAndrejs Cainikovs
Make sure M4 binary loading works equally well on ext4 as well as fat file systems. Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: drop obsolete environment variablesAndrejs Cainikovs
Drop obsolete environment variables boot_file, bootcmd_mfg, fdt_addr, finduuid, image, mfgtool_args, mmcargs, mmcdev, mmcpart, panel, sec_boot, vidargs. Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: construct fdtfile dynamicallyAndrejs Cainikovs
The following expression is used to construct the device tree name: fdtfile=${soc}-colibri-${fdt_board}.dtb - soc is set dynamically (either imx8qxp or imx8dx) - fdt_board can be modified by the user (eval-v3, aster, iris/iris-v2) Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: update update_uboot confirmation messageMarcel Ziswiler
Update update_uboot confirmation message. Signed-off-by: Marcel Ziswiler <[email protected]> Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: remove obsolete sdhc related config definesMarcel Ziswiler
Remove obsolete SDHC related config defines. Nowadays, all SDHC related hardware configuration comes from the device tree. Signed-off-by: Marcel Ziswiler <[email protected]> Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: remove obsolete net usb startMarcel Ziswiler
Remove obsolete net USB start. While at it also add a comment about enabling distro-boot. Signed-off-by: Marcel Ziswiler <[email protected]> Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30colibri-imx8x: Remove baudrate from console argumentPhilippe Schenker
This commit does remove the options argument from the console kernel-argument as it prevents the serial driver from outputting anything. Do this by switchting to use the variable "setup" as it is done on other Toradex modules. Signed-off-by: Philippe Schenker <[email protected]> Signed-off-by: Andrejs Cainikovs <[email protected]>
2023-03-30ARM: imx: Include on-SoM microSD in list of i.MX6 DHCOM boot devicesMarek Vasut
Add mmc1, which is mapped to optional on-SoM microSD socket, to the list of distro boot command boot devices. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-03-30power: pmic: Add NXP PCA9451A PMIC supportYe Li
PCA9451A uses similar BUCKs and LDO regulators as PCA9450B/C but has LDO2 and LDO3 removed. So reuse pca9450 PMIC and regulator driver and add new type for PCA9451A. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2023-03-29mx6sabresd: Convert to DM_PMICFabio Estevam
The usage of DM_PMIC is preferred, so convert to it. This also brings the benefit of causing a significant amount of code removal. Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29mx6sabreauto: Convert to DM_PMICFabio Estevam
The usage of DM_PMIC is preferred, so convert to it. This also brings the benefit of causing a significant amount of code removal. Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29include: configs: am65x_evm: Change to using .envNikhil M Jain
Move to using .env file for setting up environment variables for am65x. Signed-off-by: Nikhil M Jain <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-03-29include: configs: am62ax: Change to using .envNikhil M Jain
Move to using .env file for setting up environment variables for am62ax. This patch depends on https://lore.kernel.org/all/[email protected]/ Signed-off-by: Nikhil M Jain <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-03-29include: configs: j721e_evm: Change to using .envNeha Malcom Francis
Move to using .env file for setting up environment variables for J721E and J7200. Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-03-29include: configs: j721s2_evm: Change to using .envNeha Malcom Francis
Move to using .env file for setting up environment variables for J721S2. Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-03-29include: environment: ti: Use .env for environment variablesNeha Malcom Francis
Add K3 common environment variables to .env. We retain the old-style C environment .h files to maintain compatibility with other K3 boards that have not moved to using .env yet. Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-03-29iot2050: Add support for configuring M.2 connectorJan Kiszka
The M.2 slots of the related IOT2050 variant need to be configured according to the plugged cards. This tries to detect the card using the M.2 configuration pins of the B-key slot. If that fails, a U-Boot environment variable can be set to configure manually. This variable is write-permitted also in secure boot mode as it is not able to undermine the integrity of the booted system. The configuration is then applied to mux the serdes and to fix up the device tree passed to or loaded by the bootloader. The fix-ups are coming from device tree overlays that are embedded into the firmware image and there also integrity protected. The OS remains free to load a device tree to which they do not apply: U-Boot will not fail to boot in that case. Based on original patch by Chao Zeng. Signed-off-by: Jan Kiszka <[email protected]>
2023-03-29iot2050: Add CFG_ENV_FLAGS_LIST_STATICJan Kiszka
Will be needed when CONFIG_ENV_WRITEABLE_LIST is enabled. The listed variables shall remain writable, for informational purposes - they have to be considered untrusted because the persistent U-Boot env is not protected. Signed-off-by: Jan Kiszka <[email protected]>
2023-03-29iot2050: Migrate settings into board env fileJan Kiszka
Anything that is not boot-env related is better kept there by now. At this chance, also drop a stale comment from iot2050.h Signed-off-by: Jan Kiszka <[email protected]>
2023-03-28cli: Correct handling of invalid escape sequences in cread_line()Simon Glass
The second call to cli_ch_process() is in the wrong place, meaning that the one of the characters of an invalid escape sequence is swallowed instead of being returned. Fix the bug and add a test to cover this. This behaviour matches that of the code before cli_getch() was introduced. This was verified on the commit before b08e9d4b66 i.e.: 7d850f85aad ("sandbox: Enable mmc command and legacy images") Signed-off-by: Simon Glass <[email protected]> Reported-by: Heinrich Schuchardt <[email protected]>
2023-03-27Merge branch 'master' into nextTom Rini
2023-03-27rockchip: rk3399: Drop altbootcmdTom Rini
The defined altbootcmd was specific to distro_bootcmd which is not longer in use on these platforms, so drop it. Tested-by: Jonas Karlman <[email protected]> Reviewed-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2023-03-25efi: Split out table-listing code into a new fileSimon Glass
This code is used with EFI_LOADER but is also useful (with some modifications) for the EFI app and payload. Move it into a shared file. Show the address of the table so it can be examined if needed. Also show the table name as unknown if necessary. Our list of GUIDs is fairly small. Signed-off-by: Simon Glass <[email protected]>
2023-03-25efi: Add another tranch of GUIDsSimon Glass
Provide information about the GUIDs supplied by QEMU, so far as it is known. These values are used in the 'efi table' command as well as the printf format string %sU Signed-off-by: Simon Glass <[email protected]>
2023-03-25efi_loader: move dp_alloc() to efi_alloc()Heinrich Schuchardt
The incumbent function efi_alloc() is unused. Replace dp_alloc() by a new function efi_alloc() that we can use more widely. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-03-25efi_loader: move struct efi_device_path to efi.hHeinrich Schuchardt
Avoid forward declaration of struct efi_device_path. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-03-25efi_loader: support for Ctrl() device path nodeHeinrich Schuchardt
* Add the definitions for Ctrl() device path nodes. * Implement Ctrl() nodes in the device path to text protocol. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-03-25efi_loader: support for Ctrl() device path nodeHeinrich Schuchardt
* Add the definitions for Ctrl() device path nodes. * Implement Ctrl() nodes in the device path to text protocol. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-03-22spl: Add function prototype for spl_mmc_get_uboot_raw_sectorTom Rini
We did not add a prototype for spl_mmc_get_uboot_raw_sector to include/spl.h before, so add and document one now. Correct the incorrect prototype in board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c and ensure that we have spl.h where we define a non-weak spl_mmc_get_uboot_raw_sector as well. Signed-off-by: Tom Rini <[email protected]>
2023-03-22arm: total_compute: Remap console logsannsai01
Remapping console logs from soc uart2 (s1 terminal) to css non-secure (uart_ap terminal) Signed-off-by: Annam Sai Manisha <[email protected]>
2023-03-19rockchip: include: configs: Remove unused SDRAM_BANK_SIZEJonas Karlman
Remove unused SDRAM_BANK_SIZE define. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-03-19rockchip: include: configs: Remove dangling commentsJonas Karlman
This removes dangling comments that no longer serve a purpose and has been left after conversion of defines to Kconfig option. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-03-19rockchip: tinker-rk3288: Use common BOOT_TARGET_DEVICESJonas Karlman
Building U-Boot for Tinker Board with USB or NET Kconfig option disabled result in the following build error: In file included from include/configs/rk3288_common.h:29, from include/configs/tinker_rk3288.h:14, from include/config.h:3, from include/common.h:16, from env/common.c:10: include/config_distro_bootcmd.h:302:9: error: expected '}' before 'BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB' 302 | BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/config_distro_bootcmd.h:302:9: note: in definition of macro 'BOOTENV_DEV_NAME_USB' 302 | BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/configs/tinker_rk3288.h:21:9: note: in expansion of macro 'BOOTENV_DEV_NAME' 21 | func(USB, usb, 0) \ | ^~~~ include/config_distro_bootcmd.h:454:25: note: in expansion of macro 'BOOT_TARGET_DEVICES' 454 | "boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0" | ^~~~~~~~~~~~~~~~~~~ include/config_distro_bootcmd.h:474:9: note: in expansion of macro 'BOOTENV_BOOT_TARGETS' 474 | BOOTENV_BOOT_TARGETS \ | ^~~~~~~~~~~~~~~~~~~~ include/configs/rk3288_common.h:40:9: note: in expansion of macro 'BOOTENV' 40 | BOOTENV | ^~~~~~~ include/env_default.h:122:9: note: in expansion of macro 'CFG_EXTRA_ENV_SETTINGS' 122 | CFG_EXTRA_ENV_SETTINGS | ^~~~~~~~~~~~~~~~~~~~~~ In file included from env/common.c:32: include/env_default.h:29:36: note: to match this '{' 29 | const char default_environment[] = { | ^ make[2]: *** [scripts/Makefile.build:256: env/common.o] Error 1 The BOOT_TARGET_DEVICES defined in rockchip-common.h include the same devices as defined in tinker_rk3288.h, remove the board specific one to fix building with USB or NET option disabled. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-03-16Merge tag 'xilinx-for-v2023.07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2023.07-rc1 cmd: - Print results in hex instead of dec in smc command firmware: - Cover missing ZYNQMP_FIRMWARE dependencies fpga: - fix loads for unencrypted use case relocation - Add support for BE systems spi: - Fix xilinx_spi init reset sequence arasan nand: - Remove hardcoded bbt option - Set ofnode value xilinx: - Enable SMC command - Fix some sparse issues zynqmp: - Remove cdns,zynq-gem compatible string - Add optee node - Some DT cleanups zynq: - Some DT cleanups microblaze - Remove MANUAL_RELOC option
2023-03-16Merge tag 'dm-next-12mar23a' of git://git.denx.de/u-boot-dm into nextTom Rini
More tests and fixes for fdt command binman signing feature fix buildman -A bug introduced recently Signed-off-by: Tom Rini <[email protected]>
2023-03-15Merge branch 'master' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-coldfire
2023-03-15Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
Per Andre: [T]hese two patches containing just devicetree updates for Allwinner boards. I was still hoping for a review, since we cannot import the files from the Linux tree verbatim, but managed to write some filter script that convinced me that the changes are fine. The files are from Linux v6.2-rc2, but are identical to the v6.2 release.
2023-03-15board: amcore: fix config options namespaceAngelo Dureghello
Remove CONFIG_ namespace options from .h, moving them to defconfig, while changing non-defconfig options to CFG_ namespace. Signed-off-by: Angelo Durgehello <[email protected]>
2023-03-15m68k: rename CONFIG_MCFTMR to CFG_MCFTMRAngelo Dureghello
This is not a Kconfig option so changing to _CFG. Signed-off-by: Angelo Durgehello <[email protected]>
2023-03-15board: amcore: fix u-boot mtd partitionAngelo Dureghello
Signed-off-by: Angelo Dureghello <[email protected]>
2023-03-14test: Wrap assert macros in ({ ... }) and fix missing semicolonsMarek Vasut
Wrap the assert macros in ({ ... }) so they can be safely used both as right side argument as well as in conditionals without curly brackets around them. In the process, find a bunch of missing semicolons, fix them. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2023-03-14Merge tag 'v2023.04-rc4' into nextTom Rini
Prepare v2023.04-rc4 Signed-off-by: Tom Rini <[email protected]>
2023-03-13video: Clear the vidconsole rather than the videoSimon Glass
It is better to clear the console device rather than the video device, since the console has the text display. We also need to reset the cursor position with the console, but not with the video device. Add a new function to handle this and update the 'cls' command to use it. Signed-off-by: Simon Glass <[email protected]>