summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-05-07efi_loader: add sha384/512 on certificate revocationIlias Apalodimas4-23/+131
Currently we don't support sha384/512 for the X.509 certificate in dbx. Moreover if we come across such a hash we skip the check and approve the image, although the image might needs to be rejected. Rework the code a bit and fix it by adding an array of structs with the supported GUIDs, len and literal used in the U-Boot crypto APIs instead of hardcoding the GUID types. It's worth noting here that efi_hash_regions() can now be reused from efi_signature_lookup_digest() and add sha348/512 support there as well Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-05-07bootmenu: factor out the user input handlingMasahisa Kojima3-141/+148
This commit moves the user input handling from cmd/bootmenu.c to common/menu.c to reuse it from other modules. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-07efi_loader: Select EVENT as wellJan Kiszka1-0/+1
Fixes WARNING: unmet direct dependencies detected for EVENT_DYNAMIC Depends on [n]: EVENT [=n] Selected by [y]: - EFI_LOADER [=y] && OF_LIBFDT [=y] && ... and the succeeding build breakage. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-07tools: mkimage: set OPENSSL_API_COMPATHeinrich Schuchardt1-0/+3
Building with OpenSSL 3.0 produces warnings like: ../tools/sunxi_toc0.c:846:17: warning: ‘RSA_get0_d’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 846 | if (root_key && RSA_get0_d(root_key)) { | ^~ As OpenSSL 3.0 is not available in elder Linux distributions just silence the warning. Add missing #include <openssl/bn.h>. Fixes: e9e87ec47c75 ("tools: mkimage: Add Allwinner TOC0 support") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: Andre Przywara <andre.przywara@arm.com>
2022-05-07mkimage: Document misc optionsSean Anderson2-5/+46
Over the years, several options have not made it into the help message. Document them. Do the same for the man page. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-05-07Makefile: support CROSS_COMPILE=armv7a-*Heinrich Schuchardt1-1/+1
Gentoo uses armv7a-hardfloat-linux-gnueabi- as cross compiler prefix. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-07Makefile: Avoid non-portable GNU sed extensionMark Kettenis1-1/+1
Use [:space:] instead of \s and \S in regular expression that determines the sandbox target architecture. Fixes the build failure on OpenBSD introduced with commit 4e65ca00f3a3 ("efi_loader: bootmgr: add booting from removable media"). Fixes: f7691a6d736b ("sandbox: allow cross-compiling sandbox") Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-05-06Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini1-85/+32
2022-05-06Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini3-0/+126
- Add MAX6370 watchdog timer driver (Pali)
2022-05-06usb: host: ehci-generic: Remove DM_REGULATOR flagPatrice Chotard1-14/+0
Since commit 16cc5ad0b439 ("power: regulator: add dummy helper") regulator dummy helper are always available even if DM_REGULATOR is not set. DM_REGULATOR flag is no more needed to protect no DM core, remove it. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-05-06usb: host: ehci-generic: Make usage of clock/reset bulk() APIPatrice Chotard1-71/+32
Make usage of clock and reset bulk API in order to simplify the code Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-05-06watchdog: Add MAX6370 watchdog timer driverPali Rohár3-0/+126
MAX6370 watchdog is available e.g. on Freescale P1/P2 RDB-PC boards. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-05Merge branch '2022-05-05-assorted-cleanups-and-fixes'Tom Rini38-353/+61
- Assorted minor code cleanups. - Clean-up the reset uclass code slightly and fix some issues with a lack of handlers for a case in the driver. - Y2038 RTC fix
2022-05-05misc: fs_loader: Fix compile warnings when CONFIG_CMD_UBIFS is enabledPali Rohár1-0/+4
drivers/misc/fs_loader.c: In function ‘mount_ubifs’: drivers/misc/fs_loader.c:46:12: warning: implicit declaration of function ‘ubi_part’ [-Wimplicit-function-declaration] int ret = ubi_part(mtdpart, NULL); ^~~~~~~~ drivers/misc/fs_loader.c:53:9: warning: implicit declaration of function ‘cmd_ubifs_mount’ [-Wimplicit-function-declaration] return cmd_ubifs_mount(ubivol); ^~~~~~~~~~~~~~~ drivers/misc/fs_loader.c: In function ‘umount_ubifs’: drivers/misc/fs_loader.c:58:9: warning: implicit declaration of function ‘cmd_ubifs_umount’ [-Wimplicit-function-declaration] return cmd_ubifs_umount(); ^~~~~~~~~~~~~~~~ Signed-off-by: Pali Rohár <pali@kernel.org>
2022-05-05reset: Return 0 if ops unimplemented and remove empty functionsMarek Vasut25-302/+6
In case the ops is not implemented, return 0 in the core right away. This is better than having multiple copies of functions which just return 0 in each reset driver. Drop all those empty functions. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
2022-05-05clk: scmi: fix scmi_clk_get_attibute()Heinrich Schuchardt1-5/+3
Local variable out.name lives on the stack and therefore cannot be returned directly. Move the strdup() call into the function. (Coverity 352460) Fixes: 7c33f78983c3 ("clk: scmi: register scmi clocks with CCF") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-05-05tools: mkimage: Avoid ENODATA in host toolsMark Kettenis1-1/+1
ENODATA isn't part of POSIX. Use EINVAL instead. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-05rtc: rv8803: fix off-by-one in month countingOliver Graute1-2/+2
tm_mon has a range from 0..11, but the RTC expects 1..12. So we adapt the month accordingly. This was determined when comparing the driver with the corresponding linux kernel driver. Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Reviewed-by: Michael Walle <michael@walle.cc> Reviewed-by: Heiko Schocher <hs@denx.de>
2022-05-05cmd: mmc: don't assign unused valuesHeinrich Schuchardt1-2/+4
Don't assign a value to variable speedmode which is never used. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-05cmd: onenand: fix printf codesHeinrich Schuchardt1-3/+3
For printing size_t use %zu or %zx. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-05cmd: simplify do_adc_single()Heinrich Schuchardt1-6/+1
If argc is not < 3, it must be >= 3. If argc >= 3, argv[2] cannot be NULL. Fixes: 9de612ae4ded ("cmd: adc: Add support for storing ADC result in env variable") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-05cmd: fix long text for fdt commandHeinrich Schuchardt1-1/+1
We don't have an option -cq but two distinct options -c and -q. Fixes: e9496ec37440 ("fdt: Add -q option to fdt addr for distro_bootcmd") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-05lib/date: Make rtc_mktime and mktime64 Y2038-readyJan Kiszka3-14/+10
We currently overflow due to wrong types used internally in rtc_mktime, on all platforms, and we return a too small type on 32-bit. One consumer that directly benefits from this is mktime64. Many others may still store the result in a wrong type. While at it, drop the redundant cast of mon in rtc_mktime (obsoleted by 714209832db1). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-05-05serial: smh: Check return value of strndupSean Anderson1-0/+3
strndup can fail. Check for it. Fixes: 4855b39be ("serial: smh: Implement puts for DM") Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-05-05tools/imagetool: Fix segfault when tparams->verify_header is NULLNicolas Heemeryck1-17/+23
On some image types like i.MX8 and i.MX8M, the verify_header function is not implemented. Before this commit, no check on tparams->verify_header was done causing a segfault if NULL. Now, a proper error message is printed. Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>
2022-05-05configs: Resync with savedefconfigTom Rini47-93/+49
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-05-05Merge branch '2022-05-05-platform-updates'Tom Rini48-71/+3561
- Nuvoton NPCM750 board support and some related drivers - MediaTek pinctrl updates - Bugfixes for sandbox, ls10xxx, and 64bit TI platforms
2022-05-05gpio: npcm: Add support for Nuvoton NPCM SoCsStanley Chu3-0/+131
Add Nuvoton BMC NPCM7xx/NPCM8xx gpio driver Signed-off-by: Stanley Chu <yschu@nuvoton.com>
2022-05-05include: configs: am**x/j721e/j721s2_evm.h: Move the stack pointer init ↵Aswath Govindraju4-8/+4
address in arm64 Currently, in case of arm64 bootloader and U-Boot the stack pointer is initialized at an offset of NON_SECURE_MSRAM_SIZE from arm64 SPL's text base address. After jumping to arm64, execution is done out of DDR. Therefore, having an offset corresponding to the size of MSRAM does not have any significance. Instead, initialize the stack pointer after an offset of 4MB from the SPL text base address. This helps in allocating larger memory for stack. ┌────────────────────┐0x80080000 │ │ │ arm64 SPL │ ├────────────────────┤ │ ▲ │ │ │ │ │ STACK │ ├────────────────────┤0x80480000 │ Memory for Load │ │ Buffer Allocation │ ├────────────────────┤0x80800000 │ │ │ U-Boot Image │ │ │ └────────────────────┘ Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-05-05pinctrl: mediatek: add support for different types of IO pinsSam Shih2-5/+81
There are many pins in an SoC, and register usage may vary by pins. This patch introduces a concept of "io type" and "io type group" to mediatek pinctrl drivers. This can provide different pinconf handlers implementation (eg: "bias-pull-up/down", "driving" and "input-enable") for IO pins that belong to different types. Signed-off-by: Sam Shih <sam.shih@mediatek.com>
2022-05-05pinctrl: mediatek: introduce multiple memory bases supportSam Shih2-20/+57
Pinctrl design of some mediatek SoC need to access registers that distribute in multiple memory base address. this patch introduce new mechanism in mediatek pinctrl driver to support the chips which have the new design. This patch add a member 'base_calc' in pinctrl private data, and changed original 'base' private data to an array of *iomem. When 'base_calc' attribute is set, it will requests multiplue regs base from the DT, if 'base_calc' attribute is not set, it only use legacy way to request single reg resource from the DT. Signed-off-by: Sam Shih <sam.shih@mediatek.com>
2022-05-05pinctrl: mediatek: rewrite mtk_pinconf_set and related functionsSam Shih2-30/+114
There are many pins in a SoCs, and different pin may belong to different "io_type", For example: some pins of MT7622 belongs to "io_type A", the other belongs to "io_type B", and pinctrl "V0" means handle pinconf via "io_type A" or "io_type B", so SoCs that contain "io_type A" and "io_type B" pins, use "V0" in pinctrl driver. This patch separates the implementation of register operations (e.g: "bias-pull-up/down", "driving" and "input-enable") into different functions, and lets the original V0/V1 ops to call the new functions. Signed-off-by: Sam Shih <sam.shih@mediatek.com>
2022-05-05sandbox: Avoid binman error when run without device treeSimon Glass2-1/+38
With sandbox, U-Boot can be run without a device tree (i.e. no -d or -T parameter). In this case an empty device tree is created for convenience. With a recent change this causes an error due to the missing '/binman' node. Add this node to avoid the problem, as well as a test that U-Boot can be run without a device tree. Fixes: 059df5624b ("arch: Kconfig: imply BINMAN for SANDBOX") Fixes: https://source.denx.de/u-boot/u-boot/-/issues/11 Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-05test/py: Add a way to start sandbox without a device treeSimon Glass1-7/+8
This is useful sometimes when running a specific test. Add support for it in the existing restart_uboot_with_flags() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-05board: synquacer: developerbox: Remove Masami from MAINTAINERSMasami Hiramatsu1-1/+0
Remove Masami Hiramatsu from MAINTAINERS since he will leave Linaro and his email will be not available anymore. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2022-05-05ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN defaultSean Anderson1-3/+1
SPL_SYS_MALLOC_F_LEN defaults to SYS_MALLOC_F_LEN. 0x10000 is 64 KiB, or around half of the total OCRAM size. Revert to the default of 0x2000. This fixes SPL boot. Fixes: 545eceb520 ("imx8/ls10xx: Use a sane SYS_MALLOC_F_LEN default") Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-05-05timer: npcm: Add NPCM timer supportJim Liu3-0/+125
Add Nuvoton BMC NPCM7xx/NPCM8xx timer driver. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Signed-off-by: Stanley Chu <yschu@nuvoton.com>
2022-05-05serial: npcm: Add support for Nuvoton NPCM SoCsJim Liu3-0/+167
Add Nuvoton BMC NPCM7xx/NPCM8xx uart driver Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Signed-off-by: Stanley Chu <yschu@nuvoton.com>
2022-05-05clk: nuvoton: Add support for NPCM750Jim Liu6-0/+548
Add clock controller driver for NPCM750 Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Signed-off-by: Stanley Chu <yschu@nuvoton.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-05-05arm: nuvoton: Add support for Nuvoton NPCM750 BMCJim Liu22-0/+2291
Add basic support for the Nuvoton NPCM750 EVB (Poleg). Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2022-05-04Merge tag 'efi-2022-07-rc2-2' of ↵Tom Rini24-100/+576
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-07-rc2-2 * Test Unit test for 'bootmenu' command * UEFI Preparatory patches for implementing a UEFI boot options based menu
2022-05-04Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini97-2867/+33853
- mips: octeon: Add ethernet support (Aaron & Stefan) - Misc mvneta changes, cleanups, fixes (Marek)
2022-05-04Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-spiTom Rini5-34/+468
- NPCM7xx FIU SPI driver (Jim Liu) - AT45DB641E dataflash (Luca Ellero)
2022-05-04net: mvneta: Drop unneeded macroMarek Behún1-3/+1
Macro MVNETA_GMAC_FORCE_LINK_UP can be dropped from value assignment in fixed link case, since it's value is written into the register later in the function for link-down-to-link-up case. The value is written as MVNETA_GMAC_FORCE_LINK_DOWN | MVNETA_GMAC_FORCE_LINK_PASS, and so the macro definition can also be dropped. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-04net: mvneta: Disable fixed PHY code if PHY_FIXED is not compiled inMarek Behún1-2/+4
Guard the code handling the fixed PHY case by CONFIG_IS_ENABLED(PHY_FIXED). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-04net: mvneta: Drop fixed_link member from private structMarek Behún1-5/+2
Since this member is checked only at two places drop it and inline it's usage. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-04net: mvneta: Write PHY address just before enabling HW pollingMarek Behún1-4/+2
Write PHY address just before enabling HW polling of the PHY. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-04net: mvneta: Convert to use PHY_FIXED for fixed-linkMarek Behún3-61/+39
Stop parsing fixed-link in the MAC driver. Instead support only PHY mode and let the fixed PHY driver handle the fixed-link case. Enable CONFIG_PHY_FIXED for mvneta boards that need it: Turris Omnia and ESPRESSObin. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-04net: mvneta: Rename CONFIG_NR_CPUS to MVNETA_NR_CPUSMarek Behún1-2/+2
The CONFIG_* macros are reserved for Kconfig. This was probably done when this driver was being imported from Linux. Rename the macro. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-05-04net: mvneta: Don't check for CONFIG_PHYLIBMarek Behún1-4/+0
Drop checking for CONFIG_PHYLIB in mvneta, this is already done in Kconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>