Tom Rini [Mon, 31 Mar 2025 13:39:36 +0000 (07:39 -0600)]
Merge tag 'net-
20250314' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-
20250314.
kconfig:
* Fix submenu for network commands
net:
* Remove a useless (commented out) line in net-common.h
net-lwip:
* Remove error print on failed tx
* Fix return code of ping_loop() when no ethernet device is found
* Remove superfluous newline in help text for tftp
Paul Barker [Fri, 7 Mar 2025 15:15:29 +0000 (15:15 +0000)]
cmd: Kconfig: Fix submenu for network commands
The Kconfig parser seems to get confused by the current if conditions
following CMD_NET and displays all network command options directly in
the "Command line interface" menu instead of in a "Network commands"
submenu.
To help out Kconfig we can simplify the if conditions, so that the
definition of CMD_NET is followed immediately by an if/endif block that
contains all network command options. We can also remove nested checks
for CMD_NET or (NET || NET_LWIP).
Fixes:
98ad145db61a ("net: lwip: add DHCP support and dhcp commmand")
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Ilias Apalodimas [Wed, 26 Mar 2025 08:28:58 +0000 (10:28 +0200)]
net: lwip: Remove error print on failed tx
When an ethernet driver fails to send a frame we print an error in lwIP.
But depending on how often that error is it might significantly delay
transmissions.
For example downloading a big file with the rpi4 spams the console with
'send error: -101', but removing the print makes the file download with
an average speed of ~8.5MiB/s since the packets are retransmitted.
So let's move it to a 'debug' in lwIP and expect ethernet drivers to handle
the failure if it's severe.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Jerome Forissier [Fri, 21 Mar 2025 12:42:14 +0000 (13:42 +0100)]
net: remove commented out line
Commit
1d5d292b7941 ("net: split net into net{,-common,-legacy,-lwip}")
inadvertendly left a commented out declaration for do_wget() in
net-common.h. Remove it.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Jerome Forissier [Fri, 14 Mar 2025 08:44:10 +0000 (09:44 +0100)]
net: lwip: do_ping() should return CMD_RET_FAILURE when no device
do_ping() expects ping_loop() to return a negative value on error, so
that it can propagate it to the caller as CMD_RET_FAILURE. This is not
the case when no ethernet device is found, so fix that.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Michael Walle [Wed, 12 Mar 2025 07:37:50 +0000 (08:37 +0100)]
net: lwip: remove superfluous newline at tftp help text
The help text has a newline at the end which will lead to an empty
line after the tftpboot when printing the help overview. Remove it.
Fixes:
4d4d7838127e ("net: lwip: add TFTP support and tftpboot command")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Mattijs Korpershoek [Fri, 28 Mar 2025 16:29:27 +0000 (17:29 +0100)]
MAINTAINERS: Update email of Mattijs Korpershoek
My preferred email address is mkorpershoek@kernel.org now.
This updates the MAINTAINERS files and adds an entry in the
.mailmap file.
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
E Shattow [Thu, 27 Mar 2025 17:55:08 +0000 (10:55 -0700)]
board: starfive: Remove compatible boards Milk-V Mars CM and Mars CM Lite
Remove leftover code from Milk-V Mars CM and Mars CM Lite boards that do
not exist in upstream Linux Kernel devicetree-rebasing. These will be re-
introduced when submitted upstream for a future U-Boot release. Users of
these boards should use the previous stable release of U-Boot until then.
Signed-off-by: E Shattow <e@freeshell.de>
Kory Maincent [Thu, 27 Mar 2025 10:31:12 +0000 (11:31 +0100)]
board: ti: am335x: Fix selection of BeagleBone Green
The BeagleBone Green board is a revision of the BoneBlack board.
Having BeagleBone Black devicetree listed before BeagleBone Green will
select always the BeagleBone Black devicetree following the functioning of
board_fit_config_name_match().
Fix it by changing the test condition and selecting BoneBlack board only
if it is not a revision of this board.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Tom Rini [Wed, 26 Mar 2025 20:04:23 +0000 (14:04 -0600)]
Merge tag 'efi-master-
26032025' of https://source.denx.de/u-boot/custodians/u-boot-tpm
A last minute fix from Vincent fixing the text representation
of device paths containing IPv4 device path nodes.
A missing break; ended up printing
IPv4(5.6.7.8,TCP,UDP,0x6,DHCP,1.2.3.4,9.10.11.12,255.255.255.0)
instead of
IPv4(5.6.7.8,TCP,DHCP,1.2.3.4,9.10.11.12,255.255.255.0)
Vincent Stehlé [Mon, 24 Mar 2025 08:34:43 +0000 (09:34 +0100)]
efi_loader: fix ipv4 device path node conversion
When converting an IPv4 device path node to text, the
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL will produce the following string:
IPv4(5.6.7.8,TCP,UDP,0x6,DHCP,1.2.3.4,9.10.11.12,255.255.255.0)
This string erroneously contains multiple protocols: TCP, UDP and 0x6.
Add the missing `break' statements in the dp_msging() function to fix this
and obtain the following expected string instead:
IPv4(5.6.7.8,TCP,DHCP,1.2.3.4,9.10.11.12,255.255.255.0)
Fixes:
aaf63429a112 ("efi_loader: add IPv4() to device path to text protocol")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Adriano Cordova <adrianox@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Tue, 25 Mar 2025 17:55:05 +0000 (11:55 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/25312
- Fix warning
- Fix incorrect return value
Tom Rini [Sat, 15 Mar 2025 01:28:38 +0000 (19:28 -0600)]
openpiton: riscv64: Drop unnecessary 'imply SPL_RISCV_MMODE'
As the code is today, we get a warning about "select" statements on
"choice" options not doing anything. In this case, the option
SPL_RISCV_MMODE is the default.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tianrui Wei <tianrui-wei@outlook.com>
Yao Zi [Fri, 7 Mar 2025 17:11:45 +0000 (17:11 +0000)]
clk: sophgo: Fix return values of register updating helpers
These helpers wrongly return the updated register value. As a non-zero
value indicates failure, this causes various clock operations are
considered failed.
Correct the return value to constant zero, since these simple MMIO
operations won't fail. This fixes clock enabling failures during booting
process,
In: serial@4140000
Out: serial@4140000
Err: serial@4140000
Net: Enable clock-controller@3002000 failed
failed to enable clock 0
No ethernet found.
which leads to misoperation of various peripherals.
Fixes:
5f364e072e7 ("clk: sophgo: cv1800b: Add clock controller driver for cv1800b SoC")
Tested-by: Yuguo Pei <purofle@gmail.com>
Signed-off-by: Yao Zi <ziyao@disroot.org>
Tom Rini [Tue, 25 Mar 2025 02:00:24 +0000 (20:00 -0600)]
Prepare v2025.05-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
Ilias Apalodimas [Fri, 14 Mar 2025 10:57:02 +0000 (12:57 +0200)]
lmb: change the return code on lmb_alloc_addr()
Ben reports a failure to boot the kernel on hardware that starts its
physical memory from 0x0.
The reason is that lmb_alloc_addr(), which is supposed to reserve a
specific address, takes the address as the first argument, but then also
returns the address for success or failure and treats 0 as a failure.
Since we already know the address change the prototype to return an int.
Reported-by: Ben Schneider <ben@bens.haus>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ben Schneider <ben@bens.haus>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tom Rini [Fri, 21 Mar 2025 13:29:08 +0000 (07:29 -0600)]
Merge tag 'u-boot-dfu-
20250321' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-
20250321
Usb gadget:
- Fix NXP UUU tool compatibility regression with dwc3 gadget
Marek Vasut [Wed, 19 Mar 2025 22:07:52 +0000 (23:07 +0100)]
usb: dwc3: gadget: Fix match_ep callback for NXP UUU tool
The UUU tool excepts the interrupt-in endpoint to be ep1in, otherwise
it crashes. This is a result of the previous hard-coded EP setup in
drivers/usb/gadget/epautoconf.c which did special-case EP allocation
for SPL builds, and which was since converted to this callback, but
without the special-case EP allocation in SPL part.
This reinstates the SPL part in an isolated manner, only for NXP iMX
SoCs, only for SPL builds, and only for the ep1in interrupt-in endpoint.
Fixes:
1918b8010c32 ("usb: dwc3: gadget: Convert epautoconf workaround to match_ep callback")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20250319220805.219001-1-marex@denx.de
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Stefan Eichenberger [Wed, 19 Mar 2025 16:16:23 +0000 (17:16 +0100)]
board: verdin-am62: remove spl_perform_fixups
spl_perform_fixups is redundant in the current implementation. SPLs call
dram_init during spl_enable_cache in arch/arm/mach-k3/common.c. In
U-Boot, dram_init and dram_init_banksize are automatically called in
init_sequence_f. Therefore, SPLs and U-Boot always determine the correct
RAM size. During Linux boot, fdt_fixup_memory_banks adjusts the RAM size
in the Linux device tree, ensuring correct RAM usage.
dram_init() calls get_ram_size() for the Verdin AM62, which determines
the correct RAM size through read/write operations. However, due to the
K3 bootflow placing ATF in RAM and requiring cache coherence, calling
get_ram_size() with caches enabled prevents ATF boot. Removing this call
restores ATF boot functionality.
This fixes a regression introduced in commit
4164289db882 ("board:
verdin-am62: fix missing memory fixup call") which prevents some of our
Verdin AM62 modules from booting.
Fixes:
4164289db882 ("board: verdin-am62: fix missing memory fixup call")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Hendrik Donner [Thu, 6 Mar 2025 20:15:39 +0000 (21:15 +0100)]
checkpatch.pl: Report an error for CONFIG_xPL_BUILD in device trees
The defines for the different build phases shouldn't be used in device
trees, currently they aren't even defined for device tree pre processing,
resulting in build errors.
Link: https://lists.denx.de/pipermail/u-boot/2025-March/582787.html
Signed-off-by: Hendrik Donner <hd@os-cillation.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Tue, 4 Mar 2025 16:04:03 +0000 (17:04 +0100)]
dumpimage: fix handling of StarFive SPL too long
The header of the StarFive U-Boot SPL file u-boot-spl.normal.out has a
field indicating the payload size. When copying U-Boot SPL from a
partition the copied file might be too long.
Currently in this situation a misleading error message 'Incorrect CRC32' is
written.
We must use the payload size and not the file size when calculating the
CRC32.
Write a warning if the file is too long indicating the correct size. This
enables the user to truncate the file accordingly.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Thu, 27 Feb 2025 19:27:19 +0000 (12:27 -0700)]
qconfig: Correct unhashable-type error with --scan-source
This gives an error with newer Python version, so fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Thu, 20 Feb 2025 10:00:13 +0000 (11:00 +0100)]
scripts: typos in event_dump.py
%s/even spies/event spies/
%s/EFL/ELF/
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Michal Simek [Thu, 6 Mar 2025 10:12:30 +0000 (11:12 +0100)]
cmd: version: Get information about GCC and LD back
U-Boot version command is no longer showing information about GCC and LD.
The reason is that version.h has been removed that's why CC_VERSION_STRING
and LD_VERSION_STRING are not pass.
Values are generated to generated/version_autogenerated.h which is sourced
in version.h.
Fixes:
54ecce2cbf90 ("version: Separate our version string from the version command")
Signed-off-by: Michal Simek <michal.simek@amd.com>
Tom Rini [Mon, 17 Mar 2025 14:00:40 +0000 (08:00 -0600)]
Merge tag 'efi-2025-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-04-rc5
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25196
UEFI:
* Export _start symbol from crt0_*_efi stubs
* Move .dynamic out of .text in EFI
* scripts/Makefile.lib: Preserve the .dynstr section as well
Documentation:
* net: miiphybb: Convert documentation to rst
Tom Rini [Mon, 17 Mar 2025 13:59:39 +0000 (07:59 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
These are mainly DBSC5 DRAM controller specific fixes and updates for
current release. There is the long overdue BL31 start V4H board code as
well, that should be in the current release to make the V4H White Hawk
board usable with SPL, and a fallback U-Boot PSCI implementation
enablement to make sure the board always boots. And finally, there are
two comment fixes.
Sam Edwards [Sat, 15 Mar 2025 22:18:11 +0000 (15:18 -0700)]
scripts/Makefile.lib: efi: Preserve the .dynstr section as well
This section is required by .dynamic and llvm-objcopy will exit with a
fatal error if it is not also preserved in the output.
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Sam Edwards [Sat, 15 Mar 2025 22:18:10 +0000 (15:18 -0700)]
efi_loader: Move .dynamic out of .text in EFI
EFI applications need to be relocatable. Ordinarily, this is achieved
through a PE-format .reloc section, but since that requires toolchain
tricks to achieve, U-Boot's EFI applications instead embed ELF-flavored
relocation information and use it for self-relocation; thus, the
.dynamic section needs to be preserved.
Before this patch, it was tacked on to the end of .text, but this was
not proper: A .text section is SHT_PROGBITS, while the .dynamic section
is SHT_DYNAMIC. Attempting to combine them like this creates a section
type mismatch. While GNU ld doesn't seem to complain, LLVM's lld
considers this a fatal linking error.
This patch moves .dynamic out to its own section, so that the output ELF
has the correct types. (They're all mashed together when converting to
binary anyway, so this patch causes no change in the final .efi output.)
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sam Edwards [Sat, 15 Mar 2025 22:18:09 +0000 (15:18 -0700)]
arm: riscv: efi: Export _start symbol from crt0_*_efi stubs
While the _start label is only intended for use locally to populate the
(hand-written) PE header, the linker script includes ENTRY(_start) which
designates it as the entry point in the output ELF, resulting in linker
warnings under some linkers (e.g. LLVM's lld) due to _start not being a
globally-visible symbol. Since ELF is only an intermediary build
format, and the aforementioned PE header correctly points to _start, the
ENTRY(_start) directive could easily be removed to silence this warning.
However, since some developers who are debugging EFI by analyzing the
intermediary ELF may appreciate having correct entry-point information,
this patch instead promotes the _start labels to global symbols,
silencing the linker warning and making the intermediary ELF reflect the
true entry point.
This patch doesn't affect the final output binaries in any way.
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Marek Vasut [Sat, 8 Mar 2025 20:49:42 +0000 (21:49 +0100)]
net: miiphybb: Convert documentation to rst
Convert the current miiphybb documentation to rst. Rename
the README.bitbangMII to bitbangmii.rst in the process.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Marek Vasut [Sun, 16 Mar 2025 13:51:44 +0000 (14:51 +0100)]
ram: renesas: dbsc5: Make struct renesas_dbsc5_board_config public
Make struct renesas_dbsc5_board_config {} definition public via
include/dbsc5.h, so this structure can be defined in board files
and passed into the DBSC5 DRAM driver by overriding weak function
dbsc5_get_board_data() on board level.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:51:43 +0000 (14:51 +0100)]
ram: renesas: dbsc5: Add V4H-3/V4H-5/V4H-7 OTP based detection
Add auto-detection and handling of Renesas R-Car V4H-3 and V4H-5
in addition to V4H-7 SoC variants based on OTP fuse programming.
The V4H-3 and V4H-5 variants have reduced DRAM frequency options.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:51:42 +0000 (14:51 +0100)]
ram: renesas: dbsc5: Synchronize initialization code to rev.1.10
Update the DRAM initialization code to match DBSC5 initialization code
rev.1.10 , which is currently the latest version available. This makes
DRAM initialization operational on Renesas R-Car V4H R8A779G0 rev.3.0.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:51:41 +0000 (14:51 +0100)]
ram: renesas: dbsc5: Fix DBTR11 calculation
Reinstate missing increment by two in DBTR11 calculation based
on the original DBSC5 initialization code rev.0.80. The original
code did ... ODTLon - (js2[JS2_tODTon_min] - 1) + 1 , which was
incorrectly converted into ODTLon - js2[JS2_tODTon_min], but
should have been converted to ODTLon - js2[JS2_tODTon_min] + 2.
Add the missing +2 .
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:51:40 +0000 (14:51 +0100)]
ram: renesas: dbsc5: Fix JS1 index calculation
The JS1 index is calculated correctly, but the limiter cannot
be the max() function because the index should be lower than
JS1_USABLEC_SPEC_HI and the max() function would unconditionally
override the JS1 index to JS1_USABLEC_SPEC_HI. Use clamp() to
limit the JS1 index instead.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:51:39 +0000 (14:51 +0100)]
ram: renesas: dbsc5: Fix bitrate MD pin parsing
Fix copy paste error in MD pin handling for 5500 Mbps and 4800 Mbps case,
each should be handled by MD[19,17] == 2 and MD[19,17] == 3 respectively.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:51:38 +0000 (14:51 +0100)]
arm64: dts: renesas: Make OTP available in SPL on R8A779G0 V4H
The DBSC5 DRAM controller driver needs access to OTP fuses to discern
Renesas R-Car V4H-3, V4H-5 and V4H-7 SoC variants based on OTP fuse
programming. Make OTP block DT node available in U-Boot SPL DT so the
DBSC5 driver can determine its base address and read out the OTP fuses.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:51:09 +0000 (14:51 +0100)]
arm64: renesas: Drop stale R-Car V4H SPL implementation description
The R-Car V4H SPL implementation was originally running on the Cortex-R52
core, but this is no longer the case. Majority of the SPL now runs on the
Cortex-A76 core. Drop the stale description.
Fixes:
ec53fdee5bec ("arm64: renesas: Add Renesas R-Car V4H SPL implementation")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 16 Mar 2025 13:50:41 +0000 (14:50 +0100)]
ARM: renesas: Drop stale common Makefile description
Remove stale Makefile description, this used to be valid for the
original Makefile from which the common Makefile was made generic,
but is no longer applicable to the common Makefile.
Fixes:
c7d2d7f90a91 ("ARM: renesas: Simplify board Makefiles")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 2 Mar 2025 22:30:02 +0000 (23:30 +0100)]
arm64: renesas: Enable fallback PSCI on Renesas R-Car R8A779G0 V4H White Hawk
Enable fallback PSCI provider on Renesas R-Car R8A779G0 V4H White Hawk board.
This fallback PSCI provider provides basic PSCI interface which can be used
by the Linux kernel, but does not provide support for bringing up additional
CPU cores or any other functionality, except for SoC level reset.
This fallback PSCI provider is intended as a fallback in case a proper PSCI
provider is not started before the Linux kernel is started. Linux kernel on
ARMv8a will fail to boot in case a PSCI provider is not available, and this
basic fallback PSCI provider assures such a boot failure cannot occur, even
if that means the system will boot in degraded mode with only one CPU core
available, that is still sufficient to perform recovery.
In the common case, a proper PSCI provider should be started as part of
the Linux kernel fitImage, as the BL31 loadable, and replace this basic
fallback PSCI provider before the Linux kernel is started.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 2 Mar 2025 20:59:11 +0000 (21:59 +0100)]
arm64: renesas: Add TFA BL31 handoff support on Renesas R-Car Gen4
Implement custom U_BOOT_FIT_LOADABLE_HANDLER and armv8_switch_to_el2_prep()
handling in case the TFA was loaded. The loadables handler sets up custom
handoff structure used by Renesas TFA fork in fixed location in DRAM and
indicates the TFA has been loaded.
The custom armv8_switch_to_el2_prep() handling tests whether the TFA BL31
was previously loaded and the custom handoff structure was set up, and if
so, jumps to TFA BL31 which switches from EL3 to EL2 and then returns to
U-Boot just past bl in armv8_switch_to_el2() to finish starting the Linux
kernel.
The jump to Linux through TFA works in such a way that the custom
armv8_switch_to_el2_prep() handler configures the custom handoff structure
such that the target jump address of the TFA BL31 on exit is set to the
armv8_switch_to_el2() + 4, which is just past the bl, and just before the
U-Boot code which implements the Linux kernel boot from either EL. The
registers passed through the TFA BL31 are all the registers passed into
armv8_switch_to_el2_prep() to assure maximum compatibility with all the
boot modes. The armv8_switch_to_el2_prep() handler jumps to the TFA BL31,
which does its setup, drops EL from EL3 to EL2 and finally jumps to the
armv8_switch_to_el2() + 4 entry point, which then allows U-Boot to boot
the Linux kernel the usual way.
In order to build suitable kernel fitImage, build TFA first, upstream
is currently under review:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/35799
Or if necessary, downstream repository:
remote: https://github.com/renesas-rcar/arm-trusted-firmware.git
branch: rcar_gen4_v2.7_v4x
```
$ git clean -fqdx
$ MBEDTLS_DIR=/path/to/mbedtls/ make -j$(nproc) bl31 \
PLAT=rcar_gen4 ARCH=aarch64 LSI=V4H SPD=none \
CTX_INCLUDE_AARCH32_REGS=0 MBEDTLS_COMMON_MK=1 \
PTP_NONSECURE_ACCESS=1 LOG_LEVEL=20 DEBUG=0 \
ENABLE_ASSERTIONS=0 E=0
```
Build Linux kernel Image and device tree from current mainline Linux
kernel repository, obtain 'Image' and 'r8a779g0-white-hawk.dtb' .
Bundle the files together using provided fit-image.its fitImage description:
```
$ mkimage -f fit-image.its fitImage
```
To start the kernel fiImage generated in previous step, load fitImage
to DRAM and use the 'bootm' command to start it:
=> load 0x58000000 ... fitImage && bootm 0x58000000
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Tue, 11 Mar 2025 01:34:18 +0000 (02:34 +0100)]
ARM: dts: imx: Drop bogus regulator extras on DH i.MX6 DHCOM DRC02
The regulator extras should be placed in the USB H1 regulator node,
the /regulator-usb-h1-vbus. They are already present there in the
upstream DT, so delete this bogus node entirely.
Signed-off-by: Marek Vasut <marex@denx.de>
Tom Rini [Thu, 13 Mar 2025 15:25:15 +0000 (09:25 -0600)]
Merge tag 'rpi-2025.04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi
Updates for RPi for 2025.04:
- Copy Bluetooth device address in DT
- Keep warnings from firmware in DT, if any
- Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
- Add identifiers for the new RPi 5 series
Fiona Klute [Wed, 12 Feb 2025 11:39:02 +0000 (12:39 +0100)]
Raspberry Pi: Copy Bluetooth device address in DT
The firmware sets local-bd-address, copy it when loading a new DT.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Fiona Klute [Wed, 12 Feb 2025 11:39:01 +0000 (12:39 +0100)]
Raspberry Pi: Keep warnings from firmware in DT, if any
The /chosen/user-warnings property is created by the RPi firmware if
there are warnings to report, keep it to make debugging easier.
For example, if the firmware config.txt contains
"dtoverlay=error-example" and that example references an undefined
symbol "&nosuchdev" the warning can be read after boot:
$ cat /proc/device-tree/chosen/user-warnings
dterror: can't find symbol 'nosuchdev'
Failed to resolve overlay 'error-example'
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Martin Stolpe [Wed, 23 Oct 2024 13:09:20 +0000 (15:09 +0200)]
rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
The functions fdt_simplefb_add_node and fdt_simplefb_enable_and_mem_rsv
are only available if CONFIG_FDT_SIMPLEFB is enabled.
Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com>
Acked-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Peter Robinson [Sun, 29 Dec 2024 14:46:05 +0000 (14:46 +0000)]
rpi: Add identifiers for the new RPi 5 series
The Raspberry Pi foundation have released the Raspberry
Pi 500, CM5 an CM5 lite devices so add the assoicated
revision identifers so we can detect them.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Matthias Brugger <mbrugger@suse.com>
Tom Rini [Wed, 12 Mar 2025 20:14:18 +0000 (14:14 -0600)]
Merge tag 'u-boot-imx-master-
20250312' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/25106
- Fix VDDQ voltage setting for LPDDR4x on imx93_evk.
Ye Li [Wed, 12 Mar 2025 09:04:07 +0000 (17:04 +0800)]
imx93_evk: Fix wrong VDDQ voltage setting for LPDDR4x
The default PCA9451 BUCK2 volt is 0.6 V for LPDDR4x VDDQ. The codes
are actually used for reworking to LPDDR4 which needs VDDQ at 1.1 V.
So remove it to avoid LPDDR4x issue.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Mon, 10 Mar 2025 23:31:52 +0000 (17:31 -0600)]
Prepare v2025.04-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 10 Mar 2025 23:30:32 +0000 (17:30 -0600)]
configs: Resync with savedefconfig
Resync all defconfig files using qconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 10 Mar 2025 13:48:25 +0000 (07:48 -0600)]
Merge tag 'u-boot-stm32-
20250310' of https://source.denx.de/u-boot/custodians/u-boot-stm
ARM: stm32mp: Fix boot hang on STM32MP15xx with 1 GiB of DRAM.
Marek Vasut [Sun, 9 Mar 2025 02:05:54 +0000 (03:05 +0100)]
ARM: stm32mp: Fix dram_bank_mmu_setup() for ram_top=0
On STM32MP15xx with 1 GiB of DRAM, the gd->ram_top becomes 0,
because DRAM base 0xc0000000 + DRAM size 0x40000000 leads to
gd->ram_top overflow which resets it to 0. Handle this special
case simply by checking for gd->ram_top being zero, and if it
is, assume there is no addr >= gd->ram_top .
This fixes boot hang on STM32MP15xx with 1 GiB of DRAM.
Fixes:
25fb58e88aba ("ARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tom Rini [Wed, 26 Feb 2025 15:33:45 +0000 (09:33 -0600)]
scripts/checkpatch.pl: Upgrade IS_ENABLED_CONFIG to error for U-Boot
A problem we have today is that some instances of IS_ENABLED(FOO) have
crept in to the code. This is in turn because with checkpatch.pl this is
only a warning and not an error, so they were overlooked. And looking
deeper, in the Linux kernel this pattern is allowed because
IS_ENABLED(DEFINED_FLAG) is allowed if discouraged and a quick skim of
the instances I saw in the current kernel follow this pattern. In U-Boot
however, this is not allowed, so bump to an error.
Signed-off-by: Tom Rini <trini@konsulko.com>
Andrea della Porta [Sun, 2 Mar 2025 18:29:31 +0000 (19:29 +0100)]
fs/squashfs: Fix memory leak in sqfs_size_nest()
In case MAX_SYMLINK_NEST is reached while determining the size
on a symlink node, the function returns immediately.
This would not free the resources after the free_strings: label
causing a memory leak.
Set the ret value and just break out of the switch to fix this.
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diederik de Haas [Sat, 1 Mar 2025 10:14:12 +0000 (11:14 +0100)]
mcheck: Fix SPDX License Identifier to LGPL-2.1-or-later
The GPL-2.1+ SPDX License Identifier doesn't exist, but luckily the full
license text was available which shows that GPL-2.1+ was a typo and it
should have been LGPL-2.1-or-later.
As the '+' in LGPL-2.1+ is deprecated in SPDX 3.0, use the preferred
identifier, which is '-or-later'.
Normally the full license header is removed when switching to SPDX
License Identifiers, so do that now.
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Sumit Garg [Thu, 27 Feb 2025 12:09:04 +0000 (17:39 +0530)]
MAINTAINERS: .mailmap: Update Sumit Garg's email address
Update Sumit Garg's email address to @kernel.org.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Tom Rini [Wed, 5 Mar 2025 18:11:18 +0000 (12:11 -0600)]
Merge tag 'xilinx-for-v2025.04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
AMD/Xilinx changes for v2025.04-rc4
Zynq:
- Guard code around SPL_FS_LOAD_PAYLOAD_NAME
Versal*:
- Remove tftp block size 4096
Versal:
- Use clocks per DT binding
- Store driver data in data section
Versal Gen 2:
- Fix major/minor version decoding
Padmarao Begari [Tue, 4 Mar 2025 04:30:30 +0000 (10:00 +0530)]
xilinx: Remove tftp block size 4096
The zynqmp gem driver support max MTU size 1536, so remove tftp
block size 4096 from defconfig and use default tftp block size.
Fixes:
a33b4b96b3cf ("xilinx: Enable MBEDTLS/LWIP/WGET and WGET_HTTPS")
Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250304043030.2344536-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Heiko Schocher [Wed, 26 Feb 2025 09:18:58 +0000 (10:18 +0100)]
led: Fix next Coverity scan error
The following was reported by Coverity scan:
*** CID 542488: Control flow issues (NO_EFFECT)
/drivers/led/led-uclass.c: 277 in led_get_function_name()
271 return uc_plat->label;
272
273 /* Now try to detect function label name */
274 func = dev_read_string(dev, "function");
275 cp = dev_read_u32(dev, "color", &color);
276 // prevent coverity scan error CID 541279: (TAINTED_SCALAR)
>>> CID 542488: Control flow issues (NO_EFFECT)
>>> This less-than-zero comparison of an unsigned value is never true. "color < 0U".
277 if (color < LED_COLOR_ID_WHITE || color >= LED_COLOR_ID_MAX)
278 cp = -EINVAL;
279
Fix it.
Addresses-Coverity-ID: 542488
Link: https://lists.denx.de/pipermail/u-boot/2025-February/581567.html
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
J. Neuschäfer [Mon, 17 Feb 2025 11:18:03 +0000 (12:18 +0100)]
gpio: 74x146: depend on DM_SPI
Currently, Kconfig allows building CONFIG_DM_74X164 without
CONFIG_DM_SPI, which results in linker errors because this driver
actually uses dm_spi_* functions:
drivers/gpio/74x164_gpio.o: in function `gen_74x164_write_conf':
undefined reference to `dm_spi_claim_bus'
undefined reference to `dm_spi_xfer'
undefined reference to `dm_spi_release_bus'
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Tom Rini [Tue, 4 Mar 2025 14:22:19 +0000 (08:22 -0600)]
Merge patch series "Syncing up on skip-at-start"
Simon Glass <sjg@chromium.org> says:
This series has the skip-at-start change and a few fixes.
Sadly it also includes a revert for the dm_probe_devices() patch, since
it breaks jerry (RK3288). I will need to investigate way.
It is based on -next and I can send a PR if desired.
https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/24835
Link: https://lore.kernel.org/r/20250226162621.2681677-1-sjg@chromium.org
Simon Glass [Wed, 26 Feb 2025 16:26:18 +0000 (09:26 -0700)]
x86: Stop working around skip-at-start
With a recent Binman change, the skip-at-start property is now honoured,
meaning that all image-pos values in the affected section start from
the skip-at-start value.
The x86 code works around the old behaviour at present, so update it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 26 Feb 2025 16:26:17 +0000 (09:26 -0700)]
binman: Honour the skip-at-start property more faithfully
A discussion on the mailing list about dealing with block offsets and
binman symbols made me think that something is wrong with how Binman
deals with the skip-at-start property.
The feature was originally designed to handle x86 ROMs, which are mapped
at the top of the address space. That seemed too specific, whereas
skipping some space at the start seemed more generally useful.
It has proved useful. For example, rockchip images start at block 64,
so a skip-at-start of 0x8000 deals with this.
But it doesn't actually work correctly, since the image_pos value does
not give the actual position on the media.
Fix this and update the documentation, moving it into the 'section'
section.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 26 Feb 2025 16:26:16 +0000 (09:26 -0700)]
binman: Rename Entry.end_4gb
The property is named end_at_4gb so name the variable the same, to avoid
confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 26 Feb 2025 16:26:15 +0000 (09:26 -0700)]
samsung: snow: Use BLOBLIST_FIXED
Snow requires a fixed bloblist to operate, so re-enable this option.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
864106f3c47 ("bloblist: Make BLOBLIST_ALLOC the default")
Simon Glass [Wed, 26 Feb 2025 16:26:14 +0000 (09:26 -0700)]
Revert "dm: core: Simplify dm_probe_devices()"
Unfortunately this change was not safe as some devices are bound before
relocation, but we don't want to probe them.
It causes 'raise: Signal # 8 caught' on jerry.
Move the bootstage timer to after autoprobe in initf_dm() since the
trace test does not tolerate any variance.
This reverts commit
21dd873572a01d74bfdfceb7a30b056f8ccba187.
Signed-off-by: Simon Glass <sjg@chromium.org>
Stefan Eichenberger [Mon, 3 Mar 2025 18:16:03 +0000 (19:16 +0100)]
board: verdin-am62: fix missing memory fixup call
The commit
bc07851897bd ("board: ti: Pull redundant DDR functions to a
common location and Fixup DDR size when ECC is enabled") broke DRAM
support for the Verdin AM62. This was partially fixed with commit
3f866c47b582 ("board: verdin-am62: add dram_init_banksize"). However,
because fixup_memory_node was not called, the Linux kernel was started
with the wrong memory size on modules with less memory available. This
resulted in boot failures. Fix this issue by calling fixup_memory_node
in the board file.
spl_perform_fixups will be called in the SPL and now sets the correct
memory size in the device tree of U-Boot by calling fixup_memory_node.
U-Boot will then adjust the memory sizes of Linux during bootm/booti in
fdt_fixup_memory_banks. This chain ensures that U-Boot and Linux only
use RAM that is actually available.
Fixes:
3f866c47b582 ("board: verdin-am62: add dram_init_banksize")
Fixes:
bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Weijie Gao [Sat, 25 Jan 2025 15:26:32 +0000 (23:26 +0800)]
miiphy: define mii_devs with LIST_HEAD()
When enabling net console and console multiplexing, a boot crash was
observed using mtk_eth driver with stdin/stdout set to "serial,nc"
in persistent environment:
> CPU: MediaTek MT7981
> Model: OpenWrt One
> DRAM: 1 GiB
> Core: 35 devices, 15 uclasses, devicetree: separate
> spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
> spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
> Loading Environment from UBI... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
> mtd: partition "ubi" extends beyond the end of device "spi-nand0" -- size truncated to 0x7f00000
> Read 126976 bytes from volume ubootenv to
000000007f7bf0c0
> Read 126976 bytes from volume ubootenv2 to
000000007f7de100
> OK
> "Synchronous Abort" handler, esr 0x96000004, far 0xeafffffeea000018
> elr:
0000000041e63cd4 lr :
0000000041e1b844 (reloc)
> elr:
000000007ff9ecd4 lr :
000000007ff56844
> x0 :
eafffffeea000018 x1 :
000000007fb552e0
> x2 :
00000000000000fe x3 :
0000000000000000
The cause is that "serial,nc" forced the console subsystem to
initialize the ethernet driver before ethernet subsystem
initialization (console_init_r() is called before initr_net()).
During the mtk_eth driver initialization, mdio_register() will be
called, and miiphy_get_dev_by_name() will then be called.
The miiphy_get_dev_by_name() will check the list "mii_devs" to see
if the passed device name exists. However the mii_devs is defined
without initialization:
> static struct list_head mii_devs;
and the actual initialization is done in the following chain:
initr_net -> eth_initialize -> eth_common_init -> miiphy_init
Since initr_net() hasn't be called, iterating over the mii_devs
will access to physical address 0 (mii_devs.next == NULL) and will
cause the crash.
The fix is to define mii_devs using:
> static LIST_HEAD(mii_devs);
As the "current_mii" is defined as a static variable, it will
always be NULL in board_r stage and initializing it will NULL is
unnecessary. So the entire miiphy_init() can be remove.
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Greg Malysa [Fri, 28 Feb 2025 19:28:27 +0000 (14:28 -0500)]
MAINTAINERS: Update contact information for Greg Malysa
My previous address is no longer accessible, but I will continue to be
involved in maintaining the ADI sc5xx platforms. This updates my contact
information and hopefully avoids bouncing emails from other developers.
Signed-off-by: Greg Malysa <malysagreg@gmail.com>
Michal Simek [Tue, 18 Feb 2025 12:43:07 +0000 (13:43 +0100)]
arm64: versal2: Show major and minor silicon version
ES1 silicon is 0x10 (16) and production is 0x20 (32) but correct number to
see are v1.0 or v2.0 instead of v16 or v32.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20095339334fe07f373ffae3bdbfec51f5a00dc7.1739882585.git.michal.simek@amd.com
Padmarao Begari [Tue, 18 Feb 2025 05:24:19 +0000 (10:54 +0530)]
clk: versal: Store driver data in data section
Line 171 in README is describing that before relocation
no code should use global variable because global variables
are placed to BSS section which is initialized to 0 after
relocation.
On Versal platforms clock driver is initialized before
relocation (via using dm,bootph-all flag in DT) and global
variables are initialized which works if this is used only
before relocation. But the variables are used after
relocation too but values are zeroed which is ending up
incorrect behavior.
That's why place variables to data section to ensure that
values are not cleared which is for now the quickest
temporary solution. The correct way to do it is to move
all global variables to private data to avoid it.
Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250218052419.1141139-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Michal Simek [Fri, 7 Feb 2025 06:43:23 +0000 (07:43 +0100)]
xilinx: zynq: Guard code around SPL_FS_LOAD_PAYLOAD_NAME
Guard code around CONFIG_SPL_FS_LOAD_PAYLOAD_NAME usage to avoid
compilation failure.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/f15a9762494945814b06a71db90ee4db59dd17ed.1738910601.git.michal.simek@amd.com
Tom Rini [Mon, 3 Mar 2025 13:49:07 +0000 (07:49 -0600)]
Merge tag 'fsl-qoriq-2025-3-3' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq
CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/24933
Fixes:
- Re-arm packet buffer in error case in tsec driver
- Fix LS1021a build
- Fix flush dcache alignment in caam_hash
Tom Rini [Mon, 3 Mar 2025 13:47:13 +0000 (07:47 -0600)]
Merge tag 'efi-2025-04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/24904
UEFI:
* Let efi_net_set_dp properly update the device path
Network:
* Avoid buffer overflows in wget_info with legacy TCP stack
Venkatesh Yadav Abbarapu [Thu, 6 Feb 2025 09:15:33 +0000 (14:45 +0530)]
clk: versal: Update the reference clocks as per bindings
As per the bindings the reference clocks naming has changed
from "pl_alt_ref_clk" to "pl_alt_ref" and "ref_clk" to "ref".
Update the same in the clock driver. Also add the fallback option
for older DT bindings.
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250206091533.1447234-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Benjamin Lemouzy [Fri, 21 Feb 2025 07:05:01 +0000 (08:05 +0100)]
crypto: fsl_hash: fix flush dcache alignment in caam_hash()
Loading a FIT kernel image with hash hardware acceleration enabled
(CONFIG_SHA_HW_ACCEL=y) displays the following CACHE warning:
[...]
Trying 'kernel-1' kernel subimage
[...]
Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [
16000128,
1673fae8]
[...]
Trying 'ramdisk-1' ramdisk subimage
[...]
Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [
1676d6d4,
1737a5d4]
[...]
Trying 'fdt-imx6q-xxx.dtb' fdt subimage
[...]
Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [
1673fbdc,
1674b0dc]
[...]
This patch fixes it.
Tested on:
- i.MX 6 custom board
- LS1021A custom board
Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Benjamin Lemouzy [Mon, 17 Feb 2025 15:36:03 +0000 (16:36 +0100)]
board: freescale: fix LS1021a build
Fix build error "undefined reference to `is_warm_boot'" when
ls1021atsn and ls1021atwr boards are built with CONFIG_SPL=y and
CONFIG_DEEP_SLEEP=n.
Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
J. Neuschäfer [Sun, 16 Feb 2025 21:18:13 +0000 (22:18 +0100)]
net: tsec: Re-arm packet buffer in error case
When an error is detected in the TSEC receive path, the driver currently
prints an error message, but leaves the corresponding packet descriptor
in its old state (i.e. owned by the CPU side). As a result, the packet
queue can be starved of available buffers if enough errors happen.
To recover from errors, re-arm the packet buffer descriptor after an
error has been detected.
Errors can be provoked by changing a PHY with phy-mode = "rgmii-id" to
phy-mode = "rgmii".
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
J. Neuschäfer [Sun, 16 Feb 2025 21:18:12 +0000 (22:18 +0100)]
net: tsec: Reorder tsec_recv and tsec_free_pkt
This is necessary for the following patch. No functional change.
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Sat, 1 Mar 2025 13:51:14 +0000 (07:51 -0600)]
Merge tag 'u-boot-rockchip-
20250301' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/2489
- Fix SD-Card boot on rk3308-rock-s0 v1.1;
- Fix crash on nanopi-r4s seconde usb port;
- Disable undeeded PCI config for nanopi-r3s-rk3566
- Correct usage of IS_ENABLED()
Adriano Cordova [Thu, 6 Feb 2025 17:40:11 +0000 (14:40 -0300)]
legacy-net: wget: fix wget_info handling after new tcp legacy stack
Check wget_info->buffer_size for overflow and do not clean the wget_info struct
on failure, let the owner of the struct handle the error. The latter is necesary
, e.g., for when a request fails because the provided buffer was too small.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Adriano Cordova [Mon, 27 Jan 2025 12:34:45 +0000 (09:34 -0300)]
efi_loader: efi_net: let efi_net_set_dp properly update the device path
This commit fixes an use after free introduced in Commit
e55a4acb54
(" efi_loader: net: set EFI bootdevice device path to HTTP when loaded
from wget"). The logic in efi_net_set_dp is reworked so that when the
function is invoked it not only changes the value of the static variable
net_dp (this is how the function was implemented in
e55a4acb54) but also
updates the protocol interface of the device path protocol in case efi
has started.
Fixes:
e55a4acb54e8 ("efi_loader: net: set EFI bootdevice device path to HTTP when loaded from wget")
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Tianling Shen [Wed, 15 Jan 2025 05:37:05 +0000 (13:37 +0800)]
rockchip: nanopi-r3s-rk3566: disable unneeded CONFIG_NVME_PCI
This board does not have any NVMe slot, so disable unneeded
CONFIG_NVME_PCI option.
Fixes:
bf4a33e725ae ("board: rockchip: add FriendlyElec NanoPi R3S")
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Justin Klaassen [Fri, 31 Jan 2025 17:06:13 +0000 (17:06 +0000)]
rockchip: nanopi-r4s: Enable second usb port and fix crash
The patch enables the second USB3.0 Type-A USB port on the NanoPi R4S
board, which prevents a crash when initializing the usb system in U-Boot
and allows both Type-A USB ports to be used for booting.
=> usb start
starting USB...
Bus usb@
fe380000: USB EHCI 1.00
Bus usb@
fe3c0000: "Synchronous Abort" handler, esr 0x96000010, far 0x0
Signed-off-by: Justin Klaassen <justin@tidylabs.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tom Rini [Wed, 26 Feb 2025 20:31:23 +0000 (14:31 -0600)]
clk: rockchip: Correct usage of IS_ENABLED() macro
These two files were using IS_ENABLED() to test for CONFIG flags but omitted
the CONFIG_ prefix and so did not work as expected.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 20 Feb 2025 18:31:28 +0000 (18:31 +0000)]
rockchip: rk3308-rock-s0: Fix SD-card boot on v1.1 hw revision
BootROM leave GPIO4_D6 configured as SDMMC_PWREN function and DW MMC
driver set PWREN high in dwmci_init().
However, HW revision prior to v1.2 must pull GPIO4_D6 low to access
sdmmc. For HW revision v1.2 the state of GPIO4_D6 has no impact.
Upstream Linux commit
26c100232b09 "arm64: dts: rockchip: Fix sdmmc
access on rk3308-rock-s0 v1.1 boards" fixed this issue by adding a
vcc_sd regulator.
Include the new vcc_sd regulator in SPL and enable required Kconfig
options to set GPIO4_D6 low to fix reading sdmmc on v1.1 hw revision.
Fixes:
25438c40a007 ("board: rockchip: Add Radxa ROCK S0")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tom Rini [Thu, 27 Feb 2025 18:11:07 +0000 (12:11 -0600)]
Merge patch series "mbedtls: fix incorrect kconfig dependencies on mbedtls"
This series from Raymond Mao <raymond.mao@linaro.org> fixes assorted
problems with how dependencies were expressed in Kconfig for mbedtls and
assorted algorithms.
Link: https://lore.kernel.org/r/20250203220825.707590-1-raymond.mao@linaro.org
Raymond Mao [Mon, 3 Feb 2025 22:08:14 +0000 (14:08 -0800)]
mbedtls: refactor mbedtls build for XPL
Refactor the entire kconfig page for mbedtls, adapt mbedtls makefile
and default config file using 'XPL_', in order to have independent
mbedtls kconfig options in U-Boot Proper, SPL, TPL and VPL.
User can choose legacy or mbedtls libraries for them independently.
Set mbedtls native hashing libraries as default when MBEDTLS_LIB,
SPL_MBEDTLS_LIB, TPL_MBEDTLS_LIB or VPL_MBEDTLS_LIB is selected.
If users prefer using U-Boot legacy hashing libraries, please select
MBEDTLS_LIB_HASHING_ALT, SPL_MBEDTLS_LIB_HASHING_ALT,
TPL_MBEDTLS_LIB_HASHING_ALT or VPL_MBEDTLS_LIB_HASHING_ALT for U-Boot
Proper, SPL, TPL and VPL respectively.
Moreover, rename a few kconfig options and update their descriptions to
improve the consistency of terminology.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Raymond Mao [Mon, 3 Feb 2025 22:08:13 +0000 (14:08 -0800)]
mbedtls: access mbedtls private members in mscode and pkcs7 parser
U-Boot requires to access x509_internal.h, mbedtls_sha256_context and
mbedtls_sha1_context in the porting layer, and this requires to
enable MBEDTLS_ALLOW_PRIVATE_ACCESS.
Enable it to mscode and pkcs7_parser to fix a mbedtls internal building
error when X509 is selected.
Moreover, Move it to a separate file to avoid enabling it in multiple
places.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Raymond Mao [Mon, 3 Feb 2025 22:08:12 +0000 (14:08 -0800)]
mbedtls: fix incorrect kconfig dependencies on mbedtls
Fixed the building failures when WGET_HTTPS,NET_LWIP and MBEDTLS_LIB
are selected due to a few incorrect kconfig dependencies.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Daniel Schultz [Tue, 11 Feb 2025 06:42:05 +0000 (22:42 -0800)]
arch: arm: dts: k3-am642-phycore-som-binman: Add custMpk to overlays
There are some device-tree overlays with missing entries for the
keyfile. Add them to sign all images in the U-Boot FIT image.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Daniel Schultz [Tue, 11 Feb 2025 06:42:04 +0000 (22:42 -0800)]
arch: arm: dts: k3-am625-phycore-som-binman: Add custMpk to overlays
There are some device-tree overlays with missing entries for the
keyfile. Add them to sign all images in the U-Boot FIT image.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Tom Rini [Thu, 27 Feb 2025 14:00:30 +0000 (08:00 -0600)]
Merge tag 'u-boot-imx-master-
20250227' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/24872
- Fix bootstd booting on imx8mm_evk, imx8mq_evk, imx8mp_evk and
imx93_evk
Fabio Estevam [Thu, 27 Feb 2025 10:29:16 +0000 (07:29 -0300)]
imx8mp_evk: Pass kernel_addr_r
Currently, booting via bootstd fails because the kernel cannot be retrieved.
The reason for this is the lack of 'kernel_addr_r'.
Pass 'kernel_addr_r' to fix booting via bootstd.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Fabio Estevam [Thu, 27 Feb 2025 10:29:15 +0000 (07:29 -0300)]
imx93_evk: Pass kernel_addr_r
Currently, booting via bootstd fails because the kernel cannot be retrieved.
The reason for this is the lack of 'kernel_addr_r'.
Pass 'kernel_addr_r' to fix booting via bootstd.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Sat, 22 Feb 2025 12:17:11 +0000 (20:17 +0800)]
imx8mm: imx8mm_evk: fix BOOTSTD boot
Select BOOTSTD_FULL and BOOTSTD_BOOTCOMMAND
Correct DEFAULT_FDT_FILE
Correct env file for imx8mm_evk_fspi_defconfig
Fixes:
364ba68ed1a ("imx: imx8mm_evk: Switch to BOOTSTD")
Reported-by: Ludwig Nussel <ludwig.nussel@siemens.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Sat, 22 Feb 2025 12:17:10 +0000 (20:17 +0800)]
imx8mq: imx8mq_evk: fix DEFAULT_FDT_FILE
The CONFIG_DEFAULT_FDT_FILE should be imx8mq_evk.dtb for this board
Fixes:
7050bd925f7 ("imx: imx8mq_evk: Switch to BOOTSTD")
Reported-by: Ludwig Nussel <ludwig.nussel@siemens.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Wed, 26 Feb 2025 14:55:32 +0000 (08:55 -0600)]
Merge tag 'qcom-fixes-2025.04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon
CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/24841
The clk_stub, regulator, and pinctrl fixes enable the sdcard on the RB5
dev board (and sm8250 devices broadly). clk_stub is only enabled in
qcom_defconfig and the others are qcom specific so these shouldn't
affect other platforms.
Lastly, a small ufetch fix from Sam which gets color rendering correctly
on U-Boots framebuffer video device.
Sam Day [Mon, 3 Feb 2025 16:42:20 +0000 (16:42 +0000)]
cmd: ufetch: use 3-bit colour ANSI codes
Currently, the 8-bit escapes are being used, which aren't supported by
vidconsole_escape_char. Since the current usage maps directly to the
3-bit equivalents anyway, let's use those instead.
With this change, the fetch output looks as fetching in the vidconsole
as it does over serial!
Signed-off-by: Sam Day <me@samcday.com>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Tested-by: Ferass El Hafidi <funderscore@postmarketos.org>