2857 Commits

Author SHA1 Message Date
Georgi Vlaev
4e4bbb49f9 cmd: ti: Add DDRSS Inline ECC Error Injection command
Introduce a new version of the Keystone-II "ddr" command for testing the
inline ECC support in the DDRSS bridge available on K3 devices. The ECC
hardware support in K3's DDRSS and the test method differ substantially
from what we support in the K2 variant of the command. This K3 DDRSS
command currently supports only single controller testing.

The ECC error injection procedure follows these steps:
1) Flush and disable the data cache.
2) Disable the protected ECC Rx range.
3) Flip a bit in the address.
4) Restore the range to original.
5) Read the modified value (corrected).
6) Re-enable the data cache.

This will cause the 1-bit ECC error count to increase while the read
will return the corrected value.

The K3 version of the command extends the syntax for the "ecc_err"
argument by also introducing an argument for range which specifies which
range (0, 1, 2) the address is located in.

Multi-bit ECC errors are uncorrectable and will lead to a synchronous
abort.

Signed-off-by: Georgi Vlaev <g-vlaev@ti.com>
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
[n-francis@ti.com: Add J7 and multiple-region support, simplify logic]
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
2025-10-15 15:08:27 -06:00
Viorel Suman
865f665422 cmd: sf: align erase and write on erase block boundary
Align erase and write on erase block boundary in line with how read was
aligned in commit 622b5d35613 ("cmd: sf: Handle unaligned 'update' start
offset").

Fixes: 622b5d35613 ("cmd: sf: Handle unaligned 'update' start offset")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # R-Car V4H
2025-10-14 08:19:43 -06:00
Sam Protsenko
3b278dd9e6 bootstd: Fix bootflow info for efi_mgr
A "Synchronous Abort" CPU exception happens on an attempt to run the
"bootflow info" command for a global boot method (e.g. efi_mgr):

    => bootflow select 0
    => bootflow info

    "Synchronous Abort" handler, esr 0x96000006, far 0x8

It happens because do_bootflow_info() tries to dereference bflow->dev,
which is NULL in case of efi_mgr. Add the corresponding check to prevent
this NULL pointer dereference and make "bootflow info" command work
properly for global boot methods.

Fixes: 2d653f686b6d ("bootstd: Add a bootflow command")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-10-13 14:54:33 -06:00
Tom Rini
16bbc225fe iotrace: Finish migrating this to Kconfig
When I migrated this to Kconfig in commit 68e54040ccc3 ("sandbox: Move
CONFIG_IO_TRACE to Kconfig") I didn't look hard enough for other
details. As explained in the README, this is valid for ARM too. So start
by making this be a prompted question and CMD_IOTRACE depend on IO_TRACE
being enabled.  Next, migrate the information out of README and in to
the appropriate help text for existing options in Kconfig. Finally, make
this option be default y on SANDBOX but not selected as it's valid to
build without it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-10 14:25:24 -06:00
Tom Rini
361731fc39 Merge branch 'uboot-05102025' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
This series adds significant and valuable work by Mikhail Kshevetskiy to
align spi-mem with Linux 6.16. It also includes contributions to the mtd
performance patches, a work started by Miquel Raynal and improved by
Mikhail Kshevetskiy. Additionally, two patches tighten dependencies on
the Atmel driver.

The patches pass the pipeline CI:
https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/27873
2025-10-10 08:24:45 -06:00
Tom Rini
ecdc3872a7 Merge patch series "firmware: scmi: various update"
Peng Fan (OSS) <peng.fan@oss.nxp.com> says:

Misc update on firmware scmi:
 - Typo fix
 - Use io helpers
 - Use PAGE_SIZE for arm64
 - Add IN_USE error code
 - Add more error info
 - Support scmi max rx timeout in mailbox
 - Add myself as scmi maintainer, AKASHI contributed most code, but
   seems he is not invovled in the developement anymore, I volunteer to
   help here.

Some items on list that I am thinking to add:
- align with linux kernel to use cpu_to_le32 and le32_to_cpu, but have not find
  a good way to use the helpers.
- Add SCMI version negotiation as Linux Kernel

Link: https://lore.kernel.org/r/20250927-scmi-v1-0-5e9354fb3bff@nxp.com
2025-10-09 14:30:02 -06:00
Peng Fan
5ea37da298 cmd: scmi: Add pin control protocol name
Pin control protocol name was not added into 'protocol_name' array,
however Pin control was supported on i.MX95. So add it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-10-09 14:16:11 -06:00
Tom Rini
4463376302 Merge tag 'ubi-for-2026.01-rc1' of https://source.denx.de/u-boot/custodians/u-boot-ubi
UBI updates for 2025.10

- ubi fixes found by Andrew with Smatch
  - mtd: ubi: Remove test that always fails
  - fs: ubifs: Ensure buf is freed before return
  - fs: ubifs: Need to check return for being an error pointer
  -fs: ubifs: Fix and rework error handling in ubifs_finddir

- fix: limit copy size in ubispl found by Benedikt

- extend support for LED activity (use the LED activity also on ubi reads)
  from Yegor
2025-10-09 09:54:18 -06:00
Tom Rini
9d42a06019 cmd: Update dependencies on CMD_IRQ
For CMD_IRQ to function, we need enable/disable_interrupt functions as
well as do_irqinfo functions to be defined. Only NIOS2, PowerPC and X86
implement the latter, so correct dependencies to be opt-in not out-out
here.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-08 16:12:50 -06:00
Tom Rini
583a45c33f cmd: Make CMD_MP depend on the CPU framework being disabled
The CMD_MP (and cmd/mp.c) command provide a "cpu" command which is
mutually exclusive from the "cpu" command provided by cmd/cpu.c and the
CPU framework. Make CMD_MP depend on CPU not being enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-08 16:12:48 -06:00
Tom Rini
2d11e5ba4e Kconfig: Make further use of testing for !COMPILE_TEST
We have a large number of library symbols that should not be prompted
for by the user really but rather selected by the platform (or SoC) as
needed. To start with however, make these depend on !COMPILE_TEST.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-08 16:12:41 -06:00
Marek Vasut
0ee639ff5a thermal: Convert .get_temp() return value to millicelsius
Linux kernel .get_temp() callback reports values in millicelsius,
U-Boot currently reports them in celsius. Align the two and report
in millicelsius. Update drivers accordingly. Update callsites that
use thermal_get_temp() as well.

The 'temperature' command now reports temperature in millicelsius
as well, with additional accuracy. This changes command line ABI
slightly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: David Zang <davidzangcs@gmail.com>
[trini: Update test/cmd/temperature.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-08 13:54:59 -06:00
Yegor Yefremov
2bc0837ce1 ubi: extend support for LED activity
Add LED activity for ubi_dev_scan() and ubi_volume_read() routines.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2025-10-08 11:34:54 +02:00
briansune
92dcb3ad5d cmd/dma: implement dmareset command
This adds a new U-Boot command 'c5_pl330_dma' for Cyclone V SoCDK
boards. It provides access to the Reset Manager's Per2ModRst register
to release the reset for ARM PrimeCell PL330 DMA channels. This allows
software to initialize and use the PL330 DMA controller properly after
reset.

Signed-off-by: Brian Sune <briansune@gmail.com>
[trini: Minor style fixes]
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-07 17:49:15 -06:00
Mikhail Kshevetskiy
eeae89cd35 cmd: mtd: add benchmark option to the help
The patch adds benchmark option to the help of mtd command. For the
'mtd write' case the help line exceed 80 characters. Ignore this issue
as modern terminals are capable to handle more characters.

The patch also formats other command to make sure all device names
starts on the same collumn.

Fixes: d246e70cf81d0 ("cmd: mtd: Enable speed benchmarking")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:51 +02:00
Mikhail Kshevetskiy
e700a84292 cmd: mtd: fix speed measurement in the speed benchmark
The shown speed is inversely proportional to the data size.
See the output:

  spi-nand: spi_nand nand@0: Micron SPI NAND was found.
  spi-nand: spi_nand nand@0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
  ...
  => mtd read.benchmark spi-nand0 $loadaddr 0 0x40000
  Reading 262144 byte(s) (128 page(s)) at offset 0x00000000
  Read speed: 63kiB/s
  => mtd read.benchmark spi-nand0 $loadaddr 0 0x20000
  Reading 131072 byte(s) (64 page(s)) at offset 0x00000000
  Read speed: 127kiB/s
  => mtd read.benchmark spi-nand0 $loadaddr 0 0x10000
  Reading 65536 byte(s) (32 page(s)) at offset 0x00000000
  Read speed: 254kiB/s

In the spi-nand case 'io_op.len' is not always the same as 'len', thus
we are using the wrong amount of data to derive the speed.

Also make sure we are using 64-bit calculation to get a more precise
results.

Fixes: d246e70cf81d0 ("cmd: mtd: Enable speed benchmarking")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:49 +02:00
Mikhail Kshevetskiy
642f150bcd cmd: mtd: add nand_read_test command support
This patch implements read-only test of nand flash devices.

Test reads blocks of NAND flash in normal and raw modes and compares
results. The following statuses can be returned for a block:
 * non-ecc reading failed,
 * ecc reading failed,
 * block is bad,
 * bitflips is above maximum,
 * actual number of biflips above reported one,
 * bitflips reached it maximum value,
 * bitflips above threshold,
 * block is ok.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:46 +02:00
Mikhail Kshevetskiy
b89b0f3c47 cmd: mtd: add nand_write_test command support
Some nand flashes (like spi-nand one) are registered with mtd
subsystem only, thus nand command can't be used to work with
such flashes. As result some functionality is missing.

This patch implements 'nand torture' functionality for mtd command.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:43 +02:00
Mikhail Kshevetskiy
21c1098cf4 cmd: mtd: add markbad command support
Some nand flashes (like spi-nand one) are registered with mtd
subsystem only, thus nand command can't be used to work with
such flashes. As result some functionality is missing.

This patch implements 'nand markbad' functionality for mtd command.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:40 +02:00
Tom Rini
601cebc29d cmd: spl: Remove ATAG support from this command
While we continue to have some systems which support extremely legacy
OS booting methods, we do not have use cases for supporting this in
Falcon mode anymore. Remove this support and references from the
documentation.

Co-developed-by: Anshul Dalal <anshuld@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-03 16:55:44 -06:00
Osama Abdelkader
5d0b813d6e imls: remove return parentheses
return is not a function, parentheses are not required

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
2025-09-24 11:03:43 -06:00
Aditya Dutt
bbc9347a98 cmd: terminal: avoid serial_reinit_all() with DM_SERIAL enabled
serial_reinit_all() is only available when CONFIG DM_SERIAL is disabled
and CONFIG_SERIAL is enabled.

Signed-off-by: Aditya Dutt <duttaditya18@gmail.com>
2025-09-16 13:43:33 -06:00
Rasmus Villemoes
42529beba5 memtest: remove use of vu_long typedef in mem_test_alt
Hiding a qualifier such as "volatile" inside a typedef makes the code
much harder to understand. Since addr and dummy being
volatile-qualified are important for the correctness of the test code,
make it more obvious by spelling it out as "volatile ulong".

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Tested-by: Anshul Dalal <anshuld@ti.com>
2025-09-02 14:11:36 -06:00
Rasmus Villemoes
835915bb7d memtest: only call schedule() once for every 256 words
A function call itself for every word written or read+written in these
loops is bad enough. But since the memory test must be run with dcache
disabled, the schedule() call, traversing the linked list of
registered cyclic clients, and accessing the 'struct cyclic_info' for
each to see if any are due for a callback, is quite expensive. On a
beagleboneblack, testing a modest 16MiB region takes 2.5 minutes:

  => dcache off
  => time mtest 0x81000000 0x82000000 0 1
  Testing 81000000 ... 82000000:
  Iteration:      1
  Tested 1 iteration(s) with 0 errors.

  time: 2 minutes, 28.946 seconds

There is really no need for calling schedule() so frequently. It is
quite easy to limit the calls to once for every 256 words by using a
u8 variable. With that, the same test as above becomes 37 times
faster:

  => dcache off
  => time mtest 0x81000000 0x82000000 0 1
  Testing 81000000 ... 82000000:
  Iteration:      1
  Tested 1 iteration(s) with 0 errors.

  time: 4.052 seconds

Note that we are still making a total of

  3 loops * (4 * 2^20 words/loop) / (256 words/call) = 49152 calls

during those ~4000 milliseconds, so the schedule() calls are still
done less than 0.1ms apart.

These numbers are just for a beagleboneblack, other boards may have a
slower memory, but we are _two orders of magnitude_ away from
schedule() "only" being called at 100Hz, which is still more than
enough to ensure any watchdog is kept happy.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Tested-by: Anshul Dalal <anshuld@ti.com>
2025-09-02 14:11:36 -06:00
Rasmus Villemoes
86c5c25b6c memtest: don't volatile-qualify local variables
It is obviously important that the addr pointer used to access the
memory region being tested is volatile-qualified, to prevent the
compiler from optimizing out the "write this value, read it back,
check that it is what we expect".

However, none of these auxiliary variables have any such need for,
effectively, being forced to live on the stack and cause each and
every reference to them to do a memory access.

This makes the memtest about 15% faster on a beagleboneblack.

Before:

  => dcache off
  => time mtest 0x81000000 0x81100000 0 1
  Testing 81000000 ... 81100000:
  Iteration:      1
  Tested 1 iteration(s) with 0 errors.

  time: 10.868 seconds

After:

  => dcache off
  => time mtest 0x81000000 0x81100000 0 1
  Testing 81000000 ... 81100000:
  Iteration:      1
  Tested 1 iteration(s) with 0 errors.

  time: 9.209 seconds

[Without the 'dcache off', there's no difference in the time, about
0.6s, but the memtest cannot usefully be done with dcache enabled.]

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Tested-by: Anshul Dalal <anshuld@ti.com>
2025-09-02 14:11:36 -06:00
Miquel Raynal
d246e70cf8 cmd: mtd: Enable speed benchmarking
Linux features a flash_speed speed test from the mtd-utils suite, U-Boot
does not. Benchmarks are useful for speed improvement developments as
well as troubleshooting or regression testing sometimes.

Enable a benchmark option to enable this feature.

Example of output on a Nuvoton platform:

MA35D1> mtd read nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
MA35D1> mtd read.benchmark nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
Read speed: 3752kiB/s

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-08-23 16:37:22 +02:00
david regan
bb5d3a7a1c cmd: nand: nand dump with ecc option
option to show nand dump data ecc corrected as opposed to just raw

Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-08-23 16:37:20 +02:00
david regan
b5ce63e135 cmd: nand: nand dump display update
show characters with nand dump similar to md
along with offset into NAND

Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-08-23 16:37:17 +02:00
david regan
7ec4e91b2f cmd: nand: more descriptive help info
nand read/write raw change 'count' to 'pages' since count is ambiguous

Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-08-23 16:37:14 +02:00
david regan
590c28b378 cmd: nand: bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB
bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB since MTD_OOB_AUTO does not exist

Fixes: dfe64e2c8973 ("mtd: resync with Linux-3.7.1")
Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-08-23 16:37:11 +02:00
Jerome Forissier
90c05f68fc 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>
2025-08-18 15:47:58 +02:00
Jerome Forissier
8f80e30579 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>
2025-08-18 15:47:58 +02:00
Jerome Forissier
512be89796 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>
2025-08-18 15:47:58 +02:00
Simon Glass
47e9b73954 efi_loader: Support loading a ramdisk with bootefi
It is sometimes useful to be able to boot via EFI using a Linux initrd.
Add support for this.

Fix a 'specifiy' typo while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-08-08 08:45:18 +02:00
Shiji Yang
c60898c9c6 meminfo: correct "free" memory region size
The size of free memory should be $lmb_base - $ram_base.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
2025-08-07 11:15:41 -06:00
Dinesh Maniyam
b875409da7 cmd: Add i3c command support.
Add i3c command file to support select, get i3c device
target list, read and write operation.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@altera.com>
2025-08-06 08:41:30 +02:00
Heiko Schocher
b1463957d1 cmd: i2c: fix coverity issue
coverity scan reported issue:
** CID 583415:       Integer handling issues  (INTEGER_OVERFLOW)
/cmd/i2c.c: 369           in do_i2c_write()

change the length variable into type int.

Signed-off-by: Heiko Schocher <hs@denx.de>
2025-08-06 07:49:13 +02:00
Michal Simek
fcac9bfbbd cmd: bdinfo: Fix showing correct IP address based on current device
Use the same logic as is used for MAC address where bdi shows mac address
for current device where index (idx) is used to point to correct IP address
which is read and show.

Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-08-04 18:23:16 -06:00
Hugo Villeneuve
ee6d8ba15e cmd: tlv_eeprom: improve mac_read_from_eeprom() log messages
mac_read_from_eeprom() always display debug infos, and this messes up the
display of the "Net:" section details:

Before:
    Net:   EEPROM: TlvInfo v1 len=172
    eth0: ethernet@11c20000

After:
    Net:   eth0: ethernet@11c20000

Fix by moving unconditional "EEPROM: " header into each message and
changing debug message to use log_debug().

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2025-07-29 08:44:18 +02:00
Hugo Villeneuve
dedef8f6f9 cmd: tlv_eeprom: fix typo errors in comments and error msg
Fix typo errors in comments and error message by replacing EERPOM->EEPROM.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-07-29 08:44:18 +02:00
Andrew Goodbody
b83f865e75 cmd: elf: Prevent possible buffer overflow
In do_bootvx the environment variable 'bootdev' is fetched and copied
into a buffer without confirming that it will not overflow that buffer.
Use strlcpy to ensure that the buffer will not be overflowed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-28 13:04:42 -06:00
Simon Glass
0029f2447b efi: Rename CONFIG_EFI to CONFIG_EFI_CLIENT
The generic name 'EFI' would be more useful for common EFI features. At
present it just refers to the EFI app and stub, which is confusing.

Rename it to EFI_CLIENT

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-26 07:34:28 +02:00
Andrew Goodbody
70bf6e33e1 uclass: Cleanup uclass_find_next_device
uclass_find_next_device always returns 0, so instead make it a void and
update calling sites.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-24 11:49:18 -06:00
Pieter Van Trappen
53a10c8ce9 drivers: fpga: correct compiler errors and warnings
Errors reported by GCC 14.2 when enabling FPGA commands and
drivers. Also many style fixes as reported by checkpatch.pl on the
diffs. Most changes in stratixII.c which has been reorganized as well
to avoid the top function prototypes.

No functional changes.

Signed-off-by: Pieter Van Trappen <pieter.van.trappen@cern.ch>
Link: https://lore.kernel.org/r/20250708152455.1214487-4-vtpieter@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-07-24 08:54:15 +02:00
Pieter Van Trappen
f08dcc5524 cmd: fpga: improve user feedback in case of bitstream load failure
In cmd/fpga.c, change some `debug` calls to `log_err` for important
user feedback and use CMD_RET_FAILURE in favor of CMD_RET_USAGE due to
its long output which hides the actual, useful return message. Change
the remaining `debug` calls to `log_debug`. Remove all 'fpga:' and
__func__ strings as log_* has this covered.

For `do_fpga_loads`, move up the `do_fpga_check_params` call for more
consistent command output; use a constant instead of multiple '5' use.

In drivers/fpga/zynq*.c, change 'up to' to 'above' which corrects this
confusing/wrong statement.

Signed-off-by: Pieter Van Trappen <pieter.van.trappen@cern.ch>
Link: https://lore.kernel.org/r/20250708152455.1214487-2-vtpieter@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-07-24 08:54:15 +02:00
Andrew Goodbody
25d3e0509c cmd: gpt: Fix off by 1 errors
The buffer for a name to be copied into must also contain the
terminating 0 byte but strlen returns the length of the string without
counting that 0 byte. Adjust the length checks to take this into
account.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-23 17:37:08 -06:00
Tom Rini
7c85ee1f49 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
2025-07-19 08:38:11 -06:00
Holger Brunck
070c48fdb6 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>
2025-07-16 09:21:03 +02:00
Tom Rini
235e14b0f1 Merge tag 'qcom-main-20250714' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon
CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/27056

- Fix unused access in ufetch
- Add missing clock for SM8650
- Port the Linux SPMI GPIO driver and port over SM8550 (other platforms
  should follow)
2025-07-14 08:54:19 -06:00
Andrew Goodbody
8830e72092 cmd: ufetch: Initialise size before first use
The local variable size is not assigned to before it is used
for the first time. Correct this.

This issue was found by Smatch.

Fixes: 86d462c05d57 (cmd: add a fetch utility)
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Link: https://lore.kernel.org/r/20250626-ufetch_fix-v1-1-025afdb85dc2@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2025-07-14 15:35:24 +02:00