summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
3 daysspl: spi: fix falcon mode for spi bootHEADmasterAnshul Dalal
spl_start_uboot is a board overridable function that switches to falcon boot mode on return value of 0. Though for SPI, the falcon boot mode was being enabled on return value of 1 which is not the correct behaviour. Therefore this patch fixes it to the expected boot flow. Fixes: 14509a28aa20 ("spl: spi: Consolidate spi_load_image_os into spl_spi_load_image") Signed-off-by: Anshul Dalal <anshuld@ti.com>
4 daysspl: SPL_DM_SPI_FLASH depends on SPL_DM_SPIHeinrich Schuchardt
The SPI flash driver does not build without SPI support enabled. Fixes: 4151f4f822bb ("spl: Rework and tighten some dependencies") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Peng Fan <peng.fan@nxp.com> Acked-by: Anshul Dalal <anshuld@ti.com>
2025-08-14common: spl: fix compilation warningLeo Yu-Chi Liang
Explicitly specify the type by replacing macro with variable to fix the possible compilation warning. Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-07-30Merge patch series "Extend usb_onboard_hub driver to support Cypress HX3 hub ↵Tom Rini
family" Lukasz Czechowski <lukasz.czechowski@thaumatec.com> says: This patch series extends the usb_onboard_hub driver to allow for support of more types of onboard hub devices, and adds the Cypress HX3 hub family. First patch in the series updates the bind function, so that it no longer uses hardcoded compatible strings. Next patch simplifies the code, by removing unnecessary dm_gpio function call. Third patch updates the remove function, which allows the prevent issues with usb devices reenumeration, in case of calling "usb reset". Although the issue could still occur in case of invalid initial state of reset gpio, it is minimized with no impact on main usb_hub driver. Fourth patch extends the driver with support for multiple power supplies, the same way it is done in kernel driver. Finally, last patch provides hub data and of_match table entries for Cypress HX3 Link: https://lore.kernel.org/r/20250722-usb_onboard_hub_cypress_hx3-v4-0-91c3ee958c0e@thaumatec.com
2025-07-30usb: onboard-hub: Add support for Cypress HX3 familyLukasz Czechowski
The HX3 is a family of USB3.0 hub controllers that comes in different variants: CYUSB330x/CYUSB331x/CYUSB332x/CYUSB230x. To support this hub, controlling of reset pin and two power supplies is required. The reset time is set to 10ms, based on the datasheet [1]. Power-on delay time is not required, so it is set to 0. The compatible strings added to of_match table are compliant with usb/cypress,hx3.yaml bindings. [1] https://www.infineon.com/dgdl/Infineon-HX3_USB_3_0_Hub_Consumer_Industrial-DataSheet-v22_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ecb53f644b8 Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
2025-07-30usb: onboard-hub: Add support for multiple power suppliesLukasz Czechowski
Some of the onboard hubs require multiple power supplies, so extend the driver to support them. The implementation is inspired by the kernel driver, as introduced by commit [1] in the v6.10 kernel. [1] https://github.com/torvalds/linux/commit/ec1848cd5df426f57a7f6a8a6b95b69259c52cfc Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
2025-07-30usb: onboard-hub: Set the reset gpio pin before freeingLukasz Czechowski
In the usb_onboard_hub_remove, the reset gpio, if available, is freed. The pin state however, remains unchanged, as set in the usb_onboard_hub_reset. The hub is then left enabled. During second onboard hub probing, the hub is initially enabled (reset pin in state "0"), and then it is being reset by the reset function (transition to "1" and then to "0"). Because of this, the hub first disconnects from root hub, and then it connects again. When the devices are being discovered in the usb_scan_port in the usb_hub driver, initially there is the USB_PORT_STAT_CONNECTION bit not set in portstatus, but USB_PORT_STAT_C_CONNECTION set in portchange data (which is because disconnect event occurred first). In this condition, the driver does not wait for devices to appear. This can cause the hub (and all child devices) to be not enumerated when rescanning on "usb reset" command. To fix this, set the reset gpio to active in usb_onboard_hub_remove, to put the hub into reset state. However, in case the hub reset pin is by default held in high state by HW before U-Boot takes over, in which case the USB hub is active, then during the first probe it gets reset and we might get into the same issue of the hub being not enumerated. Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
2025-07-30usb: onboard-hub: Use devm API do automatically free the reset GPIOLukasz Czechowski
The reset GPIO is obtained during driver probing by the function devm_gpiod_get_optional, which means the GPIO will be automatically freed when the device is removed. Because of this, explicit call to free the reset GPIO in hub remove function is not needed. To support the Managed device resources, the DEVRES config must be enabled, otherwise the devres functions fall back to non-managed variants. Set the necessary dependency to DEVRES in Kconfig. Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
2025-07-30usb: onboard-hub: Use the ofnode to check if the peer-hub was probedLukasz Czechowski
Currently the check in usb_onboard_hub_bind is relying on specific compatible string for the Michrochip USB5744. Replace this with more generic approach that will allow to add new types of devices to the of_match table. Because the driver only needs to bind one "half" of the hub, the peer-hub node is used to find out if it was already done. In case peer-hub was bound, -ENODEV is returned. Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
2025-07-29spl: NULL check variable before dereferenceAndrew Goodbody
In boot_from_devices the variable loader is not NULL checked after assignment and before first use but later code does check it for NULL. Add a NULL check before first use. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-28treewide: fix Casey's nameCasey Connolly
I updated the mailmap a while back but it's nice to have authorship comments adjusted too. Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2025-07-27sunxi: add basic A523 supportAndre Przywara
Add the basic Kconfig options, addresses and other values for the existing Kconfig settings for the new Allwinner A523/T527/H728 SoC. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-07-24spl: spl_imx_container: Delete uninitialized variableYe Li
The 'overhead' variable is uninitialized and actually shall not be used. Delete it to fix coverity CID 37041718 - Uninitialized scalar variable. Fixes: 73c40fcb7367 ("spl: Refactor spl_load_info->read to use units of bytes") Reported-by: Andrew Goodbody <andrew.goodbody@linaro.org> Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-17spl: imx: Add support for new PQC containerYe Li
To support PQC container format which is used for post quantum authentication on new i.MX parts like i.MX94 The major changes compared to legacy container format is in signature block, new container tag and version, and new alignment of container header. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Jacky Bai <ping.bai@nxp.com> Signed-off-by: Alice Guo <alice.guo@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2025-07-16common/avb_verify.c: Make use of LBAF for printing lbaint_tTom Rini
When printing the contents of an lbaint_t variable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Link: https://lore.kernel.org/r/20250702010603.19354-2-trini@konsulko.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-07-14Fix autoboot countdown printing wrongDavid Zang
Originally when bootdelay >99, the countdown breaks. Setting bootdelay at 101 or bigger will trigger this error. Signed-off-by: David Zang <davidzangcs@gmail.com>
2025-07-11Kconfig: Test for !COMPILE_TEST in some locationsTom Rini
We have a few options that we cannot enable in a "allyesconfig" type build because we cannot use zero as a default value. - The logic around HAS_BOARD_SIZE_LIMIT assumes that if we have set this then we compare with it. Similarly, we need to set SPL_NO_BSS_LIMIT as the default there. - Both SYS_CUSTOM_LDSCRIPT and ENV_USE_DEFAULT_ENV_TEXT_FILE then prompt for a file name to use. - The SYS_I2C_SOFT driver is a legacy driver which requires a lot of configuration within the board config. file instead, so disable it. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-11global: Make ARCH_MISC_INIT a selected symbolTom Rini
This symbol is not something that the user should be enabling or disabling but rather the developer for a particular board should select it when required. This is mostly size neutral, however a few places do have changes. In the case of i.MX6ULL systems, it is always the case that arch_misc_init() could call setup_serial_number() and do useful work, but was not enabled widely, but now is. In the case of i.MX23/28 systems, we should be able to call mx28_fixup_vt() again here, so do so. Finally, some platforms were calling arch_misc_init() and then not doing anything and this results in removing the option. Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-10Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
- SH Ether clean ups, RZ/A1 clean ups, RZ/A1 Genmai support - Gen3 EEPROM DT node clean up - V4H SA0 BootROM compatible binman etype, SCIF compatible SREC generation for Gen4
2025-07-10arm64: renesas: Add Renesas R-Car Gen4 SCIF/HSCIF loader SREC generationMarek Vasut
Add Renesas R-Car Gen4 SCIF/HSCIF loader compatible SREC generation. This is a regular U-Boot SPL SREC augmented with a short header which describes where to store the received data and how much data to store. This header is interpreted by the R-Car Gen4 BootROM SCIF/HSCIF loader. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-07-10common/log_syslog.c: Add missing include of <env.h>Tom Rini
This file was making environment calls without including <env.h> and so relying on an indirect inclusion from elsewhere. Add the missing include directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-08common: readline: Fix always true testAndrew Goodbody
The variable base is unsigned so >= 0 is always true. Fix this test so that it is actually useful. The fix prevents the code from causing a segfault in the case where Ctrl-w is pressed on a line consisting only of spaces. Fixes: dcc18ce0dbaf ("cli: Implement delete-word in cread_line()") Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-07Merge branch 'next'Tom Rini
2025-06-26Merge patch series "spl: fix error handling in spl_fit_get_image_name()"Tom Rini
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says: spl_fit_get_image_name() used to lack a detection of malformed image name properties in FIT images. The change in commit 3704b888a4ca ("common/spl: fix potential out of buffer access in spl_fit_get_image_name function") tried to fix this but led to function spl_fit_get_image_name() no longer detecting if a property at index > 1 does not exist. This patch is reverted. An explicit check for malformed image name properties is introduced. Link: https://lore.kernel.org/u-boot/38f5d078-3328-4bdb-9c95-4fb5fe89ddc2@gmx.de/T/#u Link: https://lore.kernel.org/r/20250624153431.46986-1-heinrich.schuchardt@canonical.com
2025-06-26common/spl: guard against buffer overflow in spl_fit_get_image_name()Heinrich Schuchardt
A malformed FIT image could have an image name property that is not NUL terminated. Reject such images. Reported-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: E Shattow <e@freeshell.de>
2025-06-26common/spl: Revert fix potential out of buffer access in ↵Heinrich Schuchardt
spl_fit_get_image_name function The change in commit 3704b888a4ca ("common/spl: fix potential out of buffer access in spl_fit_get_image_name function") led to function spl_fit_get_image_name() no longer detecting if a property does not exist at a non-zero buffer. Link: https://lore.kernel.org/u-boot/38f5d078-3328-4bdb-9c95-4fb5fe89ddc2@gmx.de/T/#m59f3a23e675daa992c28d12236de71cae2ca2bb9 Fixes: 3704b888a4ca ("common/spl: fix potential out of buffer access in spl_fit_get_image_name function") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: E Shattow <e@freeshell.de>
2025-06-24sunxi: add support for the Allwinner A100/A133 SoCAndre Przywara
The Allwinner A100 SoC has been around for a while, mostly on cheap tablets, but didn't generate much interest in the community so far. There were some efforts by two Allwinner employees in 2020, which led to basic upstream Linux support for that SoC, although this momentum dried up pretty quickly, leaving a lot of peripherals unsupported. The A100 was silently replaced with the seemingly identical Allwinner A133, which is reportedly a better bin of the A100. So far we assume that both are compatible from a software perspective. There are some more devices with the A133 out there now, so people are working on filling the gaps, and adding U-Boot (and TF-A) support. Based on the just added pinctrl, clock and DRAM support, this adds the missing bits, mostly addresses and values for the SPL. The A133 seems to be an predecessor to the H6, so we can share a lot of code with that (and the H616 code), and just need to adjust some details. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-06-23Merge tag 'v2025.07-rc5' into nextTom Rini
Prepare v2025.07-rc5 With this merge, tighten up the LTO_FLAGS removal we added to not trigger on ARMv7 (which is Thumb-2 and should be fine).
2025-06-23arm: kirkwood: fix freeze on bootJerome Forissier
Commit 6fe50e395080 ("arm: asm/system.h: mrc and mcr need .arm if __thumb2__ is not set") is not a proper fix for the LTO link error mentioned in its description. It causes 32-bit arm instructions to be mixed with thumb instructions, which the Kirkwood SoCs do not support. For example, board_init_r() is mostly generated in Thumb-1 mode as expected since the build flags contain -mthumb -mthumb-interwork. The MCR instruction corresponding to writefr_extra_feature_reg() is also correcly emitted as a 32-bit ARM instruction (it cannot be encoded in Thumb-1 anyways). The problem is, the compiler inlines the MCR without generating the BX or BLX instruction which are needed to transition between the ARM and the Thumb-1 states. From the objdump output: 006186a0 <board_init_r>: board_init_r(): /home/jerome/work/u-boot/common/board_r.c:799 6186a0: b5f0 push {r4, r5, r6, r7, lr} 6186a2: b0ab sub sp, #172 @ 0xac get_gd(): /home/jerome/work/u-boot/./arch/arm/include/asm/global_data.h:127 6186a4: 464a mov r2, r9 ... /home/jerome/work/u-boot/arch/arm/mach-kirkwood/cpu.c:242 619aae: 9b15 ldr r3, [sp, #84] @ 0x54 writefr_extra_feature_reg(): /home/jerome/work/u-boot/./arch/arm/include/asm/arch/cpu.h:100 619ab0: ee2f3f11 mcr 15, 1, r3, cr15, cr1, {0} ^^^^^^^^ 32-bit ARM instruction Further investigation is needed to understand how to fix the issue so that the code size is minimal for all boards. In the mean time, this fix disables LTO for the two problematic files (common/board_f.c and common/board_r.c). This makes the Kirkwood-based boards bootable again. The binary size is increased by 1048 bytes which is perfectly acceptable. Fixes: 6fe50e395080 ("arm: asm/system.h: mrc and mcr need .arm if __thumb2__ is not set") Reported-by: Tony Dinh <mibodhi@gmail.com> Tested-by: Tony Dinh <mibodhi@gmail.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-20Merge patch series "Consistent Kconfig environment options CONFIG_ENV_ prefix"Tom Rini
Marek Vasut <marek.vasut+renesas@mailbox.org> says: Rename the environment related variables and add ENV_ prefix, so that all configuration options which are related to environment would have an CONFIG_ENV_ prefix. No functional change. Link: https://lore.kernel.org/r/20250609192701.20260-1-marek.vasut+renesas@mailbox.org
2025-06-20env: Drop DELAY_ENVIRONMENTMarek Vasut
There are no users of DELAY_ENVIRONMENT and the same effect can be achieved either using DT /config/load-environment property, or by using ENV_IS_NOWHERE . Remove this configuration option and matching functionality. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-06-20env: Rename SYS_RELOC_GD_ENV_ADDR to ENV_RELOC_GD_ENV_ADDRMarek Vasut
Rename the variable and add ENV_ prefix, so that all configuration options which are related to environment would have an CONFIG_ENV_ prefix. No functional change. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-06-19common/spl: improve error handling in spl_fitMikhail Kshevetskiy
This fix a possible NULL pointer dereference. There is also a risk of memory leaking within the same portion of code. The leak will happen if loaded image is bad or damaged. In this case u-boot-spl will try booting from the other available media. Unfortunately resources allocated for previous boot media will NOT be freed. We can't fix that issue as the memory allocation mechanism used here is unknown. It can be different kinds of malloc() or something else. To somewhat reduce memory consumption, one can try to reuse previously allocated memory as it's done in board_spl_fit_buffer_addr() from test/image/spl_load.c. The corresponding comment was put to the code as well. Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Anshul Dalal <anshuld@ti.com>
2025-06-19common/spl: handle properly images with bad checksumMikhail Kshevetskiy
load_simple_fit() returns -EPERM for the images with broken signatures. Unfortunately this may conflict with image loaging selection on the base of boot phase. See commit 873112db9ce68c38984ff25808dde726f8dd5573 ("spl: Support selecting images based on phase in simple FIT"). Thus loading of configurations { uboot { description = "u-boot"; firmware = "atf"; loadables = "atf", "tee", "uboot"; }; }; with damaged "tee" image may finish without errors. This may results in board bricking. This patch fixes commit 873112db9ce68c38984ff25808dde726f8dd5573 ("spl: Support selecting images based on phase in simple FIT") by replacing EPERM with EBADSLT places where it should be done. Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-06-19common/spl: fix potential out of buffer access in spl_fit_get_image_name ↵Mikhail Kshevetskiy
function The current code have two issues: 1) ineffective NULL pointer check str = strchr(str, '\0') + 1 if (!str || ... The str here will never be NULL (because we add 1 to result of strchr()) 2) strchr() may go out of the buffer for the special forms of name variable. It's better use memchr() function here. According to the code the property is a sequence of C-string like shown below: 'h', 'e', 'l', 'l', 'o', '\0', 'w', 'o', 'r', 'l', 'd', '\0', '!', '\0' index is the string number we are interested, so index = 0 => "hello", index = 1 => "world", index = 2 => "!" The issue will arrise if last string for some reason have no terminating '\0' character. This can happen for damaged or specially crafted dtb. Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-06-13spl: Rename jump_to_image_no_args()Simon Glass
This function is currently a misnomer at times as we have cases where it passes arguments to the image. In preparation for making that be a more common case rename this function to jump_to_image(...). In order to do this, rename jump_to_image in board_init_r(...) to jumper so that we do not have a conflict. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Reword the commit message, adding missing cases of jump_to_image_no_args()] Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-09Merge tag 'v2025.07-rc4' into nextTom Rini
Prepare v2025.07-rc4
2025-06-09configs: raise SPL_SYS_MALLOC_SIZE to 8 MiB on RISC-VHeinrich Schuchardt
On several RISC-V boards we have seen that 1 MiB is a insufficient value for CONFIG_SPL_SYS_MALLOC_SIZE. For instance qemu-riscv32_spl_defconfig fails booting because u-boot.itb exceeds 1 MiB. 8 MiB is a reasonable value that allows adding FPGA blobs or splash images to main U-boot. Reported-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-06-05cmd: bootmenu: permit to select bootmenu entry with a shortcutChristian Marangi
Permit to select a bootmenu entry with a key shortcut. This is especially useful in production or testing scenario to automate flashing procedure or testing procedure. The boot entry are changed to append the shortcut key to it. Example: 1. Run default boot command. 2. Boot system via TFTP. 3. Boot production system from NAND. 4. Boot recovery system from NAND. 5. Load production system via TFTP then write to NAND. 6. Load recovery system via TFTP then write to NAND. 7. Load BL31+U-Boot FIP via TFTP then write to NAND. 8. Load BL2 preloader via TFTP then write to NAND. 9. Reboot. a. Reset all settings to factory defaults. 0. Exit 0 is always reserved for Exit to console. On pressing the keyboard key 2, the bootmenu entry 2 is selected and executed. Up to 34 key shortcut (0 excluded as reserved) are supported from 1-9 and a-z. If a shortcut key not present in the bootmenu list is pressed, it is simply ignored and eventually the autoboot is interrupted. Capital A-Z are converted to lower a-z and the related option is selected. Suggested-by: Weijie Gao <weijie.gao@mediatek.com> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Tested-by: Petr Štetiar <ynezz@true.cz>
2025-06-05Merge tag 'xilinx-for-v2025.07-rc4' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze AMD/Xilinx/FPGA changes for v2025.07-rc4 usb: - Fix regulator handling net: - Fix MII clock handling phy: - Fix GTR line logic for sgmii pci: - Fix pcireg_base logic fpga: - Fix change handling in intel_sdm_mb driver
2025-06-04x86: Correct condition for init_cache_f_r()Simon Glass
The condition here is reversed, which makes link and coral very slow, leading to lab failures. Fixes 6c171f7a184 ("common: board: make initcalls static") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-06-04usb: onboard-hub: Fix return type for regulator APIsPadmarao Begari
Apart from ENOENT observing return value as ENOSYS when !DM_REGULATOR that's why cover both configurations. Changed code is not working as operation should be "&&" not "||" (ret != -ENOENT && ret != -ENOSYS). Also fix the remove function where the regulator_set_enable_if_allowed() function is returning an error. Signed-off-by: Padmarao Begari <padmarao.begari@amd.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/a2d520f14efc30fc28ec59881205e156dabbfcd9.1744350937.git.michal.simek@amd.com
2025-06-02Merge patch series "Audit include list for include/[a-m]*.h"Tom Rini
Tom Rini <trini@konsulko.com> says: Hey all, Related to my other series I've posted recently on cleaning up some headers, this series here is the result of at least lightly auditing the #includes used in include/[a-m]*.h. This ignores subdirectories, as at least in part I think the top-level includes we've constructed are the most likely places to have some extra transitive include paths. I'm sure there's exceptions and I'll likely audit deeper once this first pass is done. This only gets as far as "include/m*.h" because I didn't want this to get too big. This also sets aside <miiphy.h> and <phy.h>. While miiphy.h does not directly need <phy.h> there are *so* many users and I think I had half of the tree just about not building when I first tried. It might be worth further investigation, but it might just be OK as-is. Link: https://lore.kernel.org/r/20250521230119.2084088-1-trini@konsulko.com
2025-06-02include/ide.h: Cleanup usageTom Rini
At this point in time, <ide.h> provides the IDE_BUS macro and the function prototype for ide_set_reset, which is used with IDE_RESET. The only files which should include this header are the ones that either use that macro or that function. Remove <blk.h> from <ide.h> and remove <ide.h> from places which do not need it. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02include/fat.h: Audit include listTom Rini
This file does not need <asm/cache.h> so remove it. However the file common/spl/spl_fat.c does need it, so add it there. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-05-29Merge patch series "Start removing <env.h> from headers when not required"Tom Rini
Tom Rini <trini@konsulko.com> says: Given Simon's series at [1] I started looking in to what brings in <env.h> when not strictly required and in turn has some unintended implicit includes. This series takes care of the places where, commonly, <linux/string.h> or <env.h> itself were required along with a few other less common cases. This sets aside for the moment what to do about net-common.h and env_get_ip() as I'm not entirely sure what's best there. [1]: https://patchwork.ozlabs.org/project/uboot/list/?series=454939&state=* Link: https://lore.kernel.org/r/20250514225002.15361-1-trini@konsulko.com
2025-05-29global: Avoid indirect inclusion of <env.h> from <command.h>Tom Rini
The include file <command.h> does not need anything from <env.h>. Furthermore, include/env.h itself includes other headers which can lead to longer indirect inclusion paths. To prepare to remove <env.h> from <command.h> fix all of the places which had relied on this indirect inclusion to instead include <env.h> directly. Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # android, bcb Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> # spawn Signed-off-by: Tom Rini <trini@konsulko.com>
2025-05-26Merge tag 'v2025.07-rc3' into nextTom Rini
Prepare v2025.07-rc3
2025-05-22common: add config for board_init() callBen Dooks
Add CONFIG_BOARD_INIT to specifu if the board_init() needs calling during initcall phase, and default it to 'y' for the relevant architectures which probably need it. This allows anyone with a board that doesn't need it to just remove it from the initcall list w/o an empty code block in the board init file. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-05-22tiny-printf: Handle formatting of %p with an extra KconfigChristoph Niedermaier
The formatting with %pa / %pap behaves like %x, which results in an incorrect value being output. To improve this, a new fine-tuning Kconfig SPL_USE_TINY_PRINTF_POINTER_SUPPORT for pointer formatting has been added. If it is enabled, the output of %pa / %pap should be correct, and if it is disabled, the pointer formatting is completely unsupported. In addition to indicate unsupported formatting, '?' will be output. This allows enabling pointer formatting only when needed. For SPL_NET it is selected by default. Then it also supports the formatting with %pm, %pM and %pI4. In summery this level of %p support for tiny printf is possible now: 1) The standard tiny printf won't have support for pointer formatting. So it doesn't print misleading values for %pa, instead '?' will be output: %p => ? %pa => ?a %pap => ?ap 2) If SPL_USE_TINY_PRINTF_POINTER_SUPPORT is enabled or DEBUG is defined tiny printf supports formatting %p and %pa / %pap. 3) If SPL_NET is enabled the support of pointers is extended for %pm, %pM and %pI4. Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>