summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-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-16Merge tag 'u-boot-dfu-20250616' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20250616 CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/26696 Usb gadget: - Fix ti_musb driver in gadget mode (with DM_USB_GADGET) DFU: - mmc/scsi backends when using 10 or more partitions
2025-06-16usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheralKory Maincent
Remove duplicate .ops assignment that was overriding the correct ti_musb_gadget_ops with musb_usb_ops (host ops) in the ti_musb_peripheral driver. This was causing U-Boot crashes when trying to call the handle_interrupts operation since the wrong ops structure was being used. Fixes: 7d98dbcc3dc ("usb: musb-new: Add support for DM_USB") Fixes: 281eaf1ed83a ("usb: gadget: musb: Convert interrupt handling to usb_gadget_generic_ops") Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Link: https://lore.kernel.org/r/20250611171031.840277-1-kory.maincent@bootlin.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-06-16dfu: fix dev_part_str for file operationsIvan Pang
The third_arg for a dfu alt is read as an integer and is overloaded for different supported backends. For ext4 and fat, this third_arg represents the partition and forms the dev part string, which should have its partition in hex. This commit fixes dfu ext4/fat usage for devices with ten or more partitions. Signed-off-by: Ivan Pang <ipman@amazon.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Link: https://lore.kernel.org/r/20250611050127.38011-1-ipman@amazon.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-06-15Merge tag 'rpi-2025.07-rc4' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi Updates for RPi for 2025.07-rc5: - configs: rpi: set NR_DRAM_BANKS to 8 to accommodate RAM on 16GB models
2025-06-15arm: dts: rockchip: Fix eMMC write on RK3528Jonas Karlman
Writing to eMMC on RK3528 is affected with the same or a similar issue as on RK3588, where eMMC must init to HS200 at least once to fully work. Trying to write u-boot-rockchip.bin to eMMC fails with: => mmc write $fileaddr 40 5000 MMC write: dev # 0, block # 64, count 20480 ... mmc write failed 0 blocks written: ERROR For U-Boot to enable HS200 mode the mmc-hs200-1_8v prop must be defined in the device tree. Linux does not seem to be affected and is able to detect and use HS200 without this prop. Enable use of HS200 and fix eMMC write on RK3528 by adding the missing mmc-hs200-1_8v prop for affected boards: => mmc write $fileaddr 40 5000 MMC write: dev # 0, block # 64, count 20480 ... 20480 blocks written: OK Fixes: b112a44531cb ("board: rockchip: Add minimal generic RK3528 board") Fixes: ccbddf645310 ("board: rockchip: Add Radxa E20C") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-06-15configs: rpi: set NR_DRAM_BANKS to 8 to accommodate RAM on 16GB modelsJan Čermák
Raspberry Pi 5 can now have up to 16 GiB of RAM where the memory spans 8 DRAM banks in total. Increase the config value to 8 to initialize the whole RAM. Without this change, kernel only sees 8 GiB of RAM on the 16 GiB CM5 as reported in [1]. [1] https://github.com/home-assistant/operating-system/issues/3989 Signed-off-by: Jan Čermák <sairon@sairon.cz> Reviewed-by: Matthias Brugger <mbrugger@suse.com>
2025-06-13sandbox: solve undefined reference to pthread_kill symbolRaymond Mao
This patch is to solve the sandbox building error: $ make O=build-sandbox -s sandbox_defconfig $ make O=build-sandbox -s -j2 /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5' /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status [...] Fixes: b989f9ed9fe1 ("test: lib: add initjmp() test") Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-06-12test/py: Correct handling of exceptionsSimon Glass
If an Unexpected exception is thrown in a test, an undefined variable error is reported. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 85d7dae377a ("test: Detect dead connections") Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-06-12test/py: Use the correct fixture name in exception handlerSimon Glass
If a BootFail exception is thrown in a test, it is not handled correctly. Use the correct fixture variable 'ubman_fix' to resolve this. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: d9ed4b75add ("test/py: Drop u_boot_ prefix on test files") Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-06-12toradex-smarc-imx8mp: add SPL_STACK size and SPL_HAVE_INIT_STACKHiago De Franco
When the toradex-smarc-imx8mp_defconfig file was first added, SPL_STACK was set to 0x960000, but SPL_HAVE_INIT_STACK wasn't enabled. This led to SPL_STACK being correctly dropped in commit 25fefa05d732 ("configs: Resync with savedefconfig"), since SPL_HAVE_INIT_STACK was missing, which ended up making the board not boot. Fix this by adding SPL_STACK back and making sure SPL_HAVE_INIT_STACK is enabled. Fixes: dde53eae88d6 ("board: toradex: add Toradex SMARC iMX8MP") Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2025-06-12board: var-som-mx8mn: Fix alloc space exhausted in SPLHugo Villeneuve
After enabling some options to support EEPROM read in SPL (CONFIG_SPL_I2C_EEPROM), the following error appears: alloc space exhausted Increasing SYS_MALLOC_F_LEN from 8kB to 64kB fixes the problem. But instead of manually increasing the value, adopt method used in commit ce3f23404c19 ("board: bsh: imx8mn_bsh_smm_s2/s2pro: enlarge CONFIG_SPL_SYS_MALLOC_F_LEN"): Dropping CONFIG_SPL_SYS_MALLOC_F_LEN option allows it to be set to the default value of CONFIG_SYS_MALLOC_F_LEN, which is set by default to 64kB (0x10000) on i.MX8M platforms. Suggested-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2025-06-12imx91: Drop OF_UPSTREAMPeng Fan
i.MX91 device tree still not landed in linux kernel, so drop OF_UPSTREAM and move the device tree files to arch/arm/dts Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
2025-06-11mmc: Kconfig: Really correct dependencies SDHCI ADMA optionsTom Rini
When doing the investigation for commit 53bb8fdea12a ("mmc: Kconfig: Correct dependencies SDHCI ADMA options") I missed the implications of MMC_SDHCI_ADMA_HELPERS. The problem is that FSL_ESDHC via the FSL_ESDHC_SUPPORT_ADMA2 option will also enable these helper functions. This in turn means the correct dependency here is MMC_SDHCI_ADMA_HELPERS and not *MMC_SDHCI_ADMA. Reported-by: Heiko Thiery <heiko.thiery@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-10Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
One more board to support, this time Retronix Sparrow Hawk based on Renesas R-Car V4H SoC . This is board support, so master branch should be fine. The DT in dts/upstream/ is a backport from Linux, and will disappear on next DT sync.
2025-06-10arm64: dts: renesas: r8a779g3: Add Retronix R-Car V4H Sparrow Hawk board supportMarek Vasut
Add Retronix R-Car V4H Sparrow Hawk board based on Renesas R-Car V4H ES3.0 (R8A779G3) SoC. This is a single-board computer with single gigabit ethernet, DSI-to-eDP bridge, DSI and two CSI2 interfaces, audio codec, two CANFD ports, micro SD card slot, USB PD supply, USB 3.0 ports, M.2 Key-M slot for NVMe SSD, debug UART and JTAG. DT is imported from Linux next commit: a719915e76f2 ("arm64: dts: renesas: r8a779g3: Add Retronix R-Car V4H Sparrow Hawk board support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-06-10arm64: renesas: Introduce renesas_dram_init_banksize()Marek Vasut
Introduce weak renesas_dram_init_banksize() function which is meant to be used to adjust DRAM bank sizes after the common Renesas board DRAM bank handling code finished. This is mainly meant for boards which ship with multiple DRAM size options, which can be detected at runtime. This allows such boards to ship with single U-Boot binary on all boards. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-06-09Prepare v2025.07-rc4v2025.07-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-09pylibfdt: correct license informationHeinrich Schuchardt
Setuptools 78.1.1 shows warnings: * Pattern 'GPL' did not match any files. * Pattern 'BSD-2-Clause' did not match any files. * SetuptoolsDeprecationWarning: License classifiers are deprecated. Cf. https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-06-09Revert "caam: Fix CAAM error on startup"Fabio Estevam
This reverts commit 159b6f0e119962ce5da645f548cefe9196c8778e. Since commit 159b6f0e1199 ("caam: Fix CAAM error on startup") the following regression was reported by Tim Harvey: "I've found that this patch causes a regression on an imx8mm board (imx8mm_venice_defconfig) where the first call to caam_rng_read fails here in jr_dequeue but if you call it again it works. With some debugging added: SEC0: RNG instantiated ... Hit any key to stop autoboot: 0 u-boot=> rng list RNG #0 - caam-rng u-boot=> rng 0 10 caam_rng_read caam-rng len=16 run_descriptor_jr_idx idx=0 Error in SEC deq: -1 caam_rng_read_one run_descriptor_jr failed: -1 caam_rng_read caam-rng caam_rng_read_one failed: -5 Reading RNG failed u-boot=> rng 0 10 caam_rng_read caam-rng len=16 run_descriptor_jr_idx idx=0 00000000: ad 2e ad c0 2a 12 27 c4 65 82 66 19 be ef f6 07 ....*.'.e.f..... If I revert your patch caam_rng_read works initially and on subsequent calls." " I ran into this when I was testing lwIP HTTPS as it causes anything that uses dm_rng to fail the first time (such as HTTPS)." Revert it for now to avoid the regression. Reported-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2025-06-09configs: Resync with savedefconfigTom Rini
Resync all defconfig files using qconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-09Merge patch series "arm: armv7: fix a bug that prevents CONFIG_BLOBLIST and ↵Tom Rini
CONFIG_POSITION_INDEPENDENT to be enabled together" Yang Xiwen <forbidden405@outlook.com> says: This patchset also enables CONFIG_POSITION_INDEPENDENT for qemu boards to avoid similar issues to happen again in the future. Link: https://lore.kernel.org/r/20250531-pie_blob_fix-v1-0-7b4a37987dbc@outlook.com
2025-06-09arm: qemu: Add imply CONFIG_POSITION_INDEPENDENTYang Xiwen
Add 'imply CONFIG_POSITION_INDEPENTDENT' for QEMU arm arch. This allows qemu arm boards to load u-boot.bin at any address. It is skipped by default when u-boot is loaded by either --bios or --kernel. To load u-boot.bin at a different address, one can use u-boot chain-loading or qemu loader device[1]. [1] https://www.qemu.org/docs/master/system/generic-loader.html Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2025-06-09arm: armv7: restore section to .text after saved_argsYang Xiwen
when CONFIG_BLOBLIST is enabled, the section is switched to .data but is not switched back to .text. It makes all the code below placed in .data section, also breaks CONFIG_POSITION_INDEPENDENT. Fix it by adding `.section .text` to switch the section back to .text. Fixes: 5103e69344d6 ("arm: armv7: save boot arguments") Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2025-06-08Merge tag 'u-boot-rockchip-20250606' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/26117 - Allow to silent TPL/SPL debug console; - enable exFAT support for Theobroma boards; - Fix SD power initialization in SPL for rk3399-nanopi4
2025-06-07Merge tag 'doc-2025-07-rc4' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request doc-2025-07-rc4 Documentation: * fix typo in gcc.rst * correct EFI_TCG2_PROTOCOL_MEASURE_DTB description * Add missing reference to firmware for BB-AI64 * Tidy up the bootefi-command docs
2025-06-07doc: build: fix typo in gcc.rstBehradElmi
Fix a typo error in gcc.rst, changing "out-out-tree" to "out-of-tree" in the Out-of-tree section. Signed-off-by: BehradElmi <behradelmi1@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-06-07doc: efi_loader: Tidy up the bootefi-command docsSimon Glass
There are backslashes in some of the tags which seems to be unnecessary. Remove then. Change the word 'either' to 'any' since there are three options. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-06-07doc: board: ti: Add missing firmware for BB-AI64Peter Robinson
The details of the sysfw.itb from the R5 build that also needs to be copied as part of the target images is missing, but is included in the image formats a little further down, so add it to the instructions. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Acked-by: Nishanth Menon <nm@ti.com>
2025-06-07efi_loader: correct EFI_TCG2_PROTOCOL_MEASURE_DTB descriptionHeinrich Schuchardt
%s/data that change/data that changes/ %s/cannot be used has/cannot be used for/ %s/Otherwise/Otherwise,/ %s/allows better measurement/allows for better measurement/ Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-06-06power: rk8xx: fix swapped mask and value in init registers for RK806Quentin Schulz
The val (the bits to set) is the second member of the reg_data structure and mask the third one. We obviously want to clear bits 6 and 7 in order to only set bit 7 in there instead of only clearing bit 7 in order to write bits 6 and 7 (which makes no sense). Fortunately, according to the datasheet, bit 6 value doesn't matter when bit 7 is set so this is essentially just a cosmetic change, no intended change in behavior. Fixes: f172575d92cd ("power: rk8xx: add support for RK806") Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06rockchip: rk3399-nanopi-4: Enable IO-domain driver in SPLJustin Klaassen
The NanoPi RK3399 boards support UHS-I (up to SDR104) SD cards, however using any of these 1.8v modes results in a boot failure in SPL upon soft reboot. The issue is that the "vcc_sdio" regulator is left at 1.8v on reboot and the corresponding GPIO defaults to 3.3v. This prevents the SD card from being reinitialized and read successfully. This change enables the RK8XX regulators and Rockchip IO-domain drivers in SPL, which initializes "vcc_sdio" regulator to 3.0v and configures the GPIO for the correct level on boot. Signed-off-by: Justin Klaassen <justin@tidylabs.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06rockchip: rk3399-nanopi-4: Allow MMC driver to control SD regulatorsJustin Klaassen
This change removes the "regulator-always-on" property from the "vcc3v0_sd" (vmmc-supply) and "vcc_sdio" (vqmmc-supply) regulators, which otherwise prevents the MMC driver from being able to power cycle the SD card as part of the initialization procedure. It also removes the "regulator-boot-on" from the "vcc_sdio" regulator, which could theoretically damage a SD card that is already initialized in a low voltage mode. Signed-off-by: Justin Klaassen <justin@tidylabs.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XXJustin Klaassen
Allows use of the regulator functions of the RK8XX PMIC in SPL, which is necessary to support the functionality of the Rockchip IO-domain driver on relevant platforms. Signed-off-by: Justin Klaassen <justin@tidylabs.net> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAINJustin Klaassen
Allows use of the Rockchip IO-domain driver in SPL to configure the GPIO to match the voltage supplied by specific regulators (e.g. "vcc_sdio"). Signed-off-by: Justin Klaassen <justin@tidylabs.net> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06rockchip: io-domain: Add debug logging for regulators during probeJustin Klaassen
Log the value of the regulators during initialization of the IO-domain driver to aid in debugging GPIO voltage configuration problems. Signed-off-by: Justin Klaassen <justin@tidylabs.net> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06configs: puma-rk3399: enable exFAT supportQuentin Schulz
Our upcoming Mass Flasher solution will be storing boot artifacts on an exFAT partition so enable its support. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06configs: tiger-rk3588: enable exFAT supportQuentin Schulz
Our upcoming Mass Flasher solution will be storing boot artifacts on an exFAT partition so enable its support. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06configs: jaguar-rk3588: enable exFAT supportQuentin Schulz
Our upcoming Mass Flasher solution will be storing boot artifacts on an exFAT partition so enable its support. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06configs: ringneck-px30: enable exFAT supportQuentin Schulz
Our upcoming Mass Flasher solution will be storing boot artifacts on an exFAT partition so enable its support. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06rockchip: px30: Fix hard dependency to DEBUG_UART_BOARD_INITLukasz Czechowski
Because DEBUG_UART_BOARD_INIT depends on DEBUG_UART, hard dependency to DEBUG_UART_BOARD_INIT in ROCKCHIP_PX30 can cause warnings if DEBUG_UART is disabled. The DEBUG_UART_BOARD_INIT is already implied by ARCH_ROCKCHIP entry. Remove hard dependency from ROCKCHIP_PX30, so that it will be consistent with other rockchip boards. Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06rockchip: px30: Weaken dependency TPL/SPL serialLukasz Czechowski
Allow to disable serial console in TPL and SPL. Weak dependency to SPL_SERIAL and TPL_SERIAL is also used in other Rockchip boards. Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06debug_uart: Replace debug functions with dummies if CONFIG_DEBUG_UART is not setLukasz Czechowski
In case DEBUG UART is not used, define dummy macros replacing the actual function implementations that will not be available. This allows to compile code and avoid linker errors. Redefine the DEBUG_UART_FUNCS macro if DEBUG UART is not available, to avoid compilation errors. Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06ram: rockchip: Fix dependency of RAM_ROCKCHIP_DEBUGLukasz Czechowski
The RAM_ROCKCHIP_DEBUG can be used only if DEBUG_UART is available. The next commit introduces changes in definition of debug uart functions, so that DEBUG_UART is required to be defined in order to initialize uart and use print functions. Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-06-06efi: stub: Change _debug_uart_putc function to inlineLukasz Czechowski
Update definition of _debug_uart_putc to static inline. This will allow to avoid compilation warnings about unused code after introduction of patch changing debug uart functions to dummies if CONFIG_DEBUG_UART is not set. This also matches the instructions in include/debug_uart.h and provides consistency with implementations for other platforms. Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06arm: uniphier: Change _debug_uart_putc function to inlineLukasz Czechowski
Update the definition of _debug_uart_putc to static inline. This matches the instructions in include/debug_uart.h and provides consistency with implementations for other platforms. Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>