summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2021-07-23reboot-mode: read the boot mode from GPIOs statusNandor Han1-0/+32
A use case for controlling the boot mode is when the user wants to control the device boot by pushing a button without needing to go in user-space. Add a new backed for reboot mode where GPIOs are used to control the reboot-mode. The driver is able to scan a predefined list of GPIOs and return the magic value. Having the modes associated with the magic value generated based on the GPIO values, allows the reboot mode uclass to select the proper mode. Signed-off-by: Nandor Han <nandor.han@vaisala.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-23reboot-mode: add support for reboot mode controlNandor Han2-0/+57
A new driver uclass is created to handle the reboot mode control. The new uclass driver is updating an environment variable with the configured reboot mode. The mode is extracted from a map provided at initialization time. The map contains a list of modes and associated ids. Signed-off-by: Nandor Han <nandor.han@vaisala.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-23net: remove CONFIG_NET_MULTI (again)Michal Simek4-4/+0
CONFIG_NET_MULTI has been removed long time ago by commit 795428fc679f ("net: remove CONFIG_NET_MULTI") but 4 boards were added later which wasn't found. The patch is removing this reference from 4 boards. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
2021-07-23mux: correct prototype for mux_control_try_select()Patrick Wildt1-2/+2
The macro should be passed a state, which should be passed to the actual function. Otherwise using that macro would yield a build error. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
2021-07-23arm: vexpress64: juno: Enable distro_bootcmd functionalityAndre Przywara1-24/+34
The ARM Juno boards can be used as somewhat decent machines to run off-the-shelf distributions, with USB, SATA, GBit Ethernet and 8GB of DRAM. With stable DTs in the board's NOR flash this would work really nicely, however the default boot command is to fetch a kernel and an initrd from the on-board NOR flash, which sounds somewhat embedded. Include the config_distro_bootcmd.h header and define the available devices (starting with USB, to catch USB installer sticks) to make distributions and UEFI work out of the box. The NOR flash kernel functionality is still preserved as the last resort, should all other methods fail. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2021-07-23distro_boot: Fix block device after DHCP boot sequenceAndre Przywara1-1/+1
The generic distro boot sequence iterates over several types of devices, trying one after another. In doing do, it starts with setting the "devtype" variable, then uses this later in more generic commands. Now most (block) device types use a local variable for that, but DHCP puts the type into the environment, where it shadows any local variables. As a consequence any boot attempt after bootcmd_dhcp has been run fails: =========================== VExpress64# run bootcmd_dhcp ... VExpress64# run bootcmd_sata0 SATA#0: (3.0 Gbps) SATA#1: (No RDY) Device 0: Model: 16GB SATA Flash Drive .... ... is now current device Couldn't find partition dhcp 0:1 =========================== This problem typically doesn't show, because DHCP is mostly the last command to try, but is a problem when this order is different, or when distro_bootcmd or bootcmd_xxx are run separately or multiple times. Let bootcmd_dhcp use a local variable, as the other kids do, to make the order of boot commands irrelevant, and allow repeated calls. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-23cmd: pinmux: update result of do_statusPatrick Delaunay1-1/+1
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-23tee: optee: sync cache on pre-reloc OP-TEE invocationEtienne Carriere1-0/+6
This change ensures both U-Boot and OP-TEE see the same content from shared memory when OP-TEE is invoked prior U-Boot relocation. This change is required since U-Boot may execute with data cache off while OP-TEE always enables cache on memory shared with U-Boot. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-07-23Merge branch 'network_master' of ↵Tom Rini1-2/+2
https://source.denx.de/u-boot/custodians/u-boot-net
2021-07-22net: Use phys_addr_t for SMC net device addressesPeter Hoyes1-2/+2
Use same type as eth_device->iobase and support addresses greater than INT_MAX. Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2021-07-22Merge tag 'dm-pull-21jul21' of ↵Tom Rini5-13/+119
https://gitlab.denx.de/u-boot/custodians/u-boot-dm dtoc improvements to show better warnings minor test build fixes sandbox fixes for SDL2 and running TPL bloblist resize feature binman multithreading
2021-07-21blk: Support iterationSimon Glass1-0/+56
It is useful to be able to iterate over block devices. Typically there are fixed and removable devices. For security reasons it is sometimes useful to ignore removable devices since they are under user control. Add iterators which support selecting the block-device type. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21spl: Provide more information on boot failureSimon Glass1-0/+10
If SPL fails to boot, try to provide an error code to indicate what is wrong. For example, if a uclass is missing, this can return -EPFNOSUPPORT (-96) which provides useful information. Add a helper for accessing the image-loader name so we can drop the use of #ifdefs in this code. Put this feature behind a CONFIG_SHOW_ERRORS option to avoid increasing the code size. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21bloblist: Tidy up a few API commentsSimon Glass1-3/+7
Some comments for struct bloblist_hdr are a bit ambiguous. Update them to clarify the meaning more precisely. Also document bloblist_get_stats() properly. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21bloblist: Support resizing a blobSimon Glass1-0/+13
Sometimes a blob needs to expand, e.g. because it needs to hold more log data. Add support for this. Note that the bloblist must have sufficient spare space for this to work. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21cros_ec: Drop cros_ec_entering_mode()Simon Glass1-9/+0
This function is not needed anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21cros_ec: Allow reading the battery-charge stateSimon Glass1-0/+8
Add a function to read this information from the EC. It is useful for determining whether the battery has enough charge to boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-21sandbox: Support executables for more phasesSimon Glass2-1/+25
The SPL header has a function for obtaining the phase in capital letters, e.g. 'SPL'. Add one for lower-case also, as used by sandbox. Use this to generalise the sandbox logic for determining the filename of the next sandbox executable. This can provide support for VPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-20configs: ls2080ardb.h: Update mc size in envPriyanka Jain1-6/+6
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-07-20configs: ls2080aqds.h: Update mc size in envPriyanka Jain1-4/+4
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-07-20configs: ls1088ardb.h: Update mc size in envPriyanka Jain1-12/+12
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-07-20configs: ls1088aqds.h: Update mc size in envPriyanka Jain1-16/+16
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-07-19Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini3-15/+9
- Marvell SheevaPlug: Convert Ethernet and SATA to Driver Model (Tony) - Zyxel NSA310S NAS: Convert to Driver Model (Tony) - Turris_omnia: Add `u-boot-env` NOR partition (Marek) - Turris_omnia: Fixup MTD partitions in Linux' DTB (Marek) - Espressobin: Enable 'mtd' command and define SPI NOR partitions (Pali)
2021-07-19Merge tag 'ti-v2021.10-rc1' of ↵Tom Rini11-348/+539
https://source.denx.de/u-boot/custodians/u-boot-ti - Enabled distro boot for all TI platforms. - Cleanup for AM335x Guardian Board - PRUSS rproc on AM65 platform. - Add PMIC support for J7200 - Misc fixes for Nokia RX-51 # Conflicts: # arch/arm/mach-omap2/am33xx/Kconfig
2021-07-19arm: mvebu: Espressobin: Enable 'mtd' command and define SPI NOR partitionsPali Rohár1-5/+0
U-Boot now supports parsing SPI NOR partitions from Device Tree. So enable 'mtd' command support for Espressobin board and define partition layout in U-Boot Espressobin DTS file. Access to SPI NOR via 'sf' command is old method and 'mtd' command is now preferred variant. From include file remove '#define CONFIG_MTD_PARTITIONS' as this option is now defined and enabled in defconfig file. This change is required to fix compile error: CC arch/arm/lib/asm-offsets.s In file included from include/config.h:4, from include/common.h:16, from lib/asm-offsets.c:14: include/configs/mvebu_armada-37xx.h:63: warning: "CONFIG_MTD_PARTITIONS" redefined #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */ In file included from ././include/linux/kconfig.h:4, from <command-line>: include/generated/autoconf.h:44: note: this is the location of the previous definition #define CONFIG_MTD_PARTITIONS 1 After enabling support for mtd command, output from 'mtd list' on Espressobin board is: => mtd list List of MTD devices: * w25q32dw - device: spi-flash@0 - parent: spi@10600 - driver: jedec_spi_nor - path: /soc/internal-regs/spi@10600/spi-flash@0 - type: NOR flash - block size: 0x1000 bytes - min I/O: 0x1 bytes - 0x000000000000-0x000000400000 : "w25q32dw" - 0x000000000000-0x0000003f0000 : "firmware" - 0x0000003f0000-0x000000400000 : "u-boot-env" => Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-19arm: kirkwood: Marvell Sheevaplug: Add DM SATA and remove IDE configsTony Dinh1-5/+4
Enable DM SATA, removed IDE driver, and add SATA MV driver. Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2021-07-19arm: kirkwood: NSA310S: Add DM SATA configsTony Dinh1-5/+5
Enable DM SATA, removed IDE driver, and add SATA MV driver. Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2021-07-19treewide: Test on CONFIG_USB_HOST (or CONFIG_CMD_USB) not CONFIG_USBTom Rini3-3/+3
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-19tegra: Test on CONFIG_CMD_USB being enabled for distro bootcmdTom Rini1-1/+8
Reuse the common logic to allow for BOOT_TARGET_DEVICES to list USB as a possibility if we're building for a platform that will have USB but not if we don't, so that we don't hit the link-time check for trying to have USB boot on a non-USB system. Acked-by: Tom Warren <twarren@nvidia.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19ge_bx50v3: Remove unused USB related definesTom Rini1-11/+0
These USB defines do not change the build as there is no USB support enabled currently. Cc: Ian Ray <ian.ray@ge.com> Cc: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-07-19m68k: Remove M52277EVB boardTom Rini1-243/+0
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. As this is also the last in family remove the related support as well. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19m68k: Remove M54451EVB boardTom Rini1-242/+0
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. As this is also the last in family remove the related support as well. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19m68k: Remove M54418TWR boardTom Rini1-283/+0
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-19m68k: Remove M54455EVB boardTom Rini1-356/+0
This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. Cc: Angelo Durgehello <angelo.dureghello@timesys.com> Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-18efi_capsule: Move signature from DTB to .rodataIlias Apalodimas1-0/+2
The capsule signature is now part of our DTB. This is problematic when a user is allowed to change/fixup that DTB from U-Boots command line since he can overwrite the signature as well. So Instead of adding the key on the DTB, embed it in the u-boot binary it self as part of it's .rodata. This assumes that the U-Boot binary we load is authenticated by a previous boot stage loader. Reviewed-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-07-17Merge branch '2021-07-16-cleanup-image-support'Tom Rini3-121/+14
- A large rework of the logic around supporting various image types/formats and sharing between the host and target.
2021-07-17Merge tag 'u-boot-imx-20210717' of ↵Tom Rini5-5/+50
https://gitlab.denx.de/u-boot/custodians/u-boot-imx i.MX ---- - mx7ulp : fix WDOG - imx8 : Phytec - USB3 support for i.MX8 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/8277
2021-07-16image: Eliminate IMAGE_ENABLE_VERIFY_ECDSA macroAlexandru Gagniuc1-3/+0
This macro is no longer needed for code flow or #ifdefs. Remove it. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-16image: Eliminate IMAGE_ENABLE_VERIFY macroAlexandru Gagniuc1-4/+1
This macro is no longer needed for code flow or #ifdefs. Remove it. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-16lib: rsa: Remove #ifdefs from rsa.hAlexandru Gagniuc1-47/+0
It is no longer necessary to implement rsa_() functions as no-ops depending on config options. It is merely sufficient to provide the prototypes, as the rsa code is no longer linked when unused. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-16lib: ecdsa: Remove #ifdefs from ecdsa.hAlexandru Gagniuc1-25/+0
It is no longer necessary to implement ecdsa_() functions as no-ops depending on config options. It is merely sufficient to provide the prototypes, as the ecdsa code is no longer linked when unused. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-16image: Add support for placing crypto_algo in linker listsAlexandru Gagniuc1-0/+5
The purpose of this change is to enable crypto algorithms to be placed in linker lists, rather than be declared as a static array. The goal is to remove the crypto_algos array in a subsequent patch. Create a new linker list named "cryptos", and search it when image_get_crypto_algo() is invoked. NOTE that adding support for manual relocation of crypto_algos within linker lists is beyond the scope of this patch. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-16image: Drop IMAGE_ENABLE_BEST_MATCHSimon Glass1-5/+0
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-07-16image: Drop IMAGE_ENABLE_SHAxxxSimon Glass1-21/+0
We already have a host Kconfig for these SHA options. Use CONFIG_IS_ENABLED(SHAxxx) directly in the code shared with the host build, so we can drop the unnecessary indirections. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-07-16image: Drop IMAGE_ENABLE_SHA1Simon Glass1-8/+0
We already have a host Kconfig for SHA1. Use CONFIG_IS_ENABLED(SHA1) directly in the code shared with the host build, so we can drop the unnecessary indirection. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-07-16Kconfig: Rename SPL_MD5_SUPPORT to SPL_MD5Simon Glass1-1/+1
Drop the _SUPPORT suffix so we can use CONFIG_IS_ENABLED() with this option. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-07-16Kconfig: Rename SPL_CRC32_SUPPORT to SPL_CRC32Simon Glass1-1/+1
Drop the _SUPPORT suffix so we can use CONFIG_IS_ENABLED() with this option. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-07-16image: Rename CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORTSimon Glass2-5/+5
Drop the ENABLE and SUPPORT parts of this, which are redundant. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-07-16image: Rename SPL_SHAxxx_SUPPORT to SPL_FIT_SHAxxxSimon Glass1-4/+4
These option are named inconsistently with other SPL options, thus making them incompatible with the CONFIG_IS_ENABLED() macro. Rename them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-07-16image: Shorten FIT_ENABLE_SHAxxx_SUPPORTSimon Glass1-6/+6
The ENABLE part of this name is redundant, since all boolean Kconfig options serve to enable something. The SUPPORT part is also redundant since Kconfigs can be assumed to enable support for something. Together they just serve to make these options overly long and inconsistent with other options. Rename FIT_ENABLE_SHAxxx_SUPPORT to FIT_SHAxxx Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>