]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
7 months agoserial-uclass: set GD_FLG_SERIAL_READY only when cur_serial_dev is assigned
Maxim Kochetkov [Wed, 13 Aug 2025 05:54:32 +0000 (08:54 +0300)] 
serial-uclass: set GD_FLG_SERIAL_READY only when cur_serial_dev is assigned

serial_find_console_or_panic() may left cur_serial_dev unassigned if
REQUIRE_SERIAL_CONSOLE is not set. Setting GD_FLG_SERIAL_READY in
this situation confuses serial console code. It tries to use
unassigned driver instead of debug port and stops printing.
So check cur_serial_dev before setting GD_FLG_SERIAL_READY to allow
console to keep printing via debug port.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
7 months agosound: maxim_codec: Fix coding mistake
Andrew Goodbody [Tue, 12 Aug 2025 10:26:06 +0000 (11:26 +0100)] 
sound: maxim_codec: Fix coding mistake

In maxim_i2c_read the code mistakenly just returned the return value
from dm_i2c_read leaving the following code unreachable. Instead assign
ret to be the return value from dm_i2c_read so that the following code
can operate as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agoMerge patch series "env: fat: Add support for NVME"
Tom Rini [Wed, 20 Aug 2025 20:24:57 +0000 (14:24 -0600)] 
Merge patch series "env: fat: Add support for NVME"

This series from Fabio Estevam <festevam@gmail.com> adds support for
having the environment be found on an NVMe device that contains a FAT
filesystem.

Link: https://lore.kernel.org/r/20250812174612.1159634-1-festevam@gmail.com
8 months agoenv: fat: Standardize the interface type check
Fabio Estevam [Tue, 12 Aug 2025 17:46:12 +0000 (14:46 -0300)] 
env: fat: Standardize the interface type check

Make the interface type check consistent among the other interface types
by checking it agains the ifname string.

The ifname string contains the string returned by env_fat_get_intf(), which
returns the CONFIG_ENV_FAT_INTERFACE value.

No functional change.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
8 months agoenv: ext4: Add support for NVME
Fabio Estevam [Tue, 12 Aug 2025 17:46:11 +0000 (14:46 -0300)] 
env: ext4: Add support for NVME

Add support for retrieving the EXT4 environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.

To use the EXT4 environment from an NVME device, pass
CONFIG_ENV_EXT4_INTERFACE="nvme" in the defconfig.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
8 months agoenv: fat: Add support for NVME
Fabio Estevam [Tue, 12 Aug 2025 17:46:10 +0000 (14:46 -0300)] 
env: fat: Add support for NVME

Add support for retrieving the FAT environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.

To use the FAT environment from an NVME device, pass
CONFIG_ENV_FAT_INTERFACE="nvme" in the defconfig.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
8 months agoram: renesas: dbsc5: Fix off by 1 errors
Andrew Goodbody [Fri, 8 Aug 2025 11:32:36 +0000 (12:32 +0100)] 
ram: renesas: dbsc5: Fix off by 1 errors

In dbsc5_read_vref_training the arrays dvw_min_byte0_table and
dvw_min_byte1_table have 128 elements per channel. The variable
vref_stop_index is limited to be a maximum of 128. This means that the
index used to access the arrays must use a test of '< vref_stop_index'
rather than '<= vref_stop_index' in order to prevent out of bounds
accesses to the arrays.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
8 months agoMerge patch series "Add support for Ethernet boot"
Tom Rini [Wed, 20 Aug 2025 17:07:22 +0000 (11:07 -0600)] 
Merge patch series "Add support for Ethernet boot"

Chintan Vankar <c-vankar@ti.com> says:

This series adds bind method for CPSW to avoid explicit probing, removes
explicit probing of CPSW, adds support for Ethernet boot on SK-AM68,
SK-AM62P-LP, J722S, SK-AM69.

Link: https://lore.kernel.org/r/20250731075956.605474-1-c-vankar@ti.com
8 months agoconfigs: am69_sk_a72_ethboot: Add configs to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:56 +0000 (13:29 +0530)] 
configs: am69_sk_a72_ethboot: Add configs to enable Ethernet boot

Add configs required to enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoconfigs: am69_sk_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Chintan Vankar [Thu, 31 Jul 2025 07:59:55 +0000 (13:29 +0530)] 
configs: am69_sk_r5_ethboot: Add configs to enable Ethernet boot in R5SPL

Add configs required to enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoarm: mach-k3: j784s4_spl: Alias Ethernet boot to CPGMAC
Chintan Vankar [Thu, 31 Jul 2025 07:59:54 +0000 (13:29 +0530)] 
arm: mach-k3: j784s4_spl: Alias Ethernet boot to CPGMAC

This is required to enable spl_net boot on SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoarm: mach-k3: j784s4: Update SoC auto-gen data to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:53 +0000 (13:29 +0530)] 
arm: mach-k3: j784s4: Update SoC auto-gen data to enable Ethernet boot

Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoconfigs: j722s_evm_a53_ethboot: Enable configs required for Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:52 +0000 (13:29 +0530)] 
configs: j722s_evm_a53_ethboot: Enable configs required for Ethernet boot

Enable configs required to support Ethernet boot for J722S.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoconfigs: j722s_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Chintan Vankar [Thu, 31 Jul 2025 07:59:51 +0000 (13:29 +0530)] 
configs: j722s_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL

Add configs to enable Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoboard: ti: j722s: evm: Enable cache for J722s
Chintan Vankar [Thu, 31 Jul 2025 07:59:50 +0000 (13:29 +0530)] 
board: ti: j722s: evm: Enable cache for J722s

Enable cache for J722s to optimize performance of CPU to access data from
memory.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoarm: mach-k3: j722s: Update SoC autogenerated data to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:49 +0000 (13:29 +0530)] 
arm: mach-k3: j722s: Update SoC autogenerated data to enable Ethernet boot

Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoconfigs: am62px_evm_a53_ethboot: Enable configs required for Ethboot
Chintan Vankar [Thu, 31 Jul 2025 07:59:48 +0000 (13:29 +0530)] 
configs: am62px_evm_a53_ethboot: Enable configs required for Ethboot

Enable config options needed to support Ethernet boot on SK-AM62P-LP.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoconfigs: am62px_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Andreas Dannenberg [Thu, 31 Jul 2025 07:59:47 +0000 (13:29 +0530)] 
configs: am62px_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL

Add configs for enabling Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoboard: ti: am62px: evm: Enable cache for AM62p
Andreas Dannenberg [Thu, 31 Jul 2025 07:59:46 +0000 (13:29 +0530)] 
board: ti: am62px: evm: Enable cache for AM62p

Enable cache for AM62p to optimize performance of CPU to access data from
memory.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoarm: mach-k3: am62p: Update SoC auto-gen data to enable Ethernet boot
Andreas Dannenberg [Thu, 31 Jul 2025 07:59:45 +0000 (13:29 +0530)] 
arm: mach-k3: am62p: Update SoC auto-gen data to enable Ethernet boot

Update dev-data and clk-data to enable Ethernet boot using CPSW on
SK-AM62P-LP.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoconfigs: am68_sk_a72_ethboot: Enable configs required for Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:44 +0000 (13:29 +0530)] 
configs: am68_sk_a72_ethboot: Enable configs required for Ethernet boot

Enable config options needed to support Ethernet boot on AM68-SK.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoconfigs: am68_sk_r5_ethboot: Add configs for enabling Ethernet boot in R5SPL
Chintan Vankar [Thu, 31 Jul 2025 07:59:43 +0000 (13:29 +0530)] 
configs: am68_sk_r5_ethboot: Add configs for enabling Ethernet boot in R5SPL

Add configs for enabling Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agonet: ti: Kconfig: Enable SPL_SYSCON config for CPSW
Chintan Vankar [Thu, 31 Jul 2025 07:59:42 +0000 (13:29 +0530)] 
net: ti: Kconfig: Enable SPL_SYSCON config for CPSW

TI's Ethernet switch needs system controllers enabled in R5SPL stage while
booting via Ethernet. Enable SPL_SYSCON config for
CONFIG_TI_AM65_CPSW_NUSS.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoarm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC
Chintan Vankar [Thu, 31 Jul 2025 07:59:41 +0000 (13:29 +0530)] 
arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC

This is required to enable spl_net boot on SK-AM68.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoarm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:40 +0000 (13:29 +0530)] 
arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot

Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot.

Reviewed-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoRevert "arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS"
Chintan Vankar [Thu, 31 Jul 2025 07:59:39 +0000 (13:29 +0530)] 
Revert "arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS"

This reverts commit 35bddf889652081f150f60740618851b5d4817f4.

Bind method of "am65_cpsw_nuss" driver will ensure binding of it's child
driver "am65_cpsw_nuss_ports", and there is no need to probe CPSW driver
explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoRevert "mach-k3: am642_init: Probe AM65 CPSW NUSS for R5/A53 SPL"
Chintan Vankar [Thu, 31 Jul 2025 07:59:38 +0000 (13:29 +0530)] 
Revert "mach-k3: am642_init: Probe AM65 CPSW NUSS for R5/A53 SPL"

This reverts commit 93c43a8365fae0f188ac091d129542470ddaf62d.

Bind method of "am65_cpsw_nuss" driver will ensure binding of it's child
driver "am65_cpsw_nuss_ports", and there is no need to probe CPSW driver
explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoarch: mach-k3: common: Remove explicit probing of CPSW driver
Chintan Vankar [Thu, 31 Jul 2025 07:59:37 +0000 (13:29 +0530)] 
arch: mach-k3: common: Remove explicit probing of CPSW driver

This reverts commit e58d9284850fa78d364d264087fe744717963675.

Bind method of am65_cpsw_nuss driver will ensure binding of it's child
driver am65_cpsw_nuss_ports, and there is no need to call CPSW driver
explicitly. Remove explicit probing of CPSW driver for AM62x.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agonet: ti: am65-cpsw-nuss: Define bind method for CPSW driver
Chintan Vankar [Thu, 31 Jul 2025 07:59:36 +0000 (13:29 +0530)] 
net: ti: am65-cpsw-nuss: Define bind method for CPSW driver

CPSW driver is defined as UCLASS_MISC driver which needs to be probed
explicitly. Define bind method for CPSW driver to scan and bind
ethernet-ports with UCLASS_ETH driver which will eventually probe CPSW
driver and avoid probing CPSW driver explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
8 months agoARM: tegra210: p3450: fix Jetson Nano SPI flash
Peter Robinson [Tue, 19 Aug 2025 15:40:14 +0000 (16:40 +0100)] 
ARM: tegra210: p3450: fix Jetson Nano SPI flash

The Nano's SPI flash stopped working in U-Boot, as the prior stage loaded
U-Boot, the only thing it was used for was save/loading env vars so update
the DT so it can now initialise it. It also drops enabling the old
TEGRA114_SPI driver, as the flash hangs off the faster TEGRA210_QSPI
interface, nothing on the Nano uses the old interface by default so it's
surplus.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
8 months agoconfigs: p3450: reduce size of Jetson Nano u-boot.bin
Peter Robinson [Tue, 19 Aug 2025 15:40:13 +0000 (16:40 +0100)] 
configs: p3450: reduce size of Jetson Nano u-boot.bin

The Jetson Nano contains all it's firmware on a 4Mb SPI flash, the
allocated size in that flash for U-Boot is 753664 bytes so we need to
ensure the u-boot.bin doesn't exceed that else it will fail.

Add a BOARD_SIZE_LIMIT and drop a few large, and somewhat esoteric, options
to bring us back under that limit.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
8 months agoboard: microsoft: add Microsoft Surface 2 support
Jonas Schwöbel [Sat, 2 Dec 2023 07:19:41 +0000 (08:19 +0100)] 
board: microsoft: add Microsoft Surface 2 support

Surface 2 is a Surface-series Windows RT hybrid tablet computer created by
Microsoft. Surface 2 uses a 1.7 GHz quad-core Nvidia Tegra 4 chipset with
2 GB of RAM, features 10.6 inch FullHD ClearType HD screen with 16:9 aspect
ratio and 32/64 GB of internal memory that can be supplemented with a
microSDXC card giving up to 64 GB of additional storage.

Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
8 months agoMerge patch series "ram: k3-ddrss: Support partial inline ECC"
Tom Rini [Tue, 19 Aug 2025 17:26:39 +0000 (11:26 -0600)] 
Merge patch series "ram: k3-ddrss: Support partial inline ECC"

Neha Malcom Francis <n-francis@ti.com> says:

Currently, the inline ECC implementation enables inline ECC across the
entire DDR space. However this is not always required and a more common
ask is to have only a portion of the DDR protected as enabling ECC
impacts read/write performance metrics.

This series aims to modify the logic to firstly support partial inline
ECC in its' most basic form which works for single controllers. Then it
introduces an algorithm to support multi DDR controllers where
interleaving plays a role. Since interleaving is handled by the MSMC, it
only makes sense to have the MSMC decide the inline ECC ranges for each
DDR.

This series also introduces support for multiple partial regions of inline
ECC however due to complexity only support for single DDR is present now.

WIP: A commandline test case patch for verifying the correct behaviour
of inline ECC including partial case. Was targeted for v2 however a little
tricky to make it a general test case especially for multi-DDR cases, so
have not combined it in this series for now.

Testing:
- Memtester runs for J721S2 and J784S4 platforms with and without ECC
  enablement runs fine.
- Along with patches that add support for the commandline test (see WIP
  note above) J784S4 shows expected behavior for three sets of partial
  inline ECC regions (non-overlapping, and after modifying J784S4 to
  have single DDR instead of multi-DDR):
  https://gist.github.com/nehamalcom/bde7e14e96485e4a188c3af3af6d75d6

Link: https://lore.kernel.org/r/20250812124324.124306-1-n-francis@ti.com
8 months agoram: k3-ddrss: Support multiple ECC regions for a single controller
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:24 +0000 (18:13 +0530)] 
ram: k3-ddrss: Support multiple ECC regions for a single controller

K3 Inline ECC mechanism can support up to 3 regions of inline ECC, add
this support for single controller.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: Add support for partial inline ECC in multi-DDR systems
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:23 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for partial inline ECC in multi-DDR systems

The existing approach does not account for interleaving in the DDRs when
setting up regions. There is support for MSMC to calculate the regions
for each DDR, so modify k3_ddrss_probe to set the regions accordingly
for multi-DDR systems.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: Add support for MSMC calculation of DDR inline ECC regions
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:22 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for MSMC calculation of DDR inline ECC regions

Add support for calculation of the protected regions for each DDR in
multi-DDR systems. Since MSMC is the parent node of the individual DDRs
as well as responsible for their interleaving, it only makes sense for
MSMC to contain the logic for dividing the regions.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: Add support for number of controllers under MSMC
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:21 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for number of controllers under MSMC

In K3 multi-DDR systems, the MSMC is responsible for the interleave
mechanism across all the DDR controllers. Add support for MSMC to obtain
the number of controllers it's responsible for using the DT.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: Add CONFIG_K3_MULTI_DDR
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:20 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add CONFIG_K3_MULTI_DDR

As we increase the functionalities that the K3 DDRSS sub-system support,
it is becoming more evident that the same logic cannot apply to both
single as well as multiple DDR controller devices. Add
CONFIG_K3_MULTI_DDR to be used to differentiate between the two.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: Add support for a partial inline ECC region
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:19 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for a partial inline ECC region

Instead of defaulting to choosing the entire DDR region when enabling
inline ECC, allow picking of a range within the DDR space using DT to
enable.

It expects such a node within the memory node, in the absence of which
we resort to enabling inline ECC for the entire DDR region:

inline_ecc: protected@9e780000 {
        device_type = "ecc";
        reg = <0x9e780000 0x0080000>;
        bootph-all;
};

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: Add comment about ecc_reserved_space
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:18 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add comment about ecc_reserved_space

The reserved space needed for storing the parity remains the same no
matter the size of the region that is being protected. Add this as a
comment for better code understanding.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: s/K3_DDRSS_MAX_ECC_REGIONS/K3_DDRSS_MAX_ECC_REG
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:17 +0000 (18:13 +0530)] 
ram: k3-ddrss: s/K3_DDRSS_MAX_ECC_REGIONS/K3_DDRSS_MAX_ECC_REG

To prevent checkpatch warning once we start using this macro more
frequently, shorten the length of it. While at it, also move the
structure k3_ddrss_ecc_region above k3_msmc so that future patches can
have it as a member of k3_msmc.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoram: k3-ddrss: Use DDR address instead of system address for ecc_regions
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:16 +0000 (18:13 +0530)] 
ram: k3-ddrss: Use DDR address instead of system address for ecc_regions

Let ecc_regions[x].start reflect the start of the ECC region in terms of
DDR addressing rather than system addressing. This will make it easier
to extend the usage of the same ecc_regions structure for multi-DDR
systems as well.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoMerge patch series "soc: ti: k3-navss-ringacc: Fix Smatch reported issues"
Tom Rini [Tue, 19 Aug 2025 17:26:16 +0000 (11:26 -0600)] 
Merge patch series "soc: ti: k3-navss-ringacc: Fix Smatch reported issues"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported issues including a derference of a pointer before its
NULL check and the use of an uninitialised variable.

Link: https://lore.kernel.org/r/20250812-k3-navss-v1-0-a88f7db58998@linaro.org
8 months agosoc: ti: k3-navss-ringacc: Do not use uninitialised variable
Andrew Goodbody [Tue, 12 Aug 2025 10:13:50 +0000 (11:13 +0100)] 
soc: ti: k3-navss-ringacc: Do not use uninitialised variable

In k3_nav_ringacc_probe_dt there can be no error code returned from
dev_read_u32_default so ret is not assigned to and should not be used.
Remove the use of ret from the dev_err call as it is unitialised.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agosoc: ti: k3-navss-ringacc: NULL check before dereference
Andrew Goodbody [Tue, 12 Aug 2025 10:13:49 +0000 (11:13 +0100)] 
soc: ti: k3-navss-ringacc: NULL check before dereference

Move the first dereference of ring to after the NULL check has occurred.
This will prevent any possible dereference of NULL.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agoMerge patch series "remoteproc: k3: Fix two Smatch issue reports"
Tom Rini [Tue, 19 Aug 2025 17:26:03 +0000 (11:26 -0600)] 
Merge patch series "remoteproc: k3: Fix two Smatch issue reports"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported two issues, firstly attempting to compare a u8 to a 16
bit macro and secondly a potentially uninitialised variable.

Link: https://lore.kernel.org/r/20250808-remoteproc_tik3-v1-0-f7dae0b177b2@linaro.org
8 months agoremoteproc: k3-r5: Ensure ret is initialised
Andrew Goodbody [Fri, 8 Aug 2025 12:00:23 +0000 (13:00 +0100)] 
remoteproc: k3-r5: Ensure ret is initialised

In k3_r5f_split_reset and k3_r5f_unprepare ret may not have been
assigned to before the code reaches the return ret at the function exit.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agoremoteproc: ti_k3_arm64: Cannot set or compare u8 to 16bits
Andrew Goodbody [Fri, 8 Aug 2025 12:00:22 +0000 (13:00 +0100)] 
remoteproc: ti_k3_arm64: Cannot set or compare u8 to 16bits

In the struct ti_sci_proc the fields proc_id and host_id are declared as
u8 so cannot be set to nor compared with a macro defined with a value
using 16 bits. Change the macro to only use 8 bits to make the code work
as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agosandbox: Add generic asm/atomic.h
Tom Rini [Tue, 12 Aug 2025 17:59:08 +0000 (11:59 -0600)] 
sandbox: Add generic asm/atomic.h

In order to compile code that uses <asm/atomic.h> on sandbox, we must
provide this header. RISC-V shows us today how to do so with the generic
header implementation, so copy that.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 months agosandbox: Improve dummy local_irq_save implementation
Tom Rini [Tue, 12 Aug 2025 17:59:07 +0000 (11:59 -0600)] 
sandbox: Improve dummy local_irq_save implementation

Normally, local_save_flags is used as part of the local_irq_* macros, so
remove that as it's unused. Make local_irq_save do something to the
passed variable so that it won't trigger unused variable warnings later.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 months agosound: rt5677: Cannot test unsigned for being negative
Andrew Goodbody [Tue, 12 Aug 2025 10:36:53 +0000 (11:36 +0100)] 
sound: rt5677: Cannot test unsigned for being negative

In rt5677_bic_or the call to rt5677_i2c_read returns an int so old
should also be an int to receive that value and then be able to test it
for being negative which would indicate an error.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agotools: aisimage: Make aisimage_check_params() static
Ilias Apalodimas [Tue, 12 Aug 2025 06:10:20 +0000 (09:10 +0300)] 
tools: aisimage: Make aisimage_check_params() static

We are trying to enable -Wmissing-prototypes and this functiion is only
used locally. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 months agotools: fit_info: Make usage() static
Ilias Apalodimas [Tue, 12 Aug 2025 06:03:25 +0000 (09:03 +0300)] 
tools: fit_info: Make usage() static

The function is only used locally so declare it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 months agopinctrl: nexell: Cannot test unsigned to be negative
Andrew Goodbody [Thu, 7 Aug 2025 09:16:55 +0000 (10:16 +0100)] 
pinctrl: nexell: Cannot test unsigned to be negative

In s5pxx18_pinctrl_set_state testing count to be negative will always
fail as count is unsigned despite receiving the return value of a
function that returns an int. Change count and idx to be of type int to
allow the test to work as expected and remove the need for any implicit
casts. Also change pin to be u32 which is what all called functions
expect.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agoMerge patch series "test/py: Correctly restore the DT after capsule tests"
Tom Rini [Mon, 18 Aug 2025 22:42:13 +0000 (16:42 -0600)] 
Merge patch series "test/py: Correctly restore the DT after capsule tests"

This series from Ilias Apalodimas <ilias.apalodimas@linaro.org> fixes a
number of issues with running the EFI capsule tests in CI.

Link: https://lore.kernel.org/r/20250807080819.1058411-1-ilias.apalodimas@linaro.org
8 months agotest/py: Fix capsule update tests
Ilias Apalodimas [Thu, 7 Aug 2025 08:08:17 +0000 (11:08 +0300)] 
test/py: Fix capsule update tests

Capsule updates tests have been skipped since
commit 659f97eb1fc3 ("scripts/Makefile.lib: EFI: Use capsule CRT instead of ESL file")

Remove that check since it's not needed anymore and re-enable the tests.

Fixes: 659f97eb1fc3 ("scripts/Makefile.lib: EFI: Use capsule CRT instead of ESL file")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 months agotest/py: Fix race conditions on EFI capsule tests
Ilias Apalodimas [Thu, 7 Aug 2025 08:08:16 +0000 (11:08 +0300)] 
test/py: Fix race conditions on EFI capsule tests

efi_capsule_data() is called in each of the EFI tests to create and
setup the files we need. However, it also recreates the spi.bin file
that holds the SPI flash contents we rely on for the test validation.

This leads to weird errors since reading from the flash returns 0,
instead of the expected value if the file has been recreated.

Always restart our sandbox instance if the files are recreated.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 months agotest/py: Read from the correct offset when initializing capsules
Ilias Apalodimas [Thu, 7 Aug 2025 08:08:15 +0000 (11:08 +0300)] 
test/py: Read from the correct offset when initializing capsules

The current code writes values to a flash offset defined by a function
argument. However, when reading it back we always read from a static
offset. Adjust the reads to use the correct offset.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 months agotest/py: Correctly restore the DT after capsule tests
Ilias Apalodimas [Thu, 7 Aug 2025 08:08:14 +0000 (11:08 +0300)] 
test/py: Correctly restore the DT after capsule tests

Some capsule tests are changing the sandbox DT to test various features,
e.g authenticated capsule updates, versioning support etc. However, no one
restores the original DT and the CI pops errors looking like

/u-boot
Bloblist at 100 not found (err=-2)
Failed to find FDT file '/tmp/sandbox/persistent-data/scratch/EFI/CapsuleTestData/test_ver.dtb'
initcall_run_f(): initcall fdtdec_setup() failed

if sandbox is restarted.

So let's restore the proper DT after done with the capsule testing.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 months agoMerge patch series "modify npcm7xx/8xx feature and bug fixed"
Tom Rini [Mon, 18 Aug 2025 22:41:50 +0000 (16:41 -0600)] 
Merge patch series "modify npcm7xx/8xx feature and bug fixed"

Jim Liu <jim.t90615@gmail.com> says:

modify npcm7xx/8xx feature and bug fixed

Link: https://lore.kernel.org/r/20250807053224.2169557-1-JJLIU0@nuvoton.com
8 months agoconfigs: npcm: remove CONFIG_SYS_SKIP_UART_INIT
Jim Liu [Thu, 7 Aug 2025 05:32:24 +0000 (13:32 +0800)] 
configs: npcm: remove CONFIG_SYS_SKIP_UART_INIT

Set the uart clock frequency according to dts by default.
If CONFIG_SYS_SKIP_UART_INIT is not enabled, no need to
do board_set_console to change the console bootarg.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agomisc: npcm_host_intf: Disable pending KCS/BPC interrupts
Jim Liu [Thu, 7 Aug 2025 05:32:23 +0000 (13:32 +0800)] 
misc: npcm_host_intf: Disable pending KCS/BPC interrupts

If there is an unhandled KCS/BPC pending interrupt after reboot,
the KCS/BPC Linux driver may trigger interrupts immediately upon
registering the irq. However, since the driver is not yet initialized
to handle them, this can lead to unexpected behavior.

To prevent this, disable KCS/BPC interrupts in u-boot to avoid pending
interrupts from being raised before the Linux driver is fully initialized.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agomisc: npcm_host_intf: Add Arbel eSPI workaround
Jim Liu [Thu, 7 Aug 2025 05:32:22 +0000 (13:32 +0800)] 
misc: npcm_host_intf: Add Arbel eSPI workaround

Enabling an eSPI channel(e.g. Peripheral Channel) during
an eSPI transaction might cause the BMC eSPI module to
transition to a wrong state and therefore respond with
FATAL_ERROR on incoming transaction.
Add workaround to avoid the module getting into the wrong
state.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agoarm: dts: nuvoton: Change timer node
Jim Liu [Thu, 7 Aug 2025 05:32:21 +0000 (13:32 +0800)] 
arm: dts: nuvoton: Change timer node

npcm_timer driver is changed to use SECCNT counter.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agoi2c: npcm: fix consecutive dm_i2c_read/write error
Stanley Chu [Thu, 7 Aug 2025 05:32:20 +0000 (13:32 +0800)] 
i2c: npcm: fix consecutive dm_i2c_read/write error

When doing a dm_i2c_read followed by a dm_i2c_write, the subsequent
transaction may get npcm_i2c_check_sda error because the module is
still busy in STOP condition in previous dm_i2c_read.
Always check and wait for module to be out of busy before starting
an i2c transaction.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agopinctrl: npcm8xx: add support for setting VCD input source
Stanley Chu [Thu, 7 Aug 2025 05:32:19 +0000 (13:32 +0800)] 
pinctrl: npcm8xx: add support for setting VCD input source

Add pinmux for the VCD input to use the HSYNC signal.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agoarm: dts: npcm8xx: add pinmux for VCD input
Stanley Chu [Thu, 7 Aug 2025 05:32:18 +0000 (13:32 +0800)] 
arm: dts: npcm8xx: add pinmux for VCD input

Add pinmux to select the HSYNC signal as the VCD input.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agoMerge tag 'net-20250818' of https://source.denx.de/u-boot/custodians/u-boot-net
Tom Rini [Mon, 18 Aug 2025 16:54:44 +0000 (10:54 -0600)] 
Merge tag 'net-20250818' of https://source.denx.de/u-boot/custodians/u-boot-net

Pull request net-20250818.

This is mostly code cleanup and fixes, mainly for issues reported by the
Smatch tool, plus two small features for NET_LWIP as well as support for
the BCM54612E phy.

net-common:
- Fix a bunch of issues reported by Smatch
- Introduce CONFIG_DNS
- Add support for BCM54612E phy

net-legacy:
- Add missing SPDX-License-Identifier for files originating from LiMon

net-lwip:
- ping: initialize net_try_count to 1
- sntp: remove redundant sys_check_timeouts()
- tftp: resend initial request
- Add Kconfig option to show ICMP unreachable errors

8 months agophy: cadence: torrent: Set an error code for return
Andrew Goodbody [Mon, 18 Aug 2025 10:44:29 +0000 (11:44 +0100)] 
phy: cadence: torrent: Set an error code for return

In cdns_torrent_phy_probe the test for too many lanes configured does
not set an error code before taking the error path. This could lead to a
silent failure if the calling code does not detect the error. Add the
code to return -EINVAL in this case.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agophy: cadence: sierra: Remove variable that is not assigned to
Andrew Goodbody [Mon, 18 Aug 2025 10:44:28 +0000 (11:44 +0100)] 
phy: cadence: sierra: Remove variable that is not assigned to

In cdns_sierra_pll_bind_of_clocks the variable 'i' is declared but never
assigned to before its value is used in a dev_err. Replace clk_names[i]
by the name passed to device_bind(), i.e., "pll_mux_clk". With that, the
clk_names[] array is unused and can therefore be removed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
[jf: update description]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
8 months agonet: ks8851_mll: Remove unreachable code
Andrew Goodbody [Tue, 5 Aug 2025 10:34:29 +0000 (11:34 +0100)] 
net: ks8851_mll: Remove unreachable code

In ks8851_mll_detect_chip the if..else code detects the case of (val &
0xfff0) != CIDER_ID and returns if found. So testing for this again will
always fail and the code is unreachable. Just remove the test and code
block.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: lwip: ping: set net_try_count to 1
Jerome Forissier [Mon, 4 Aug 2025 12:51:01 +0000 (14:51 +0200)] 
net: lwip: ping: set net_try_count to 1

The legacy network stack sets net_try_count to 1 at the beginning of the
net_loop() function. This is required for net_start_again() to work
properly. Therefore, set the variable accordingly in the do_ping()
function when NET_LWIP=y. This fixes an issue where a ping to an
unreachable destination would run twice on the same network device. For
example with qemu_arm64_lwip_defconfig:

 => dhcp
 DHCP client bound to address 10.0.2.15 (3 ms)
 => ping 10.0.0.1
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 => QEMU: Terminated

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
8 months agonet: cortina_ni: Fix typo accessing wrong phy
Andrew Goodbody [Fri, 1 Aug 2025 11:59:40 +0000 (12:59 +0100)] 
net: cortina_ni: Fix typo accessing wrong phy

In ca_phy_probe when checking for an external phy it uses a field from
the internal phy due to what is assumed to be a copy/paste typo. Make
the obvious fix to use the field from the external phy.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agolwip: sntp: remove redundant sys_check_timeouts()
Jerome Forissier [Fri, 1 Aug 2025 08:12:20 +0000 (10:12 +0200)] 
lwip: sntp: remove redundant sys_check_timeouts()

Now that sys_check_timeouts() is called in net_lwip_rx(), there is no
need to call it from the SNTP receive loop. Remove the redundant call.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
8 months agolwip: tftp: resend initial request
Jerome Forissier [Thu, 24 Jul 2025 16:08:24 +0000 (18:08 +0200)] 
lwip: tftp: resend initial request

The TFTP implementation does not resend the initial request if there is
no response from the server. Since TFTP is based on UDP, there should be
a mechanism to deal with unreliable transmissions at this point, similar
to what we have for data packets. Therefore, introduce request
retransmission.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
CC: Venkatesh Abbarapu <venkatesh.abbarapu@amd.com>
CC: Michal Simek <michal.simek@amd.com>
CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 months agonet: introduce CONFIG_DNS
Jerome Forissier [Fri, 18 Jul 2025 10:48:48 +0000 (12:48 +0200)] 
net: introduce CONFIG_DNS

Introduce the DNS Kconfig symbol so that various network commands may
use host names without the dns command (CMD_DNS) being selected.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
CC: E Shattow <e@freeshell.de>
8 months agonet: octeontx2: NULL check before dereference
Andrew Goodbody [Tue, 5 Aug 2025 14:53:35 +0000 (15:53 +0100)] 
net: octeontx2: NULL check before dereference

In rvu_af_init if the code fails to allocate memory for nix_af it will
take the error path with nix_af == NULL which will dereference nix_af.
Add the appropriate NULL check.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: octeontx2: Restore default value for err
Andrew Goodbody [Tue, 5 Aug 2025 14:53:34 +0000 (15:53 +0100)] 
net: octeontx2: Restore default value for err

In nix_lf_setup there is a default value assigned to err in case an
error is detected. However this default value will be overwritten in the
for loop so that later code does not return an error code from the
function. Add a new assignment to restore err to the default error code.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: mvpp2: Use field just assigned in error test
Andrew Goodbody [Tue, 5 Aug 2025 14:18:19 +0000 (15:18 +0100)] 
net: mvpp2: Use field just assigned in error test

In mvpp2_probe the code attempts to get a value for "gop-port-id" and
assigns it to port->gop_id but it then tests port->id for being equal to
-1. That is an impossible test as port->id is a field of type u8 so
cannot be negative. Change the test to port->gop_id.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: mvpp2: Cannot test unsigned variable to be negative
Andrew Goodbody [Tue, 5 Aug 2025 14:18:18 +0000 (15:18 +0100)] 
net: mvpp2: Cannot test unsigned variable to be negative

In phy_info_parse all uses of the variable phyaddr are as an int so
declaring as u32 is not useful and prevents the test for an error return
from fdtdec_get_int ever detecting an error. Change phyaddr to be an
int.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: mvpp2: Return -ENOMEM for failed alloc
Andrew Goodbody [Tue, 5 Aug 2025 14:18:17 +0000 (15:18 +0100)] 
net: mvpp2: Return -ENOMEM for failed alloc

Instead of returning -1 on a failed alloc, return -ENOMEM.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: mvpp2: Fix impossible test
Andrew Goodbody [Tue, 5 Aug 2025 14:18:16 +0000 (15:18 +0100)] 
net: mvpp2: Fix impossible test

You cannot test an unsigned char to be >= 256. Instead make the
variables start and end to be ints.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: mv88e6xxx: Fix logical operator instead of bitwise
Andrew Goodbody [Tue, 5 Aug 2025 11:14:14 +0000 (12:14 +0100)] 
net: mv88e6xxx: Fix logical operator instead of bitwise

In mv88e6xxx_port_enable when attempting to mask out the previous
settings of two bits a logical operator was used instead of a bitwise
operator. Fix this.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: mediatek: Use correct variable for return
Andrew Goodbody [Tue, 5 Aug 2025 11:04:00 +0000 (12:04 +0100)] 
net: mediatek: Use correct variable for return

In mtk_eth_of_to_plat, the last error check has the value in
'priv->phy_addr' but returns ret. Correct to return 'priv->phy_addr'
instead.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: ldpaa_eth: Fix buffer overflow in memset
Andrew Goodbody [Tue, 5 Aug 2025 10:52:00 +0000 (11:52 +0100)] 
net: ldpaa_eth: Fix buffer overflow in memset

In ldpaa_eth_open a memset is used to initialise a struct to 0 but the
size passed is that of a different struct. Correct to pass the sizeof
the struct that is being initialised.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: add missing SPDX-License-Identifier for files originating from LiMon
Max Merchel [Thu, 14 Aug 2025 12:03:52 +0000 (14:03 +0200)] 
net: add missing SPDX-License-Identifier for files originating from LiMon

The header of LiMon imported files reference a License file which
does not exist in U-Boot. Some files were forgotten when adding the
SPDX-License-Identifier.
The LiMon files were originally licensed under GPLv2 as can be seen in
commit [2ea91039].

Based on this commit, add the correct SPDX license identifier.
While at it drop the reference to the non-existing License file from all
LiMon files and update the SPDX-License-Identifier to SPDX version 3.

Signed-off-by: Max Merchel <Max.Merchel@ew.tq-group.com>
8 months agonet: lwip: add Kconfig option to show ICMP unreachable errors
Jerome Forissier [Tue, 12 Aug 2025 12:43:19 +0000 (14:43 +0200)] 
net: lwip: add Kconfig option to show ICMP unreachable errors

Add Kconfig symbol LWIP_ICMP_SHOW_UNREACH which, when enabled, prints a
message to the console upon reception of ICMP unreachable messages. For
example:

 $ make qemu_arm64_lwip_defconfig
 $ qemu-system-aarch64 -M virt -cpu max -nographic -bios u-boot.bin
 [...]
 => dhcp
 DHCP client bound to address 10.0.2.15 (0 ms)
 => tftp 192.168.0.100:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.100; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (host unreachable) from 192.168.0.16
 Timeout!
 => tftp 192.168.0.16:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.16; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (port unreachable) from 192.168.0.16
 Timeout!
 =>

Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/73.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
8 months agolwip: icmp: allow reporting ICMP destination unreachable
Jerome Forissier [Tue, 12 Aug 2025 12:43:18 +0000 (14:43 +0200)] 
lwip: icmp: allow reporting ICMP destination unreachable

Allow reporting ICMP destination unreachable messages via a user-defined
callback.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
8 months agonet: phy: broadcom: add support for BCM54612E
Jim Liu [Thu, 7 Aug 2025 05:29:31 +0000 (13:29 +0800)] 
net: phy: broadcom: add support for BCM54612E

It's Broadcom PHY simply described as single-port
RGMII 10/100/1000BASE-T PHY.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agonet: designware: Fix get_timer value overflow
Jim Liu [Thu, 7 Aug 2025 05:28:32 +0000 (13:28 +0800)] 
net: designware: Fix get_timer value overflow

get_timer returns a ulong value representing system time in ms.
On a 64-bit system, this ulong value is 64 bits long. However,
the driver stores it in a 32-bit unsigned integer, which overflows
after 49 days up time, causing the driver to get an incorrect time.

Replace the unsigned int variable with a ulong type to properly store
the value returned by get_timer.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
8 months agophy: marvell: Cannot test unsigned field to be negative
Andrew Goodbody [Wed, 6 Aug 2025 16:43:25 +0000 (17:43 +0100)] 
phy: marvell: Cannot test unsigned field to be negative

In comphy_cp110_init_serdes_map in comphy_cp110.c there are two fields
in cfg, comphy_lanes_count and comphy_mux_bitcount, which are fetched
from the FDT blob with fdtdec_get_int which returns an int. These two
fields are then tested for being negative. However the fields are
declared as unsigned so those tests must always fail. Change the
declaration of those fields to be int instead of u32 and the code will
work as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
8 months agophy: marvell: Fix off by 1 limit checks
Andrew Goodbody [Wed, 6 Aug 2025 16:43:24 +0000 (17:43 +0100)] 
phy: marvell: Fix off by 1 limit checks

The limit checks in get_speed_string and get_type_string are off by 1 as
they do not account for the maximum index into an array that can be used
is 1 less than the number of elements in that array. Adjust the limit
checks to allow for this.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
8 months agonet: phy: vitesse: Fix incorrect test for timeout
Andrew Goodbody [Wed, 6 Aug 2025 09:37:26 +0000 (10:37 +0100)] 
net: phy: vitesse: Fix incorrect test for timeout

In vsc8514_config there is a while loop for detecting a config failure
using a timeout counter with a post-decrement. In the case of a timeout
this will result in the loop exiting with timeout == -1 so use that as
the test below the loop to detect that the timeout occurred.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
8 months agonet: octeontx: Free allocated memory on error
Andrew Goodbody [Tue, 5 Aug 2025 15:45:49 +0000 (16:45 +0100)] 
net: octeontx: Free allocated memory on error

In octeontx_smi_probe if an error is detected then memory that was
allocated is not freed. Small refactor of the code to use a common
return and free memory. Also return -ENOMEM for an allocation failure.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: octeontx: Remove unneeded test
Andrew Goodbody [Tue, 5 Aug 2025 15:45:48 +0000 (16:45 +0100)] 
net: octeontx: Remove unneeded test

In nicvf_cq_handler there is a test for !cqe_count which will return if
true so it is guaranteed that cqe_count will true after that point. This
makes the later test for cqe_count redundant so it can be removed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agonet: octeontx: Remove unneeded code
Andrew Goodbody [Tue, 5 Aug 2025 15:45:47 +0000 (16:45 +0100)] 
net: octeontx: Remove unneeded code

In nicvf_rcv_pkt_handler there is no need to initialise err as it is
assigned to immediately after. Also the test for !pkt will return if
true meaning that pkt is guaranteed to be true after that code block and
so no need to test for it and the redundant test can be removed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
8 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 17 Aug 2025 23:48:14 +0000 (17:48 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

Fixes for newer revision of Retronix R-Car V4H Sparrow Hawk and fixes
for boards which enable POSITION_INDEPENDENT and also set non-zero
CONFIG_TEXT_BASE.

8 months agoconfigs: Remove redundant CONFIG_TEXT_BASE assignments for Renesas defconfigs
Lad Prabhakar [Wed, 23 Jul 2025 08:10:15 +0000 (09:10 +0100)] 
configs: Remove redundant CONFIG_TEXT_BASE assignments for Renesas defconfigs

The Renesas board defconfigs explicitly set CONFIG_TEXT_BASE=0x50000000,
however U-Boot's POSITION_INDEPENDENT=y build default already places text
at 0x0. These hardcoded overrides are therefore unnecessary and will be
pruned automatically in upcoming resyncs.

Remove the CONFIG_TEXT_BASE lines from the following defconfigs:
  - hihope_rzg2_defconfig
  - r8a77970_eagle_defconfig
  - r8a77970_v3msk_defconfig
  - r8a77990_ebisu_defconfig
  - r8a77995_draak_defconfig
  - r8a779a0_falcon_defconfig
  - renesas_rzg2l_smarc_defconfig
  - rz2_beacon_defconfig
  - silinux_ek874_defconfig

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
8 months agoarm64: dts: renesas: r8a779g3: Describe generic SPI NOR support on Retronix R-Car...
Marek Vasut [Wed, 13 Aug 2025 21:25:56 +0000 (23:25 +0200)] 
arm64: dts: renesas: r8a779g3: Describe generic SPI NOR support on Retronix R-Car V4H Sparrow Hawk board

Retronix R-Car V4H Sparrow Hawk EVTA1 is populated with Spansion S25FS512S,
EVTB1 is populated with Winbond W77Q51NW. Describe the SPI NOR using generic
"jedec,spi-nor" compatible, because both flashes can be auto-detected based
on their built-in IDs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
8 months agoarm64: dts: renesas: r8a779g3: Set VDDQ18_25_AVB voltage on Retronix R-Car V4H Sparro...
Marek Vasut [Wed, 13 Aug 2025 21:26:59 +0000 (23:26 +0200)] 
arm64: dts: renesas: r8a779g3: Set VDDQ18_25_AVB voltage on Retronix R-Car V4H Sparrow Hawk EVTB1

The Retronix R-Car V4H Sparrow Hawk EVTB1 uses 1V8 IO voltage supply
for VDDQ18_25_AVB power rail. Update the AVB0 pinmux to reflect the
change in IO voltage. Since the VDDQ18_25_AVB power rail is shared,
all four AVB0, AVB1, AVB2, TSN0 PFC/GPIO POC[7..4] registers have to
be configured the same way.

Correct the voltage for EVTA1 boards accordingly by patching the U-Boot
control DT in SPL.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>