]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 weeks agoMerge patch series "bootstd: rauc: Small fixes"
Tom Rini [Tue, 22 Jul 2025 19:53:23 +0000 (13:53 -0600)] 
Merge patch series "bootstd: rauc: Small fixes"

Martin Schwan <m.schwan@phytec.de> says:

Fix some small bugs that I noticed during testing.

Link: https://lore.kernel.org/r/20250714-wip-bootmeth-rauc-fixes-v1-0-69d2b80e7606@phytec.de
2 weeks agobootstd: rauc: Only scan all partitions instead of boot files
Martin Schwan [Mon, 14 Jul 2025 13:30:10 +0000 (15:30 +0200)] 
bootstd: rauc: Only scan all partitions instead of boot files

Only scan for the existence of all required partitions of a RAUC system,
instead of searching for boot script files in all of them.

Previously, it might have occurred, that a slot did not contain required
files and RAUC already marked the corresponding slot as bad (not
suitable for booting). In that case, scanning for a non-existence boot
script would result in an error (and thus not booting anything), which
was different behavior compared to the legacy RAUC boot.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
2 weeks agobootstd: rauc: Fix segfault occurring during private struct access
Martin Schwan [Mon, 14 Jul 2025 13:30:09 +0000 (15:30 +0200)] 
bootstd: rauc: Fix segfault occurring during private struct access

Fix a potential segmentation fault, by not accessing the member of a
null pointer to a private slot's name field.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
2 weeks agobootstd: rauc: Fix potential memory leak
Martin Schwan [Mon, 14 Jul 2025 13:30:08 +0000 (15:30 +0200)] 
bootstd: rauc: Fix potential memory leak

Fix a potential memory leak, by checking the return value of realloc
first, before assigning it to the private list of slots.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
2 weeks agokm: pg-wcom-ls1021xa: update MAINTAINERS
Holger Brunck [Mon, 14 Jul 2025 13:22:21 +0000 (15:22 +0200)] 
km: pg-wcom-ls1021xa: update MAINTAINERS

The mainainers for these boards have changed.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
2 weeks agokm: pg-wcom-ls102xa: call qrio deblock cfg earlier
Tomas Alvarez Vanoli [Mon, 14 Jul 2025 13:22:20 +0000 (15:22 +0200)] 
km: pg-wcom-ls102xa: call qrio deblock cfg earlier

Move the call to configure the qrio i2c deblock pins earlier.
Before this, the call was happening after the first attempt to deblock
the SDP EEPROM, which resulted in a not correct sequence.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 weeks agokm: pg-wcom-ls102xa: add netdev in board env file
Holger Brunck [Mon, 14 Jul 2025 13:22:19 +0000 (15:22 +0200)] 
km: pg-wcom-ls102xa: add netdev in board env file

Upcoming boards will have different ethernet interfaces. So we move this
variable out of the common code.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 weeks agoarm: ls1021a-pg-wcom: add i2c mux node and eeprom
Holger Brunck [Mon, 14 Jul 2025 13:22:18 +0000 (15:22 +0200)] 
arm: ls1021a-pg-wcom: add i2c mux node and eeprom

We are now using the DM code for the i2c mux and to read out the
inventory eeprom. Therefore we need to add the nodes to the specific DTS
files.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 weeks agokm: drop KM_RESERVED_PRAM
Holger Brunck [Mon, 14 Jul 2025 15:22:02 +0000 (17:22 +0200)] 
km: drop KM_RESERVED_PRAM

This variable is unused since we dropped the support for the Kirkwood
boards.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 weeks agokm: qrio: fix set_gpio read/modify/write
Tomas Alvarez Vanoli [Mon, 14 Jul 2025 13:22:16 +0000 (15:22 +0200)] 
km: qrio: fix set_gpio read/modify/write

Setting GPIO by reading the value of the GPRT register, toggling the
correct bit and then writing it causes input values to transfer to the
output. Here's how (example):

1) set gpio 17 and 18 as input.
2) set gpio 17 output value to 0 (read gprt, change 17 to 0, write).
3) set gpio 18 output value to 0 (read gprt, change 18 to 0, write).

The problem here is that because we set 17 as input, and it's a pull-up,
when we read gprt in step 3, the bit 17 will be 1 and not 0.
Instead of doing read/write/modify, the solution is to keep track
internally of the user set GPIOs, and replace the read step with this
static variable.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 weeks agofastboot: Fix off by 1 error
Andrew Goodbody [Thu, 17 Jul 2025 08:43:29 +0000 (09:43 +0100)] 
fastboot: Fix off by 1 error

strlen only reports length of string not including terminating 0 byte
but this has to be included in length of receiving buffer on copy so
adjust length check to be correct.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2 weeks agodrivers: fastboot: Add support for SPI flash memory
Ariel D'Alessandro [Thu, 17 Jul 2025 13:58:54 +0000 (10:58 -0300)] 
drivers: fastboot: Add support for SPI flash memory

Fastboot currently supports MMC and NAND flash devices. Similarly,
extend the support to SPI flash memories.

Note that in this initial implementation, partitions on the device are
not supported yet, but raw partitions can be set in U-Boot environment.

To define a raw partition descriptor, add an environment variable
similar to the MMC case:

```
fastboot_raw_partition_<raw partition name>=<offset> <size>
```

for example:

```
fastboot_raw_partition_boot=0x0 0x1000000
```

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2 weeks agoinclude: env: ti_common: remove bootm_size
Bryan Brattlof [Tue, 15 Jul 2025 18:47:05 +0000 (13:47 -0500)] 
include: env: ti_common: remove bootm_size

As the size of 64b ARM kernels, DTs, vendor firmware, and initial ram
disks continues to grow, the 256MB size limit set aside for image
processing by the bootm command has become too small for some K3
reference boards.

For ARMv7 removing this limit could introduce issues so move the
bootm_size variable to ti_armv7_keystone2.env and remove the limit for
any board using a TI K3 SoC.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2 weeks agobinman: Fix typing for python >= 3.7
Yannic Moog [Tue, 15 Jul 2025 06:21:24 +0000 (08:21 +0200)] 
binman: Fix typing for python >= 3.7

To get the [] annotation working with python 3.7 and 3.8, import
annotations.

Reported-by: Tim Harvey <tharvey@gateworks.com>
Fixes: 21bc3433a43d ("binman: rework dropping absent entries from packaged image")
Reviewed-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Tested-by: Tim Harvey <tharvey@gateworks.com>
2 weeks agolmb: Remove unreachable code
Andrew Goodbody [Mon, 14 Jul 2025 16:40:47 +0000 (17:40 +0100)] 
lmb: Remove unreachable code

Code after a break is unreachable so remove it.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2 weeks agoarm: fix lmb region reservation when PRAM is defined
Holger Brunck [Mon, 14 Jul 2025 11:16:51 +0000 (13:16 +0200)] 
arm: fix lmb region reservation when PRAM is defined

PRAM usage is not taken into account when reserving lmb for ARM
architecture, this means that predefined PRAM region is marked as
reserved by the architecture and cannot be used by other users.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 weeks agoboard: toradex: Fix variant (wifi/non-wifi) selection
Francesco Dolcini [Mon, 14 Jul 2025 08:44:16 +0000 (10:44 +0200)] 
board: toradex: Fix variant (wifi/non-wifi) selection

Do not dereference NULL, when "variant" env variable is not present.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 weeks agoconfigs: KASLR OPTEE RNG support for K3 devices
Gokul Praveen [Thu, 10 Jul 2025 09:59:22 +0000 (15:29 +0530)] 
configs: KASLR OPTEE RNG support for K3 devices

KASLR, or Kernel Address Space Layout Randomization, is a security
feature in the Linux kernel that randomizes the memory location
where the kernel is loaded during boot.

OP-TEE RNG is a Random Number Generator (RNG) component within the
Open Portable Trusted Execution Environment (OP-TEE) which provides
a random number to U-BOOT and U-BOOT provides this random number
as seed value to the LINUX kernel for KASLR.

Add KASLR OPTEE RNG support across K3 devices by enabling the required
configs.

Signed-off-by: Gokul Praveen <g-praveen@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2 weeks agoMAINTAINERS: Update email of Anatolij Gustschin
Anatolij Gustschin [Sun, 20 Jul 2025 20:35:58 +0000 (22:35 +0200)] 
MAINTAINERS: Update email of Anatolij Gustschin

Use new email for community work. Also remove my
capricorn SoM maintainer entry since I do not
have access to this hardware anymore.

Signed-off-by: Anatolij Gustschin <ag.dev.uboot@gmail.com>
2 weeks agoMerge tag 'doc-202510-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 19 Jul 2025 14:38:31 +0000 (08:38 -0600)] 
Merge tag 'doc-202510-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-202510-rc1

Documentation:

* describe Dragonwing IQ8 board building/flashing
* move PXE README into HTML documentation
* PXE: mention extlinux.conf and sysboot
* correct references in x86-fit-boot.rst

2 weeks agoMerge tag 'i2c-for-2025.10-take2' of https://source.denx.de/u-boot/custodians/u-boot-i2c
Tom Rini [Sat, 19 Jul 2025 14:38:11 +0000 (08:38 -0600)] 
Merge tag 'i2c-for-2025.10-take2' of https://source.denx.de/u-boot/custodians/u-boot-i2c

i2c updates for v2025.10

- i2c Kconfig updates from Tom
  - add some driver dependencies
  - added missing include delay.h in iproc_i2c.c

- i2c: muxes: Add PCA9541 i2c arbitrator driver
  from Padmarao Begari

- pca954x: add pca9545 support
  from Frank Wunderlich

- cmd: i2c: fix build when CFG_SYS_I2C_NOPROBES defined with DM_I2C
  From Holger Brunck

2 weeks agodoc: PXE: mention extlinux.conf and sysboot
Fiona Klute [Mon, 30 Jun 2025 10:53:23 +0000 (12:53 +0200)] 
doc: PXE: mention extlinux.conf and sysboot

These use the same format as PXE boot.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
2 weeks agodoc: PXE usage: move environment variables to a separate section
Fiona Klute [Mon, 30 Jun 2025 10:53:22 +0000 (12:53 +0200)] 
doc: PXE usage: move environment variables to a separate section

This works better with RST formatting, and avoids duplication.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
2 weeks agodoc: move PXE README into usage documentation
Fiona Klute [Mon, 30 Jun 2025 10:53:21 +0000 (12:53 +0200)] 
doc: move PXE README into usage documentation

This is only a reformatting, with a few grammar fixes (capitalization,
and a missing "is" and "be" added each).

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
2 weeks agodoc: correct references in x86-fit-boot.rst
Heinrich Schuchardt [Fri, 27 Jun 2025 19:02:31 +0000 (21:02 +0200)] 
doc: correct references in x86-fit-boot.rst

Correct the references for

* the x86 boot protocol description
* the FIT file format

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agodoc: board: qualcomm: document Dragonwing IQ8 board building/flashing
Balaji Selvanathan [Sat, 31 May 2025 03:20:03 +0000 (08:50 +0530)] 
doc: board: qualcomm: document Dragonwing IQ8 board building/flashing

Introducing documentation support for Qualcomm Dragonwing IQ8 QCS8300
board. Documents the build and flashing steps.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
2 weeks agokbuild: Don't mandate gcc as the host compiler
Mark Kettenis [Sat, 12 Jul 2025 10:45:58 +0000 (12:45 +0200)] 
kbuild: Don't mandate gcc as the host compiler

Systems that use clang may not have gcc installed.  Set
HOSTCC to cc and HOSTCXX to c++ like we did before to make those
systems work again.

Fixes: 5f520875bdf0 ("kbuild: Bump the build system to 5.1")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2 weeks agopython: requirements.txt: Update a few modules for security issues
Tom Rini [Fri, 11 Jul 2025 18:43:36 +0000 (12:43 -0600)] 
python: requirements.txt: Update a few modules for security issues

The GitHub dependabot tool has reported a number of issues recently with
some modules that we use. While unlikely to be exploitable in the way we
use them, update various libraries to the latest.

Reported-by: GitHub dependabot
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agomisc: Remove DS4510 driver
Tom Rini [Fri, 11 Jul 2025 15:20:28 +0000 (09:20 -0600)] 
misc: Remove DS4510 driver

As no platforms use this driver anymore and it's not been converted from
to DM_I2C for use, remove it.

Fixes: ed7fe2bee12a ("ppc: Remove xpedite boards")
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agodrivers: misc: Remove pca9551_led driver
Tom Rini [Fri, 11 Jul 2025 15:20:22 +0000 (09:20 -0600)] 
drivers: misc: Remove pca9551_led driver

This driver has not been converted to DM_I2C and the last platform that
used it was removed as well. Remove the driver.

Fixes: 4bbcec08ebec ("arm: Remove mx6dlarm2 board")
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agosandbox: Add dummy sync()
Tom Rini [Fri, 11 Jul 2025 15:20:16 +0000 (09:20 -0600)] 
sandbox: Add dummy sync()

In order to compile more drivers, add an empty sync() function.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoinput: Tighten dependency requirements for TEGRA_KEYBOARD
Tom Rini [Fri, 11 Jul 2025 15:20:12 +0000 (09:20 -0600)] 
input: Tighten dependency requirements for TEGRA_KEYBOARD

This driver requires headers which only exist on Tegra. Express that
requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agomisc: Tighten requirements on IHS_FPGA driver
Tom Rini [Fri, 11 Jul 2025 15:20:09 +0000 (09:20 -0600)] 
misc: Tighten requirements on IHS_FPGA driver

This driver requires that the gdsys legacy driver option also be enabled
in order to build. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoMerge tag 'u-boot-imx-master-20250717' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Thu, 17 Jul 2025 17:42:46 +0000 (11:42 -0600)] 
Merge tag 'u-boot-imx-master-20250717' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27088

- Add support for the i.MX95 B0 version.
- Enable standard boot for phycore-imx8mp.
- Kconfig fixes for i.MX MMC and FSL_SEC_MON.
- Support 4Gb single die variant of the i.MX8MM Venice board.

2 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 17 Jul 2025 17:39:50 +0000 (11:39 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/27087

- Board: mpfs_icicle: Fix board_fit_config_name_match and disable
  DEBUG_UART
- Board: Add SD card support to the Beagle-V-Fire
- Board: Add support for TH1520-integrated GMACs

2 weeks agoMerge tag 'mmc-2025-07-16' of https://source.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Thu, 17 Jul 2025 17:37:43 +0000 (11:37 -0600)] 
Merge tag 'mmc-2025-07-16' of https://source.denx.de/u-boot/custodians/u-boot-mmc

Drop unused kona_sdhci driver
Tighten config dependencies and a minor cleanup

2 weeks agommc: Remove unused kona_sdhci driver
Tom Rini [Fri, 11 Jul 2025 15:20:01 +0000 (09:20 -0600)] 
mmc: Remove unused kona_sdhci driver

As no platforms use this driver anymore, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agommc: Tighten some mmc driver dependencies
Tom Rini [Fri, 11 Jul 2025 15:16:07 +0000 (09:16 -0600)] 
mmc: Tighten some mmc driver dependencies

A large number of mmc 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>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agommc: Take cleanup path to free memory on error exit
Andrew Goodbody [Thu, 3 Jul 2025 14:03:30 +0000 (15:03 +0100)] 
mmc: Take cleanup path to free memory on error exit

Instead of returning -EINVAL directly which will not call the cleanup
path to free memory, fix the code to set the error and then goto the
cleanup code.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agovenice: display DRAM MR registers and decoding if debug enabled
Tim Harvey [Mon, 14 Jul 2025 17:23:04 +0000 (10:23 -0700)] 
venice: display DRAM MR registers and decoding if debug enabled

While this is interesting and useful for debugging there isn't extremely
useful information so we will only show it if debug is enabled.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 weeks agovenice: lpddr4_timing_imx8mm: update ddr phy config for mscale_v3.10
Tim Harvey [Mon, 14 Jul 2025 17:23:03 +0000 (10:23 -0700)] 
venice: lpddr4_timing_imx8mm: update ddr phy config for mscale_v3.10

Update the ddr phy config values to those created by the mscale_v3.10
tool. The original values were obtained using mscale_v3.10. The v3.10
tool removed ddr phy register values of 0x0.

This has no functional change but makes comparing and patching ddr
configuration easier in addition to slightly shrinking the DRAM config
size.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 weeks agovenice: lpddr4_timing_imx8mm: add 4gb single die support
Tim Harvey [Mon, 14 Jul 2025 17:23:02 +0000 (10:23 -0700)] 
venice: lpddr4_timing_imx8mm: add 4gb single die support

Add dram support for the MT53E1G32D2FW-046 RevC part which is a single die
32Gbit density part vs RevA/B which were dual-die parts:
 - use a previously unused EEPROM byte to denote a variant of the
   base config to be patched
 - add a dram description string
 - return the board struct from eeprom_init and pass it to the
   spl_dram_init function so that it has access to the EEPROM
 - move ddr_init into the spl_dram_init so that it can be patched
   in the per-soc init function

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 weeks agovenice: lpddr4_timing_imx8mm: add DDRC_ADDRMAP7 config
Tim Harvey [Mon, 14 Jul 2025 17:23:01 +0000 (10:23 -0700)] 
venice: lpddr4_timing_imx8mm: add DDRC_ADDRMAP7 config

Add the configuration register for DDRC_ADDRMAP7 which was added in the
RAP spreadsheet v19. This has no functional change but allows DRAM
configuration to be patched in a later commit.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 weeks agoarmv8: ls1043a: make some erratas dependent from USB
Holger Brunck [Mon, 14 Jul 2025 11:43:47 +0000 (13:43 +0200)] 
armv8: ls1043a: make some erratas dependent from USB

These erratas are only useful if USB is enabled. If it is disabled
these erratas might cause issues.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 weeks agosoc: imx8ulp: Add celsius unit for temperature
David Zang [Sat, 12 Jul 2025 00:12:54 +0000 (19:12 -0500)] 
soc: imx8ulp: Add celsius unit for temperature

Make temperature unit (celsius) more clear to reduce confusion.

Signed-off-by: David Zang <davidzangcs@gmail.com>
2 weeks agonxp: Move FSL_SEC_MON related options to arch/Kconfig.nxp
Tom Rini [Fri, 11 Jul 2025 15:20:25 +0000 (09:20 -0600)] 
nxp: Move FSL_SEC_MON related options to arch/Kconfig.nxp

The options related to FSL_SEC_MON are part of the chain of trust
related options and should be under that menu, so move it there.
Furthermore we don't need to prompt for the driver itself but do need to
allow for configuration of the monitor endianess.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoarm: imx: Remove unused mxcmmc driver
Tom Rini [Fri, 11 Jul 2025 15:20:05 +0000 (09:20 -0600)] 
arm: imx: Remove unused mxcmmc driver

As no platforms use this driver anymore, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agobrppt2: Use the correct MMC driver
Tom Rini [Fri, 11 Jul 2025 15:15:52 +0000 (09:15 -0600)] 
brppt2: Use the correct MMC driver

As part of splitting the i.MX parts of FSL_ESDHC out from the more
legacy parts, the FSL_ESDHC_IMX symbol was added. This platform is the
only one which was not converted correctly.

Fixes: e37ac717d796 ("Convert to use fsl_esdhc_imx for i.MX platforms")
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agophycore-imx8mp: Enable standard boot
Leonard Anderweit [Thu, 10 Jul 2025 08:17:17 +0000 (10:17 +0200)] 
phycore-imx8mp: Enable standard boot

Enable standard boot for the phycore-imx8mp and use it as default. Add
all variables required for standard boot to the environment.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Tested-by: Martin Schwan <m.schwan@phytec.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx95_evk: Add i.MX95 B0 support
Alice Guo [Mon, 7 Jul 2025 20:42:56 +0000 (04:42 +0800)] 
imx95_evk: Add i.MX95 B0 support

i.MX95 B0 uses image container format v2 and needs DUMMY_DDR so that
update imximage.cfg and container.cfg for it.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2 weeks agospl: imx: Add support for new PQC container
Ye Li [Mon, 7 Jul 2025 20:42:55 +0000 (04:42 +0800)] 
spl: imx: Add support for new PQC container

To support PQC container format which is used for post quantum
authentication on new i.MX parts like i.MX94

The major changes compared to legacy container format is in
signature block, new container tag and version, and new alignment
of container header.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 weeks agotools: imx8image: Add 2 new commands CMD_CNTR_VERSION and CMD_DUMMY_DDR
Alice Guo [Mon, 7 Jul 2025 20:42:54 +0000 (04:42 +0800)] 
tools: imx8image: Add 2 new commands CMD_CNTR_VERSION and CMD_DUMMY_DDR

i.MX95 B0 uses image container format v2, and `one container header
occupies 0x4000, so that CMD_CNTR_VERSION needs to be added.

The purpose of CMD_DUMMY_DDR is to create a dummy image entry in boot
container prior the DDR OEI image entry. ROM reads the address of DUMMY
DDR image entry and passes it to DDR OEI in OEI entry function as
parameter value, in order to indicate the offset of training data with
the boot container.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2 weeks agoarm: imx: Update ELE get_info structure for i.MX94
Ye Li [Mon, 7 Jul 2025 20:42:53 +0000 (04:42 +0800)] 
arm: imx: Update ELE get_info structure for i.MX94

Since i.MX94, the ELE get_info structure is updated to add
OEM PQC SRK hash, so update it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoconfigs: th1520_lpi4a: Enable network support
Yao Zi [Thu, 10 Jul 2025 03:42:01 +0000 (03:42 +0000)] 
configs: th1520_lpi4a: Enable network support

Enable the network stack, the designware ethernet driver and
corresponding glue driver. The Lichee Pi 4A board ships two RTL8211F
phys, both attached to GMAC 0, thus support for Realtek phys and DM
support for MDIO devices are enabled as well.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agoriscv: dts: th1520: Describe GMACs and enable them on Lichee Pi 4A
Yao Zi [Thu, 10 Jul 2025 03:42:00 +0000 (03:42 +0000)] 
riscv: dts: th1520: Describe GMACs and enable them on Lichee Pi 4A

TH1520 SoC ships two MAC controllers based on Designware Ethernet IP
that are capable of Gigabit operation. Describe them in SoC devicetree
and enable them for Lichee Pi 4A.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agodrivers: net: Add T-Head DWMAC glue layer
Yao Zi [Thu, 10 Jul 2025 03:41:59 +0000 (03:41 +0000)] 
drivers: net: Add T-Head DWMAC glue layer

The Designware IP integrated in TH1520 SoC requires extra clock
configuration to operate correctly. The Linux kernel's T-Head DWMAC glue
driver is ported and adapted to U-Boot's API.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agoriscv: cpu: th1520: Limit upper RAM boundary to 4 GiB
Yao Zi [Thu, 10 Jul 2025 03:41:58 +0000 (03:41 +0000)] 
riscv: cpu: th1520: Limit upper RAM boundary to 4 GiB

TH1520 SoC ships DMA peripherals that could only reach the first 32-bit
range of memory, for example, the GMAC controllers. Let's limit the
usable top of RAM below 4GiB to ensure DMA allocations are accessible to
all peripherals.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agoclk: thead: th1520-ap: Correctly handle flags for dividers
Yao Zi [Thu, 10 Jul 2025 03:41:57 +0000 (03:41 +0000)] 
clk: thead: th1520-ap: Correctly handle flags for dividers

Unlike the gate clocks which make no use of flags, most dividers in
TH1520 SoC are one-based, thus are applied with CLK_DIVIDER_ONE_BASED
flag. We couldn't simply ignore the flag, which causes wrong results
when calculating the clock rates.

Add a member to ccu_div_internal for defining the flags, and pass it to
divider_recalc_rate(). With this fix, frequency of all the clocks match
the Linux kernel's calculation.

Fixes: e6bfa6fc94f ("clk: thead: Port clock controller driver of TH1520 SoC")
Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agospi: coreqspi: add xfer function for PolarFire SoC
Eoin Dickson [Tue, 8 Jul 2025 13:01:21 +0000 (18:31 +0530)] 
spi: coreqspi: add xfer function for PolarFire SoC

Add xfer function to PolarFire SoC coreqspi driver. The read and write
operations are limited to one byte at a time instead of four as CMD18
(multiple block read) reads garbage when four byte ops are enabled.

Signed-off-by: Eoin Dickson <eoin.dickson@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agogpio: add PolarFire SoC GPIO and Core GPIO driver
Eoin Dickson [Tue, 8 Jul 2025 13:01:20 +0000 (18:31 +0530)] 
gpio: add PolarFire SoC GPIO and Core GPIO driver

This driver adds GPIO support for PolarFire SoC family, this is required
to add sd card support on the Beagle-V-Fire as it uses GPIO chip selects

Signed-off-by: Eoin Dickson <eoin.dickson@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agoconfigs: microchip_mpfs_icicle: disable DEBUG_UART
Conor Dooley [Mon, 7 Jul 2025 12:51:39 +0000 (13:51 +0100)] 
configs: microchip_mpfs_icicle: disable DEBUG_UART

By default DEBUG_UART uses the SBI DBCN extension on S-Mode RISC-V
platforms, but the Icicle Kit's firmware doesn't support it. Since
DEBUG_UART is getting turned on automagically and this is somewhat
misleading, disable it in the Icicle kit's defconfig.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 weeks agoboard: mpfs_icicle: fix board_fit_config_name_match()
Conor Dooley [Mon, 7 Jul 2025 12:13:33 +0000 (13:13 +0100)] 
board: mpfs_icicle: fix board_fit_config_name_match()

The loop in the icicle implementation of board_fit_config_name_match()
runs strtok() to split off the vendor portion of the compatible string
using , as the delimiter. strtok() modifies a string in place, so where
the first config and compatible do not match, the compatible has been
modified by the time the loop hits the second iteration.
Since stringlists in dt land are null separated strings, the nulls
strtok() inserts to replace the delimiter increase the number of strings
in the compatible list. When the second iteration of the loop calls
fdt_stringlist_get(), it gets the vendorless portion of the first
compatible string, rather than the second compatible string. Copy each
compatible before calling strtok() to avoid this problem.

The temporary string the compatible is copied to is statically
allocated, as attempts to dynamically allocate it at this stage of boot
were met with "alloc space exhausted" errors.

Fixes: 7c16ebba1ed ("board: mpfs_icicle: implement board_fdt_blob_setup()/board_fit_config_name_match()")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agoboard: vexpress_ca9x4: Enable D-cache and MMU
Mark Kettenis [Sat, 12 Jul 2025 18:52:27 +0000 (20:52 +0200)] 
board: vexpress_ca9x4: Enable D-cache and MMU

Enable the D-cache, which will also enable the MMU.  The latter
make sure we don't do unaligned access on Strongly-ordered memory,
which has UNPREDICTABLE behaviour according the architecture
definition.  This fixes using U-Boot with recent versions of
QEMU's vexpress-ca9 emulation.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
3 weeks agoboot: Ensure method_flags is initialised before use
Andrew Goodbody [Wed, 9 Jul 2025 11:49:09 +0000 (12:49 +0100)] 
boot: Ensure method_flags is initialised before use

The local variable method_flags is only assigned to in some of the
code paths leaving it possibly uninitialised at first use.
Initialise method_flags at declaration to ensure that it cannot be
used uninitialised. Also remove now redundant assignments.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agoarm: dts: am335x-evm: remove duplicate chosen node
Rasmus Villemoes [Wed, 9 Jul 2025 11:07:51 +0000 (13:07 +0200)] 
arm: dts: am335x-evm: remove duplicate chosen node

The stdout-path property is already set to this value in the other
chosen node ~15 lines above.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
3 weeks agoMerge tag 'u-boot-dfu-20250716' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Wed, 16 Jul 2025 14:41:40 +0000 (08:41 -0600)] 
Merge tag 'u-boot-dfu-20250716' of https://source.denx.de/u-boot/custodians/u-boot-dfu

u-boot-dfu-20250716

Android:
- Fix printing lbaint_t format in AVB and android_ab messages

DFU:
- Fix dfu_config_interfaces() for single interface DFU syntax

3 weeks agodfu: Fix dfu_config_interfaces() for single interface DFU syntax
Sam Protsenko [Wed, 9 Jul 2025 04:23:42 +0000 (23:23 -0500)] 
dfu: Fix dfu_config_interfaces() for single interface DFU syntax

As stated in DFU documentation [1], the device interface part might be
missing in dfu_alt_info:

    dfu_alt_info
        The DFU setting for the USB download gadget with a semicolon
        separated string of information on each alternate:
            dfu_alt_info="<alt1>;<alt2>;....;<altN>"
        When several devices are used, the format is:
            - <interface> <dev>'='alternate list (';' separated)

So in first case dfu_alt_info might look like something like this:

    dfu_alt_info="mmc 0=rawemmc raw 0 0x747c000 mmcpart 1;"

And in second case (when the interface is missing):

    dfu_alt_info="rawemmc raw 0 0x747c000 mmcpart 1;"

When the interface is not specified the 'dfu' command crashes when
called using 'dfu 0' or 'dfu list' syntax:

    => dfu list
    "Synchronous Abort" handler, esr 0x96000006, far 0x0

That's happening due to incorrect string handling in
dfu_config_interfaces(). In case when the interface is not specified in
dfu_alt_info it triggers this corner case:

    d = strsep(&s, "=");  // now d contains s, and s is NULL
    if (!d)
        break;
    a = strsep(&s, "&");  // s is already NULL, so a is NULL too
    if (!a)               // corner case
        a = s;            // a is NULL now

which causes NULL pointer dereference later in this call, due to 'a'
being NULL:

    part = skip_spaces(part);

That's because as per strsep() behavior, when delimiter ("&") is not
found, the token (a) becomes the entire string (s), and string (s)
becomes NULL. To fix that issue assign "a = d" instead of "a = s",
because at that point variable d actually contains previous s, which
should be used in this case.

[1] doc/usage/dfu.rst

Fixes: commit febabe3ed4f4 ("dfu: allow to manage DFU on several devices")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20250709042342.13544-1-semen.protsenko@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
3 weeks agocommon/avb_verify.c: Make use of LBAF for printing lbaint_t
Tom Rini [Wed, 2 Jul 2025 01:06:03 +0000 (19:06 -0600)] 
common/avb_verify.c: Make use of LBAF for printing lbaint_t

When printing the contents of an lbaint_t variable we need to use LBAF
to print it in order to get the correct format type depending on 32 or
64bit-ness.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20250702010603.19354-2-trini@konsulko.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
3 weeks agoboot/android_ab.c: Make use of LBAF for printing lbaint_t
Tom Rini [Wed, 2 Jul 2025 01:06:02 +0000 (19:06 -0600)] 
boot/android_ab.c: Make use of LBAF for printing lbaint_t

When printing the contents of an lbaint_t variable we need to use LBAF
to print it in order to get the correct format type depending on 32 or
64bit-ness. Furthermore, printed message should not be split as that
makes finding them harder, so bring this back to a single line.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20250702010603.19354-1-trini@konsulko.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
3 weeks agocmd: i2c: fix build when CFG_SYS_I2C_NOPROBES defined with DM_I2C
Holger Brunck [Mon, 14 Jul 2025 11:56:08 +0000 (13:56 +0200)] 
cmd: i2c: fix build when CFG_SYS_I2C_NOPROBES defined with DM_I2C

When DM_I2C is enabled and CFG_SYS_I2C_NOPROBES is defined, the
building is broken due to already existing 'bus' local variable.
Rename udevice 'bus' to 'cur_bus' to fix this.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
3 weeks agoi2c: Kconfig: Tighten some i2c driver dependencies
Tom Rini [Fri, 4 Jul 2025 21:47:34 +0000 (15:47 -0600)] 
i2c: Kconfig: Tighten some i2c driver dependencies

A few i2c 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>
3 weeks agoi2c: Add missing <linux/delay.h> to iproc_i2c.c
Tom Rini [Wed, 2 Jul 2025 01:05:49 +0000 (19:05 -0600)] 
i2c: Add missing <linux/delay.h> to iproc_i2c.c

This driver makes delay function calls while relying on an indirection
inclusion of <linux/delay.h>. Add the missing include directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoMAINTAINERS: Update email of Stefan Roese
Stefan Roese [Thu, 10 Jul 2025 07:23:44 +0000 (09:23 +0200)] 
MAINTAINERS: Update email of Stefan Roese

Use the @mailbox.org mail address also for community work.

Signed-off-by: Stefan Roese <stefan.roese@mailbox.org>
3 weeks agoMerge patch series "drivers/net/airoha_eth: fixes"
Tom Rini [Tue, 15 Jul 2025 15:56:08 +0000 (09:56 -0600)] 
Merge patch series "drivers/net/airoha_eth: fixes"

Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> says:

Several fixes for the airoha ethernet driver.

Link: https://lore.kernel.org/r/20250709092810.4032971-1-mikhail.kshevetskiy@iopsys.eu
3 weeks agodrivers/net/airoha_eth: enable hw padding of short tx packets
Mikhail Kshevetskiy [Wed, 9 Jul 2025 09:28:10 +0000 (12:28 +0300)] 
drivers/net/airoha_eth: enable hw padding of short tx packets

Transmission of short packets does not work good for XFI (GDM2) and
HSGMII (GDM3) interfaces. The issue can be solved with:

 - padding of short packets to 60 bytes
 - setting of PAD_EN bit in the corresponding REG_GDM_FWD_CFG(n)
   register.

The issue should present for the lan switch (GDM1) as well, but it does
does not appear due to unknown reason.

This patch set PAD_EN bit for the used GDM.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
3 weeks agodrivers/net/airoha_eth: fix stalling in package receiving
Mikhail Kshevetskiy [Wed, 9 Jul 2025 09:28:09 +0000 (12:28 +0300)] 
drivers/net/airoha_eth: fix stalling in package receiving

ARCH_DMA_MINALIGN is 64 for ARMv7a/ARMv8a architectures, but RX/TX
descriptors are 32 bytes long. So they may not be aligned on an
ARCH_DMA_MINALIGN boundary. In case of RX path, this may cause the
following problem

1) Assume that a packet has arrived and the EVEN rx descriptor has been
   updated with the incoming data. The driver will invalidate and check
   the corresponding rx descriptor.

2) Now suppose the next descriptor (ODD) has not yet completed.

   Please note that all even descriptors starts on 64-byte boundary,
   and the odd ones are NOT aligned on 64-byte boundary.

   Inspecting even descriptor, we will read the entire CPU cache line
   (64 bytes). So we read and sore in CPU cache also the next (odd)
   descriptor.

3) Now suppose the next packet (for the odd rx descriptor) arrived
   while the first packet was being processed. So we have new data
   in memory but old data in cache.

4) After packet processing (in arht_eth_free_pkt() function) we will
   cleanup the descriptor and put it back to rx queue.

   This will call flush_dcache_range() function for the even descriptor,
   so the odd one will be flushed as well (it is in the same cache line).
   So the old data will be written to the next rx descriptor.

5) We get a freeze. The next descriptor is empty (so the driver is
   waiting for packets), but the hardware will continue to receive
   packets on other available descriptors. This will continue until
   the last available rx descriptor is full. Then the hardware will
   also freeze.

The problem will be solved if the previous descriptor will be put back
to the queue instead of the current one.

If the current descriptor is even (starts on a 64-byte boundary),
then putting the previous descriptor to the rx queue will affect
the previous cache line. To be 100% ok, we must make sure that the
previous and the one before the previous descriptor cannot be used
for receiving at this moment.

If the current descriptor is odd, then the previous descriptor is on
the same cache line. Both (current and previous) descriptors are not
currently in use, so issue will not arrise.

WARNING: The following restrictions on PKTBUFSRX must be held:
  * PKTBUFSRX is even,
  * PKTBUFSRX >= 4.

The bug appears on 32-bit airoha platform, but should be present on
64-bit as well.

The code was tested both on 32-bit and 64-bit airoha boards.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
3 weeks agodrivers/net/airoha_eth: fix packet transmission errors
Mikhail Kshevetskiy [Wed, 9 Jul 2025 09:28:08 +0000 (12:28 +0300)] 
drivers/net/airoha_eth: fix packet transmission errors

The dma_map_single() function calls one of the functions
  * invalidate_dcache_range(),
  * flush_dcache_range().
Both of them expect that 'vaddr' is aligned to the ARCH_DMA_MINALIGN
boundary. Unfortunately, RX/TX descriptors are 32-byte long. Thus they
might not be aligned to the ARCH_DMA_MINALIGN boundary. Data flushing
(or invalidating) might do nothing in this case.

The same applies to dma_unmap_single() function.

In the TX path case the issue might prevent package transmission (filled
TX descriptor was not flushed).

To fix an issue a special wrappers for
  * dma_map_single(),
  * dma_unmap_single()
functions were created. The patch fix flushing/invalidatiog for the
RX path as well.

The bug appears on 32-bit airoha platform, but should be present on
64-bit as well.

The code was tested both on 32-bit and 64-bit airoha boards.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
3 weeks agodrivers/net/airoha_eth: add missing terminator for compatible devices list
Mikhail Kshevetskiy [Wed, 9 Jul 2025 09:28:07 +0000 (12:28 +0300)] 
drivers/net/airoha_eth: add missing terminator for compatible devices list

Compatible device list must have a terminator. If terminator is missed
the u-boot driver subsystem will access random data placed after the
list in the memory.

The issue can be observed with the "dm compat" command.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
3 weeks agoMerge patch series "fs: exfat: Fix some Smatch issues"
Tom Rini [Tue, 15 Jul 2025 15:55:54 +0000 (09:55 -0600)] 
Merge patch series "fs: exfat: Fix some Smatch issues"

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

Smatch reported issues with variables being dereferenced before NULL
checks and also testing an unsigned variable for being negative.

Link: https://lore.kernel.org/r/20250707-exfat_fix-v1-0-e5783978cd11@linaro.org
3 weeks agofs: exfat: Remove pointless variable uoffset
Andrew Goodbody [Tue, 8 Jul 2025 11:16:42 +0000 (12:16 +0100)] 
fs: exfat: Remove pointless variable uoffset

In exfat_generic_pread and exfat_generic_pwrite offset is passed in as a
off_t type which is defined as 'unsigned long long' so there is no need
to create the variable uoffset as a uint64_t as this is just a direct
copy of offset. Also remove the impossible test of 'offset < 0' as this
is always false due to offset being unsigned.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agofs: exfat: Perform NULL check before dereference
Andrew Goodbody [Tue, 8 Jul 2025 11:16:41 +0000 (12:16 +0100)] 
fs: exfat: Perform NULL check before dereference

In the functions exfat_pread and exfat_pwrite there is a NULL check for
ctxt.cur_dev but this has already been derefenced twice before this
happens.
Refactor the code a bit to put the NULL check first.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agotools: mkimage: make size_inc a signed type
Rasmus Villemoes [Wed, 9 Jul 2025 08:34:49 +0000 (10:34 +0200)] 
tools: mkimage: make size_inc a signed type

In the Fixes commit, I initialized size_inc from the return value of
the new fit_estimate_hash_sig_size() helper. That helper may fail and
report that by returning a negative value, but I overlooked that
size_inc had type size_t, and hence the error check doesn't work.

Change size_inc to have type int so the error check works.  Inside the
loop, it is passed to another function as a size_t parameter, but
that's fine, because we know it is non-negative, and its value may be
incremented in steps of 1024 and is capped at ~64K, so it will
certainly never overflow an int.

Fixes: 7d4eacb0e68 ("mkimage: do a rough estimate for the size needed for hashes/signatures")
Addresses-Coverity-ID: 569495: Integer handling issues  (NEGATIVE_RETURNS)
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
3 weeks agofs: btrfs: Do not free multi when guaranteed to be NULL
Andrew Goodbody [Tue, 8 Jul 2025 11:34:49 +0000 (12:34 +0100)] 
fs: btrfs: Do not free multi when guaranteed to be NULL

multi is guaranteed to be NULL in the first two error exit paths so the
attempt to free it is not needed. Remove those calls.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agonet: mediatek: correct the AN8855 TPID value in port isolation settings
Weijie Gao [Tue, 8 Jul 2025 10:07:07 +0000 (18:07 +0800)] 
net: mediatek: correct the AN8855 TPID value in port isolation settings

The TPID value should be 0x9100 instead of 0x8100 according to the
datasheet.

Fixes: cedafee9ff3 (net: mediatek: add support for Airoha AN8855 ethernet switch)
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 weeks agoofnode: NULL check bootscr_flash_size before dereference
Andrew Goodbody [Mon, 7 Jul 2025 10:04:29 +0000 (11:04 +0100)] 
ofnode: NULL check bootscr_flash_size before dereference

Move the NULL check of bootscr_flash_size to before the first time it is
dereferenced to avoid any possible segment violations.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agoFix autoboot countdown printing wrong
David Zang [Mon, 7 Jul 2025 00:22:01 +0000 (19:22 -0500)] 
Fix autoboot countdown printing wrong

Originally when bootdelay >99, the countdown breaks. Setting bootdelay
at 101 or bigger will trigger this error.

Signed-off-by: David Zang <davidzangcs@gmail.com>
3 weeks agoconfigs: am62x: fix CONFIG_NR_DRAM_BANKS to 1
Anshul Dalal [Thu, 3 Jul 2025 13:02:26 +0000 (18:32 +0530)] 
configs: am62x: fix CONFIG_NR_DRAM_BANKS to 1

CONFIG_NR_DRAM_BANKS defines the number of DRAM banks on the
device. The default value of NR_DRAM_BANKS for ARCH_K3 is set to 2
(arch/arm/mach-k3/Kconfig:199) but should be 1 for am62x platforms.

This patch updates NR_DRAM_BANKS value for all am62x platforms to 1.

Fixes: 2969ed31b893 ("configs: Add am62x_beagleplay_*_defconfig")
Fixes: 2d257d9279e3 ("configs: Add configs for AM62x SK")
Fixes: 085cd6459dae ("board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM")
Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
Signed-off-by: Anshul Dalal <anshuld@ti.com>
3 weeks agopci: Assign a default value on reads on error
Andrew Goodbody [Mon, 7 Jul 2025 16:26:53 +0000 (17:26 +0100)] 
pci: Assign a default value on reads on error

Many callers of PCI read functions do not check the return value for
error before using the variable that should contain the value read were
there not to be an error. However in the error case this variable is
never assigned to and so will contain uninitialised data.
To provide some certainty as to behaviour in the error case assign a
default value of all bits set.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agoecdsa: fix segfault in mkimage when "-r" option is not set
Lucas Dietrich [Mon, 7 Jul 2025 15:55:50 +0000 (17:55 +0200)] 
ecdsa: fix segfault in mkimage when "-r" option is not set

Fix a segmentation fault in the ECDSA signing logic of `mkimage`
that occurs when the "-r" option is not specified.

This reproduces the logic in `lib/rsa/rsa-sign.c` by checking if
`info->require_keys` is non-null before passing it to
`fdt_setprop_string()`.

Signed-off-by: Lucas Dietrich <lucas.dietrich.git@proton.me>
3 weeks agoscsi: Make static functions consistent using lbaint_t
Andrew Goodbody [Mon, 7 Jul 2025 14:12:20 +0000 (15:12 +0100)] 
scsi: Make static functions consistent using lbaint_t

The static helper functions are inconsistent in their use of their third
parameter which is used to pass a block count. Keep consistency by
always using lbaint_t here. This will fix an issue where two left shifts
were overflowing the variable type in use.

This issue found by Smatch

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agotools: gen_ethaddr_crc: Make functions static
Ilias Apalodimas [Mon, 7 Jul 2025 11:37:25 +0000 (14:37 +0300)] 
tools: gen_ethaddr_crc: Make functions static

These functions are only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark them as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agotools: ublimage: Make ublimage_check_params() static
Ilias Apalodimas [Mon, 7 Jul 2025 11:28:01 +0000 (14:28 +0300)] 
tools: ublimage: Make ublimage_check_params() static

This functions is only used locally and triggers a warning when
compiling with -Wmissing-prototypes. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agotools: mkenvimage: Make xstrtol() static
Ilias Apalodimas [Mon, 7 Jul 2025 11:25:06 +0000 (14:25 +0300)] 
tools: mkenvimage: Make xstrtol() static

This function is only used locally. Enabling -Wmissing-prototypes triggers
a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agotools: bmp_logo: Mark local functions with static
Ilias Apalodimas [Mon, 7 Jul 2025 11:24:17 +0000 (14:24 +0300)] 
tools: bmp_logo: Mark local functions with static

These functions are only used locally. Enabling -Wmissing-prototypes triggers
a warning. Mark them as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agocros_ec: sandbox: Use correct value for number of slots
Andrew Goodbody [Thu, 3 Jul 2025 10:00:33 +0000 (11:00 +0100)] 
cros_ec: sandbox: Use correct value for number of slots

In the definition of struct ec_state the number of slots that are
created is VSTORE_SLOT_COUNT (==4) but the value of req->slot is
checked against EC_VSTORE_SLOT_MAX (==32) so this can lead to memory
access beyond that allocated.
Instead change the size check to use VSTORE_SLOT_COUNT to ensure it
matches what has actually been allocated.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
3 weeks agoREADME: remove obsolete note
Philip Molloy [Mon, 7 Jul 2025 13:06:50 +0000 (13:06 +0000)] 
README: remove obsolete note

Renaming SPL to XPL fixes the issue referenced in this note so the note
is no longer necessary

Fixes: 1d6132e2a2b ("global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD")
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
3 weeks agogpio: add SPL to Kconfig option description
Philip Molloy [Mon, 7 Jul 2025 13:06:38 +0000 (13:06 +0000)] 
gpio: add SPL to Kconfig option description

DM_GPIO_LOOKUP_LABEL and SPL_DM_GPIO_LOOKUP_LABEL had the same
description and therefore appeared to be duplicates in Kconfig frontends

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
3 weeks agopinctrl-uclass: update comment to reflect code
Philip Molloy [Mon, 7 Jul 2025 13:06:16 +0000 (13:06 +0000)] 
pinctrl-uclass: update comment to reflect code

The logic was updated without modifying the comment above it

Fixes: 72b8c6d1ebf ("pinctrl: don't fall back to pinctrl_select_state_simple()")
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
3 weeks agoMerge patch series "integer limit macro consolidation"
Tom Rini [Mon, 14 Jul 2025 18:43:33 +0000 (12:43 -0600)] 
Merge patch series "integer limit macro consolidation"

Rasmus Villemoes <ravi@prevas.dk> says:

I was bitten by our limit macros not being usable in #if conditionals
when building a standalone app. It turns out that the work to fix that
had already been started by the inclusion of the mbedtls library, so
it's something that people do hit.

Let's finish the job by providing suitable limit macros for all three families:

- Standard C types, char, short, ...
- Kernel-style fixed-width types s8, u64, ...
- POSIX/C99 fixed-width types int16_t, uint32_t, ...

Please note that a naive approach like spelling out the full decimal
value for the constants doesn't really work, as there is no such thing
as a "negative integer constant". That is, doing

#define LLONG_MIN -9223372036854775808LL

would lead to the compiler complaining

  warning: integer constant is so large that it is unsigned

and the type of that LLONG_MIN would actually be "unsigned long long", so e.g.

#if LLONG_MIN >= 0
#warning "LLONG_MIN is not negative?"
#endif

would fire.

Link: https://lore.kernel.org/r/20250707203655.613340-1-ravi@prevas.dk
3 weeks agolimits.h: provide all limit macros for standard [u]intNN_t types
Rasmus Villemoes [Mon, 7 Jul 2025 20:36:55 +0000 (22:36 +0200)] 
limits.h: provide all limit macros for standard [u]intNN_t types

Currently, we only have UINT32_MAX and UINT64_MAX in limits.h, and
then stdint.h and kernel.h somewhat randomly define UINT8_MAX and
INT32_MAX, respectively.

Provide a full set of definitions in terms of the min/max macros for
the types that [u]intNN_t are defined in terms of, namely the {s,u}NN
ones.

Try to avoid breaking whatever depended on getting UINT8_MAX from our
compat stdint.h by replacing it with an include of limits.h.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>