aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-07-08Merge branch '2023-07-07-assorted-build-improvements' into nextTom Rini
- Correct a few dependencies in Kconfig and better handle some generated files so that they are properly cleaned later.
2023-07-07sysreset: Change Kconfig GPIO dependencyMichal Simek
DM_GPIO depends on GPIO to be enabled but select will cause that DM_GPIO is selected without GPIO which ends up in compilation error: undefined reference to `dm_gpio_set_value' undefined reference to `dm_gpio_get_value' undefined reference to `dm_gpio_free' undefined reference to `gpio_request_by_name' Signed-off-by: Michal Simek <michal.simek@amd.com> [trini: Fix configs which had relied on these select's] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-07tpl: Kconfig: TPL_BANNER_PRINT depends on DEBUG_UART && TPL_SERIALYing Sun
As implemented in the arch/arm/mach-rockchip/tpl.c file, the CONFIG_TPL_BANNER_PRINT option will not work if either of these options is not enabled. Add dependency constraints to the CONFIG_TPL_BANNER_PRINT option definition to prevent configuration problems where option is enabled but do not take effect. Suggested-by: Yanjie Ren <renyanjie01@gmail.com> Signed-off-by: Ying Sun <sunying@nj.iscas.ac.cn>
2023-07-07common: Kconfig: SYS_CONSOLE_ENV_OVERWRITE depends on SYS_CONSOLE_IS_IN_ENVYing Sun
CONFIG_SYS_CONSOLE_ENV_OVERWRITE is implemented in common/console.c when "#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)" is met. It is recommended to add dependency constraints to its definition. Suggested-by: Yanjie Ren <renyanjie01@gmail.com> Signed-off-by: Ying Sun <sunying@nj.iscas.ac.cn>
2023-07-07cmd: CONFIG_CMD_SAVES depends on CONFIG_CMD_LOADSYing Sun
CONFIG_CMD_SAVES is used to enable support for the "saveenv" command and is only implemented in cmd/load.c when "#if defined(CONFIG_CMD_LOADS)" is met. It is recommended to add dependency constraints to its definition. Prevents "saveenv" command from not being supported when "CONFIG_CMD_SAVES=y CONFIG_CMD_LOADS=n". Suggested-by: Yanjie Ren <renyanjie01@gmail.com> Signed-off-by: Ying Sun <sunying@nj.iscas.ac.cn> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-07test: Find leftovers after clean/mrproperTobias Deiminger
Docs describe 'make clean' to delete most generated files, 'make mrproper' to delete current configuration and all generated files. This test tries to assert it. Idea is to search remaining files by patterns in copies of the initial out-of-source build, which has two advantages: - looking in an out-of-source build dir allows to tell generated source code from committed source code - copying is fast (compared to rebuilding each time) which allows to do a "world clean" Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
2023-07-07Kbuild: Fix cleanup of *.dtbo for sandboxTobias Deiminger
sandbox can generate DT overlays, but they were not cleaned. Extend the explicit clean-files list accordingly. Fixes: 95300f203f32 ("pytest: add sandbox test for "extension" command") Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
2023-07-07Kbuild: Fix cleanup of *.dtb for some archsTobias Deiminger
'make clean' did not descend into arch/$ARCH/dts for arc, m68k, nios2, sh, xtensa. Fix it by adding the missing archs to the explicit clean-dirs list. Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
2023-07-07Kbuild: Fix cleanup of VPLTobias Deiminger
VPL artifacts like example vpl/u-boot-vpl are currently not removed by 'make clean'. We can clean them just as it's already done for SPL and TPL. Fixes: f86ca5ad8f78 ("Introduce Verifying Program Loader (VPL)") Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
2023-07-07Adjust gitignore for tools/generated/Tobias Deiminger
Tell git that auto-generated C sources are now exclusively expected under tools/generated/. Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
2023-07-07Kbuild: Fix cleanup of generated sources in toolsTobias Deiminger
On 'make clean', generated C files in tools/env/ and tools/boot/ are currently not removed, but they should. Auto-generation for shared sources was first introduced with ad80c4a3220b ("kbuild, tools: generate wrapper C sources automatically by Makefile"). Cleanup later regressed (see Fixes:), because shared files were moved out of lib/ and common/, but 'clean-dirs := lib common' was not adjusted accordingly. Further, the generated tools/env/embedded.c became a sibling to project files, which prevents directory-wise cleanup at all. To solve it, we establishe tools/generated/ as the sole place for generated sources. Wrappers are now generated as tools/generated/<orig_dirname>/<orig_filename>, and 'make clean' can remove tools/generated/ as a whole (Linux Makefile.asm-generic headers are cleaned similarly). This way we don't have to maintain separate clean-files or clean-dirs entries for each single added or moved wrapper file. Fixes: 0649cd0d4908 ("Move environment files from common/ to env/") Fixes: 19a91f2464a8 ("Create a new boot/ directory") Signed-off-by: Tobias Deiminger <tdmg@linutronix.de> [trini: Correct mkfwupdate case] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-06Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb ↵Tom Rini
into next
2023-07-06Merge branch 'riscv-for-next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-riscv into next - RISC-V CI OpenSBI version update - Andes ae350 board modification - Sync PolarFire SoC dts with Linux - Support building ubifs
2023-07-06board: ae350: Add missing env variables for bootiYu Chien Peter Lin
The 'booti' command is unable to boot Image.gz due to the absence of required environment variables 'kernel_comp_addr_r' and 'kernel_comp_size'. This commit adds these variables and reorganizes the memory layout to prevent any overlap between binaries and files. Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-06riscv: andes_plicsw: Fix IPI during OpenSBI invocationYu Chien Peter Lin
On some AE350 boards, we need to explicitly initialize the priority registers to a non-zero value so the boot hart can instruct secondary harts to jump to OpenSBI. This patch also updates the information about PLICSW. Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-06RISC-V: CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS descriptionHeinrich Schuchardt
Describe which numeric values can be used for as scratch options for OpenSBI. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2023-07-06clk: starfive: pll: Fix to use postdiv1_maskHoegeun Kwon
There is a problem that the rates of PLL0 and PLL1 are set incorrectly because the postdiv1_mask value is incorrectly entered when setting the pll clk reg. Modify postdiv1's mask value to be put correctly. Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2023-07-06ci: riscv: Update OpenSBI to v1.2Bin Meng
Use the latest OpenSBI v1.2 release binaries for the RISC-V CI. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-06board: microchip: set mac address for ethernet1 on icicleConor Dooley
The dts sync from Linux leaves mac0/ethernet1 enabled on icicle, but U-Boot does not currently set a mac address for it. Expand on the code which currently sets the mac for mac1/ethernet0 to optionally set the mac address for the second ethernet. Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com> Tested-by: Padmarao Begari <padmarao.begari@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2023-07-06riscv: dts: sync mpfs-icicle devicetree with linuxConor Dooley
The "notable" disappearances are: - the pac193x stanza - there's nothing in mainline linux w.r.t. bindings for this & what is going to appear in mainline linux is going to be incompatible with what is currently in U-Boot. - operating points - these operating points should not be set at the soc.dtsi level as they may not be possible depending on the design programmed to the FPGA - clock output names - there are defines for the clock indices, these should not be needed - the dt maintainers in linux NAKed using defines for IRQ numbers - the qspi nand, which is not part of the icicle's default configuration is removed. Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com> Tested-by: Padmarao Begari <padmarao.begari@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Rick Chen <rick@andestech.com>
2023-07-06riscv: dts: drop microchip from dts filenamesConor Dooley
The original names picked for the DT doesn't match Linux's naming scheme and it was renamed there a while ago. Rename it in U-Boot to allow easily syncing dts between the two projects. Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2023-07-06clk: sifive: only build sifive-prci.o for CONFIG_CLK_SIFIVE_PRCIBen Dooks
If we're building non FU540/FU740 SoC drivers, then the sifive-prci.o is not needed. Only build this when CONFIG_CLK_SIFIVE_PRCI is selected. Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-06riscv: define test_and_{set,clear}_bit in asm/bitops.hBen Dooks
These seem to be missing, and trying to build ubifs without them is causing errors due to these being missing. Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-06riscv: implement local_irq_{save,restore} macrosBen Dooks
Add implementations of the local_irq_{save,restore} macros so that <asm/atomic.h> can be used with riscv. Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-06riscv: add generic link for <asm/atomic.h>Ben Dooks
Add a link from <asm/atomic.h> to the generic one to allow things like ubifs to be built. This can be extended with riscv AMO ops at a later date. Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-06cmd/sbi: display new extensionsHeinrich Schuchardt
OpenSBI already implements some extensions that are not ratified yet: * Debug Console Extension (DBCN) * System Suspend Extension (SUSP) * Collaborative Processor Performance Control Extension (CPPC) Allow the sbi command to display these. Provide the FID definitions of the Debug Console Extension. We can use that extension for an early debug console driver. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-07-05Merge tag 'v2023.07-rc6' into nextTom Rini
Prepare v2023.07-rc6
2023-07-04Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-pmic ↵Tom Rini
into next
2023-07-04regulator: handle different error codes in regulator_set_enable_if_allowedEugen Hristev
The regulator core can return different codes which are not considered a real error for this function. Return success in such cases. Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-07-04regulator: rename dev_pdata to platEugen Hristev
Simplify the subsystem by renaming `dev_pdata` to just `plat`. No functional change, just trivial renaming. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-07-04regulator: implement basic reference counterEugen Hristev
Some devices share a regulator supply, when the first one will request regulator disable, the second device will have it's supply cut off before graciously shutting down. Hence there will be timeouts and other failed operations. Implement a reference counter mechanism similar with what is done in Linux, to keep track of enable and disable requests, and only disable the regulator when the last of the consumers has requested shutdown. Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-07-03Prepare v2023.07-rc6Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-03spl: spl_legacy: Fix spl_end addressFabio Estevam
Currently, spl_end points to the __bss_end address, which is an external RAM address instead of the end of the SPL text section in the internal RAM. This causes boot failures on imx6-colibri, for example: ``` Trying to boot from MMC1 SPL: Image overlaps SPL resetting ... ``` Fix this problem by assigning spl_end to _image_binary_end, as this symbol properly represents the end of the SPL text section. From u-boot-spl.map: .end *(.__end) 0x00000000009121a4 _image_binary_end = . Fixes: 77aed22b48ab ("spl: spl_legacy: Add extra address checks") Reported-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Fabio Estevam <festevam@denx.de> Tested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de> # DH i.MX6Q DHCOM PDK2
2023-07-03microblaze: u-boot-spl.lds: Pass _image_binary_endFabio Estevam
Pass _image_binary_end to make a standard way to indicate the end of the text section in SPL. The motivation for this is to have a uniform way to handle the SPL boundary checks. Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2023-07-03sunxi: u-boot-spl.lds: Pass _image_binary_endFabio Estevam
Pass _image_binary_end to make a standard way to indicate the end of the text section in SPL. The motivation for this is to have a uniform way to handle the SPL boundary checks. Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2023-07-03doc: imx: habv4: Fix typo in 'signing'Fabio Estevam
Fix two occurrences where 'signing' is misspelled. Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Tim Harvey <tharvey@gateworks.com>
2023-07-03rockchip: Restore support for boot scripts in legacy image formatJonas Karlman
Use of CONFIG_SPL_FIT_SIGNATURE=y cause CONFIG_LEGACY_IMAGE_FORMAT=n as default, this prevent boot scripts in legacy image format from working and was an unintended change in the listed fixes commits: Wrong image format for "source" command Add CONFIG_LEGACY_IMAGE_FORMAT=y to defconfig for affected boards to restore support for boot scripts in legacy image format. Fixes: 3bf8e4080763 ("board: rockchip: add Radxa ROCK5B Rk3588 board") Fixes: cf777572ca31 ("rockchip: rockpro64: Use SDMA to boost eMMC performance") Fixes: 6e2b8344d60c ("rockchip: rock-pi-4: Use SDMA to boost eMMC performance") Fixes: 1bf49d5a4a7c ("rockchip: rk3566-radxa-cm3-io: Update defconfig") Fixes: 703c170b40f2 ("rockchip: rk3568-evb: Update defconfig") Fixes: 68000f750acd ("rockchip: rk3568-rock-3a: Update defconfig") Fixes: 6fb02589a608 ("rockchip: rk3588-evb: Update defconfig") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-07-03usb: dwc3-generic: Ensure reset GPIO is configured as an outputPeter Korsgaard
GPIOD_ACTIVE_LOW is not enough to configure a GPIO as an output, we need GPIOD_IS_OUT as well. Fixes: b252d79b0936d60b ("usb: dwc3: Add support to reset usb ULPI phy") Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-07-01Merge tag 'efi-2023-07-rc6' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2023-07-rc6 Documentation: * man-pages for the loads and saves commands UEFI: * fix implementation of allow_unaligned() for armv7 and arm11
2023-07-01ARM: arm11: Add C wrapper for allow_unaligned()Marek Vasut
Rename current assembler implementation of allow_unaligned() to arm11_arch_cp15_allow_unaligned() and add it into arm11.h header, then add C wrapper of allow_unaligned(). This fixes misbehavior when linking U-Boot, where the CPU specific allow_unaligned() implementation was ignored and instead the __weak allow_unaligned() implementation from lib/efi_loader/efi_setup.c was used, which led to "data abort" just before booting Linux via tftp, in efi_dp_from_file() -> path_to_uefi() -> utf16_put() . The problem is triggerd by c7c0ca37673 ("efi_loader: fix efi_dp_from_file()") . Adding the wrapper fixes the problem. Fixes: d47a774680d ("arm: arm11: allow unaligned memory access") Signed-off-by: Marek Vasut <marex@denx.de>
2023-07-01ARM: armv7: Add C wrapper for allow_unaligned()Marek Vasut
Rename current assembler implementation of allow_unaligned() to v7_arch_cp15_allow_unaligned() and add it into armv7.h header, then add C wrapper of allow_unaligned(). This fixes misbehavior when linking U-Boot on ARMv7a i.MX6Q, where the CPU specific allow_unaligned() implementation was ignored and instead the __weak allow_unaligned() implementation from lib/efi_loader/efi_setup.c was used, which led to "data abort" just before booting Linux via tftp, in efi_dp_from_file() -> path_to_uefi() -> utf16_put() . The problem is triggerd by c7c0ca37673 ("efi_loader: fix efi_dp_from_file()") . Adding the wrapper fixes the problem. Fixes: 78f90aaeecc ("arm: armv7: allow unaligned memory access") Signed-off-by: Marek Vasut <marex@denx.de>
2023-07-01doc: fix typo loady in loadb man-pageHeinrich Schuchardt
%s/loady/loadb/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-01doc: saves man-pageHeinrich Schuchardt
Provide a man-page for the saves command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-01doc: loads man-pageHeinrich Schuchardt
Provide a man-page for the loads command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-29smegw01: Fix wrong symbol overrideEduard Strehlau
board_mmc_get_env_part() is not called as the default implementation of mmc_get_env_part() is used. Fix this problem by directly calling mmc_get_env_part() instead. Signed-off-by: Eduard Strehlau <eduard@lionizers.com> Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-06-29CI: Azure: Split keymile jobs outTom Rini
Currently the PowerPC build job in Azure will hit the maximum time limit for a build and stop. Looking at the job, the easiest path to reducing it is to move Keymile vendor boards to their own job and exclude them from the PowerPC one (and while at this, the ls102 job). Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-06-29board: freescale: imx93_evk: Fix MMC environment offset boot conflict.Ken Sloat
Currently, the imx93_evk is configured with CONFIG_ENV_IS_IN_MMC and the chosen environment offset in the config is 0x400000. Unless the user programs the associated fuses, this offset is the default secondary boot image offset used by the i.MX 93 ROM bootloader. With certain combinations of environmental variables, the CRC and beginning of the environment can potentially falsely appear as a valid boot image container header. If the expected "sw_version" offset within this mistaken boot image container is greater than the primary's, the ROM bootloader can skip booting of the primary image altogether and attempt to boot with the content of the environment data. This will then hang the system. To fix this, move the environment from 0x400000 to 0x700000 reserving up to 3 MB at 0x400000 for any actual secondary user image container. Signed-off-by: Ken Sloat <ken.s@variscite.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-06-29Merge tag 'u-boot-rockchip-20230629' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip - rockchip inno phy fix; - pinctrl driver in SPL arort in specific case; - fix IO port voltage for rock5b-rk3588 board;
2023-06-29board: rockchip: rock5b-rk3588: fix descriptionEugen Hristev
Update description with correct specifications Fixes: 3bf8e4080763 ("board: rockchip: add Radxa ROCK5B Rk3588 board") Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-06-29pinctrl: rockchip: Fix Data Abort exception in SPLJonas Karlman
Using CONFIG_ARMV8_SPL_EXCEPTION_VECTORS=y and CONFIG_OF_LIVE=y triggers a Data Abort exception from unaligned memory access when the pinctrl driver iterate node properties, e.g. for UART2 on RK3568. setting mux of GPIO0-24 to 1 setting mux of GPIO0-24 to 1 "Synchronous Abort" handler, esr 0x96000021 elr: 000000000000e554 lr : 000000000000e54c x 0: 0000000000000a5c x 1: 0000000000000a5c x 2: 0000000000000007 x 3: 0000000000000065 x 4: 0000000000000007 x 5: 0000000000022d4e x 6: 0000000000000a7c x 7: 00000000000227a4 x 8: 0000000000021cf0 x 9: 0000000000000a7c x10: 0000000000021cf0 x11: 0000000000021cf0 x12: 00000000003fda1c x13: 0000000000000007 x14: 00000000003fd9ec x15: 000000000001c0ff x16: 0000000007000000 x17: 00000000fdccd028 x18: 00000000003fde20 x19: 0000000000000018 x20: 0000000000020670 x21: 0000000000000000 x22: 00000000003fdb00 x23: 00000000003fef90 x24: 0000000000020688 x25: 0000000000000000 x26: 0000000000000001 x27: 00000000003ffc50 x28: 0000000000000000 x29: 00000000003fda60 Code: b94083e1 97ffd508 93407c01 37f81260 (f9401038) Resetting CPU ... Fix this by replacing the loop to access node properties with use of ofnode_for_each_prop instead of the current ifdef. Also continue to next prop instead of aborting at first sign of an unknown property. This fixes the Data Abort exception and also pinconf of e.g. pull and drive in SPL, e.g. for UART2 on RK3568. setting mux of GPIO0-24 to 1 setting mux of GPIO0-24 to 1 setting pull of GPIO0-24 to 5 setting mux of GPIO0-25 to 1 setting mux of GPIO0-25 to 1 setting pull of GPIO0-25 to 5 Fixes: e7ae4cf27a6d ("pinctrl: rockchip: Add common rockchip pinctrl driver") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>