]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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
5 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>
5 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>
5 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
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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
5 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>
5 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>
5 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>
5 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>
5 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
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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.

5 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>
5 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>
5 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>
5 months agoarm64: dts: renesas: r8a779g3: Invert microSD voltage selector on Retronix R-Car...
Marek Vasut [Wed, 13 Aug 2025 21:26:27 +0000 (23:26 +0200)] 
arm64: dts: renesas: r8a779g3: Invert microSD voltage selector on Retronix R-Car V4H Sparrow Hawk EVTB1

Invert the polarity of microSD voltage selector on Retronix R-Car V4H
Sparrow Hawk board. The voltage selector was not populated on prototype
EVTA1 boards, and is implemented slightly different on EVTB1 boards. As
the EVTA1 boards are from a limited run and generally not available,
update the DT to make it compatible with EVTB1 microSD voltage selector.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoarm64: renesas: r8a779g3: Enable xHCI USB on Retronix R-Car V4H Sparrow Hawk board
Marek Vasut [Wed, 6 Aug 2025 00:58:30 +0000 (02:58 +0200)] 
arm64: renesas: r8a779g3: Enable xHCI USB on Retronix R-Car V4H Sparrow Hawk board

Enable support for PCIe based xHCI USB 3.0 driver and USB mass
storage support on Retronix R-Car V4H Sparrow Hawk board .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoarm64: renesas: r8a779g3: Disable dual-rank DRAM on Retronix R-Car V4H ES2 Sparrow...
Marek Vasut [Wed, 6 Aug 2025 00:57:14 +0000 (02:57 +0200)] 
arm64: renesas: r8a779g3: Disable dual-rank DRAM on Retronix R-Car V4H ES2 Sparrow Hawk

The R-Car V4H SoC before rev.3.0 can not support dual-rank LPDDR5 DRAM.
This affects 16 GiB dual-rank DRAM configuration of Retronix R-Car V4H
Sparrow Hawk board. Fall back to 8 GiB single-rank DRAM configuration
on such systems instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoarm64: renesas: r8a779g3: Disable MicroSD UHS modes on Retronix R-Car V4H Sparrow...
Marek Vasut [Wed, 6 Aug 2025 00:56:15 +0000 (02:56 +0200)] 
arm64: renesas: r8a779g3: Disable MicroSD UHS modes on Retronix R-Car V4H Sparrow Hawk EVTA1

The Retronix R-Car V4H Sparrow Hawk old revision EVTA1 does not have MicroSD
voltage switch populated on the board, therefore the board supports only 3V3
and non-UHS MicroSD cards. While the EVTB1 board is populated with Winbond
W77Q51NW SPI NOR, the EVTA1 board is populated with Spansion S25FS512S SPI
NOR, those those SPI NOR IDs to discern the two board revisions and apply
the MicroSD related DT changes.

The MicroSD related DT changes modify the regulator node, which is now a
regulator-fixed and supplies only 3V3, and remove sd-uhs-sdr50 and
sd-uhs-sdr104 properties from the MicroSD slot controller node.

The MicroSD related DT changes cannot be applied as DTO, because the base
DT contains nodes which have to be removed in case of EVTA1, but have to
be present in case of EVTB1 and newer revisions of the board. Because the
EVTA1 is an old revision of the board that is not generally available, it
is better to special case it and keep the base DT compatible with EVTB1
and newer revisions of the board which are actually available.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agopci: pcie-rcar-gen4: Fix PHY initialization
Marek Vasut [Wed, 6 Aug 2025 19:23:54 +0000 (21:23 +0200)] 
pci: pcie-rcar-gen4: Fix PHY initialization

R-Car V4H Reference Manual R19UH0186EJ0130 Rev.1.30 Apr. 21, 2025
page 4581 Figure 104.3b Initial Setting of PCIEC(example) middle
of the figure indicates that fourth write into register 0x148 [2:0]
is 0x3 or GENMASK(1, 0). The current code writes GENMASK(11, 0)
which is a typo. Fix the typo.

Fixes: be3dd0dc2fd9 ("pci: pcie-rcar-gen4: Add Renesas R-Car Gen4 DW PCIe controller driver")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agopinctrl: stmfx: Remove duplicated code
Andrew Goodbody [Thu, 7 Aug 2025 10:04:03 +0000 (11:04 +0100)] 
pinctrl: stmfx: Remove duplicated code

In stmfx_read_reg there is duplicated code to detect ret < 0 and return
ret if so. Remove one version of it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agopinctrl: single: Remove unreachable code
Andrew Goodbody [Thu, 7 Aug 2025 10:04:02 +0000 (11:04 +0100)] 
pinctrl: single: Remove unreachable code

In single_read there is a switch block with a default label. All cases
in the switch block, including the default, return directly. So any code
following the switch block is unreachable. Remove the unreachable code.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agoram: k3-ddrss: Use logical and not bitwise
Andrew Goodbody [Fri, 8 Aug 2025 10:47:43 +0000 (11:47 +0100)] 
ram: k3-ddrss: Use logical and not bitwise

The test for the interrupt LPDDR4_INTR_BIST_DONE is using a bitwise and
but the test is simple logic so use the more appropriate logical and.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agophy: ti: j721e-wiz: Set error code before goto
Andrew Goodbody [Wed, 6 Aug 2025 17:03:26 +0000 (18:03 +0100)] 
phy: ti: j721e-wiz: Set error code before goto

In j721e_wiz_probe the test for too many lanes jumps to the error exit
path without assigning an error code which could lead to calling code
silently ignoring the failure. Set the error code.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agophy: keystone-usb: Do not negate return code
Andrew Goodbody [Wed, 6 Aug 2025 15:47:46 +0000 (16:47 +0100)] 
phy: keystone-usb: Do not negate return code

In keystone_usb_init the return code from psc_enable_module should be
returned as is rather than being negated.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agotimer: Tighten some timer driver dependencies
Tom Rini [Wed, 6 Aug 2025 14:55:03 +0000 (08:55 -0600)] 
timer: Tighten some timer driver dependencies

A few timer drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agotimer: fttmr010_timer: Remove unused driver
Tom Rini [Wed, 6 Aug 2025 14:55:02 +0000 (08:55 -0600)] 
timer: fttmr010_timer: Remove unused driver

This driver is unused. Remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agonet: ti: icssg: Remove impossible test
Andrew Goodbody [Wed, 6 Aug 2025 10:56:58 +0000 (11:56 +0100)] 
net: ti: icssg: Remove impossible test

port_id is an unsigned variable so cannot be negative. Remove the test
checking for port_id being less than 0.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agonet: ti: am65-cpsw-nuss: Initialise ret
Andrew Goodbody [Wed, 6 Aug 2025 10:43:47 +0000 (11:43 +0100)] 
net: ti: am65-cpsw-nuss: Initialise ret

In am65_cpsw_phy_init it is not certain that ret will be assigned to
before it reaches the 'return ret' statement. Initialise ret to ensure
that ret is valid.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agonet: phy: cortina: Ensure memory allocated is freed
Andrew Goodbody [Tue, 5 Aug 2025 16:10:26 +0000 (17:10 +0100)] 
net: phy: cortina: Ensure memory allocated is freed

In cs4340_upload_firmware a buffer is allocated with malloc but this is
never freed. The pointer to this buffer, addr, is not even kept
unchanged. But in some cases addr is not a buffer allocated by malloc.
Introduce the use of another pointer to keep track of the buffer and to
know if it needs to be freed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agoram: Tighten some ram driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:54:23 +0000 (15:54 -0600)] 
ram: Tighten some ram driver dependencies

A few ram drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoserial: linflexuart: Remove unused driver
Tom Rini [Mon, 4 Aug 2025 21:57:14 +0000 (15:57 -0600)] 
serial: linflexuart: Remove unused driver

This driver is unused. Remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoserial: Tighten some serial driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:57:13 +0000 (15:57 -0600)] 
serial: Tighten some serial driver dependencies

A few serial drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agortc: pl031: Correct function type of pl031_write_reg
Tom Rini [Mon, 4 Aug 2025 21:57:12 +0000 (15:57 -0600)] 
rtc: pl031: Correct function type of pl031_write_reg

When calling writel we do not have a return value to check or pass
along. This function should therefore be void and not return what writel
gives us.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agortc: mc146818: Fix building on more architectures
Tom Rini [Mon, 4 Aug 2025 21:57:11 +0000 (15:57 -0600)] 
rtc: mc146818: Fix building on more architectures

This driver makes calls to in8/out8(). On PowerPC these are separate and
real calls but elsewhere they are able to simply be wrappers to
inb/outb. Rework this logic to be able to build this driver on more
platforms.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agortc: Tighten some rtc driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:57:10 +0000 (15:57 -0600)] 
rtc: Tighten some rtc driver dependencies

The Marvell RTC rtc driver cannot build without access to some
platform specific header files. Express that requirements in Kconfig as
well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agosysreset: Tighten some sysreset driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:57:19 +0000 (15:57 -0600)] 
sysreset: Tighten some sysreset driver dependencies

The MPC83xx sysreset driver cannot build without access to some
architecture specific header files. Express that requirements in Kconfig
as well.

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agosound: Tighten some sound driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:57:16 +0000 (15:57 -0600)] 
sound: Tighten some sound driver dependencies

A few sound drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agosoc: Tighten some soc driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:57:15 +0000 (15:57 -0600)] 
soc: Tighten some soc driver dependencies

The Qualcomm Snapdragon "SoC" driver cannot build without access to some
ARM64 specific functionality. Express that requirements in Kconfig as
well.

Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoremoteproc: Tighten some remoteproc driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:54:24 +0000 (15:54 -0600)] 
remoteproc: Tighten some remoteproc driver dependencies

The TI IPU remoteproc driver cannot build without access to some
platform specific header files. Express that requirements in Kconfig as
well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoreset: Tighten some reset driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:54:25 +0000 (15:54 -0600)] 
reset: Tighten some reset driver dependencies

A few reset drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agopwm: pwm-aspeed: Add missing <linux/log2.h> to pwm-aspeed.c
Tom Rini [Mon, 4 Aug 2025 21:53:54 +0000 (15:53 -0600)] 
pwm: pwm-aspeed: Add missing <linux/log2.h> to pwm-aspeed.c

This driver references the logarithmic macros while relying on an
indirection inclusion of <linux/log2.h>. Add the missing include
directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agopwm: Tighten some pwm driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:53:53 +0000 (15:53 -0600)] 
pwm: Tighten some pwm driver dependencies

A few pwm drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agopinctrl: Tighten some pinctrl driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:52:53 +0000 (15:52 -0600)] 
pinctrl: Tighten some pinctrl driver dependencies

A few pinctrl drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agosm: Rework the Kconfig logic here
Tom Rini [Mon, 4 Aug 2025 21:51:11 +0000 (15:51 -0600)] 
sm: Rework the Kconfig logic here

The symbol "SM" is a library symbol and should not be prompted for. It
should be selected by the drivers that use it. In this case we need to
add a SANDBOX_SM symbol for the sandbox driver. The meson SM driver
cannot build on other platforms, so add the appropriate dependency.

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agosandbox: Add an additional dummy sync macro
Tom Rini [Mon, 4 Aug 2025 21:50:08 +0000 (15:50 -0600)] 
sandbox: Add an additional dummy sync macro

There are some drivers which call a "dmb" for a type of sync. Add that
as well to sandbox.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agonet: e1000: Free temporary buffer on exit
Andrew Goodbody [Mon, 4 Aug 2025 15:32:51 +0000 (16:32 +0100)] 
net: e1000: Free temporary buffer on exit

In do_e1000_spi_checksum a temporary buffer is allocated but never
freed. Add code to free on exit. Also refactor the code to make the exit
code common.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agobootstd: rauc: Change global method to check any partition
Martin Schwan [Tue, 12 Aug 2025 12:38:34 +0000 (14:38 +0200)] 
bootstd: rauc: Change global method to check any partition

The bootmeth rauc should scan all partitions, in particular whole
devices, and not be a global method. There may exist multiple RAUC
systems on different devices and they should all be detected. This also
fixes a bug, where both a global bootflow and one using an actual,
complete device would be detected at the same time, when scanning for
valid bootflows.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>