aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-07-09Merge tag 'fsl-qoriq-2023-7-6' of ↵WIP/09Jul2023-nextTom Rini31-38/+174
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next Enable DM Serial for ls1043ardb and ls1046ardb/afrwy Fixed secure boot on LS-CH2 platforms
2023-07-08Merge branch '2023-07-07-assorted-build-improvements' into nextTom Rini14-40/+153
- 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 Simek4-2/+5
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 Sun1-0/+1
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 Sun1-0/+1
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 Sun1-0/+1
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 Deiminger1-0/+105
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 Deiminger1-1/+1
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 Deiminger1-1/+3
'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 Deiminger1-2/+2
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 Deiminger2-1/+1
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 Deiminger1-33/+33
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 ↵WIP/06Jul2023-nextTom Rini1-1/+1
into next
2023-07-06Merge branch 'riscv-for-next' of ↵Tom Rini24-632/+597
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 Lin1-5/+9
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 Lin1-3/+22
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 Schuchardt1-2/+4
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 Kwon1-1/+1
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 Meng2-8/+8
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 Dooley1-3/+12
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 Dooley6-518/+413
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 Dooley6-6/+6
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 Dooks1-3/+1
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 Dooks1-0/+3
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 Dooks1-4/+13
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 Dooks1-0/+14
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 Schuchardt2-0/+12
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-06LFU-544: Kconfig.nxp: Fixed secure boot on LS-CH2 platformsKshitiz Varshney1-1/+1
pimg64 image pointer is dependent on ESBC_ADDR_64BIT config, which is getting disabled, due to dependency on ESBC_HDR_LS. ESBC_HDR_LS is required for LS-CH3 platforms. So, removing the dependency on ESBC_HDR_LS. Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
2023-07-06configs: ls1046afrwy: enable DM_SERIALCamelia Groza2-2/+6
As the serial devices are configured in the device tree, enable DM_SERIAL in the ls1046afrwy defconfigs. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-06configs: ls1046ardb: enable DM_SERIALCamelia Groza8-8/+21
As the serial devices are configured in the device tree, enable DM_SERIAL in the ls1046ardb defconfigs. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-06arch: arm: dts: ls1046a: tag serial nodes with bootph-allCamelia Groza3-0/+29
Make sure the serial driver is initialized before relocation by tagging the serial nodes with "bootph-all". In order to keep the serial nodes in sync with their representation in the Linux dts, add these u-boot specific properties to *-u-boot.dtsi files. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-06arch: arm: dts: ls1046a: sync serial nodes with LinuxCamelia Groza4-12/+54
Pick up the serial node descriptions from Linux v6.3 for the ls1046ardb and ls1046afrwy boards and their dependencies. Including the fsl,qoriq-clockgen.h and arm-gic.h headers forces us to change the include directives to explicitly go through the C preprocessor for all boards in the ls1046a SoC family. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-06configs: ls1043ardb: enable DM_SERIALCamelia Groza8-8/+22
As the serial devices are configured in the device tree, enable DM_SERIAL in the ls1043ardb defconfigs. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-06arch: arm: dts: ls1043a: tag serial nodes with bootph-allCamelia Groza2-0/+24
Make sure the serial driver is initialized before relocation by tagging the serial nodes with "bootph-all". In order to keep the serial nodes in sync with their representation in the Linux dts, add these u-boot specific properties to *-u-boot.dtsi files. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-06arch: arm: dts: ls1043a: sync serial nodes with LinuxCamelia Groza3-7/+17
Pick up the serial node descriptions from Linux v6.3 for the ls1043ardb board and its dependencies. Including the fsl,qoriq-clockgen.h and arm-gic.h headers forces us to change the include directives to explicitly go through the C preprocessor for all boards in the ls1043a SoC family. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-05Merge tag 'v2023.07-rc6' into nextTom Rini124-4047/+5023
Prepare v2023.07-rc6
2023-07-04Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-pmic ↵WIP/04Jul2023-nextTom Rini6-59/+107
into next
2023-07-04regulator: handle different error codes in regulator_set_enable_if_allowedEugen Hristev1-0/+6
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 Hristev5-67/+66
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 Hristev2-0/+43
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-rc6v2023.07-rc6Tom Rini2-3/+5
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-03spl: spl_legacy: Fix spl_end addressWIP/03Jul2023Fabio Estevam1-1/+1
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 Estevam1-0/+1
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 Estevam2-0/+2
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 Estevam2-2/+2
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 Karlman7-0/+7
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 Korsgaard1-1/+1
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 ↵WIP/01Jul2023Tom Rini10-7/+217
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 Vasut3-3/+21
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 Vasut3-3/+9
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>