Commit Graph
106175 Commits
Author SHA1 Message Date
Peng FanandFabio Estevam fd1072d0d5 imx8m: dts: Update ddr firmware name
Update to latest ddr firmware name, otherwise user may use legacy ddr
firmware from linux-firmware-imx release.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-26 17:06:15 -03:00
Peng FanandFabio Estevam 902cf2bf67 imx: Guard print_cpuinfo with !CONFIG_IS_ENABLED(CPU)
When CONFIG_CPU is enabled, print_cpuinfo is defined in common/board_f.c
with static property. However in imx cpu.c, print_cpuinfo is not a local
function, so guard it with !CONFIG_IS_ENABLED(CPU).

And all i.MX8M boards has CONFIG_CPU and CONFIG_CPU_IMX set, so remove the
dead code.

However legacy print_cpuinfo also print reset reason, to keep reset
reason printed as before, export get_reset_reason() and invoke it
at arch_misc_init().

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-26 17:05:56 -03:00
Peng FanandFabio Estevam 2571e319c5 imx7ulp: cleanup get_imx_type
There is only one SoC and no external user of get_imx_type for i.MX7ULP,
so directly embed the string in print_cpuinfo and drop get_imx_type().

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-26 17:05:36 -03:00
Peng FanandFabio Estevam 0f09e834ac imx8ulp: cleanup get_imx_type
There is only one SoC and no external user of get_imx_type for i.MX8ULP,
so directly embed the string in print_cpuinfo and drop get_imx_type().

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-26 17:05:15 -03:00
Peng FanandFabio Estevam f59da150c9 imx952: Update gpio node regs
Same to 85319b2e67 ("board: toradex: smarc-imx95: remove gpio1 reg"),
there is no need to use dual base for i.MX952 gpio, so drop the U-Boot
specific reg changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-26 17:00:22 -03:00
Peng FanandFabio Estevam e0fa78b215 imx8m: Imply DM_THERMAL
CONFIG_IMX_TMU depends on CONFIG_DM_THERMAL, so when selecting IMX_TMU,
DM_THERMAL should also be selected.

Update i.MX8M based defconfigs.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2026-06-26 17:00:22 -03:00
Tom Rini 63f6cc8ba6 Merge patch series "Kconfig restyle part 2"
Johan Jonker <jbx6244@gmail.com> says:

The Kconfig menu attribute '---help---' is deprecated.
If we change to "help" the text has to indent.
This again has to align with other attributes,
so we have to restyle them as well.
And as there's a script then change all Kconfig files
excluding 'arch' and 'board' directories from part 1.

Restyle all Kconfigs:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Problems:
People creating indents in help texts.
The script doesn't care. It puts everything left aligned.

Help texts with empty lines. It stops aligning as help test.

Other fixes:
While using checkpatch.pl or the script some issues showed up,
so fix them as well.

Link: https://lore.kernel.org/r/ef462dea-69aa-48df-9f7c-af2e6c54e52a@gmail.com
2026-06-25 15:01:03 -06:00
Johan JonkerandTom Rini 58ecf78d2b Kconfig: restyle
Restyle Kconfig:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 15:01:00 -06:00
Johan JonkerandTom Rini 145d58e2c7 Kconfig: drivers: restyle remaining
Restyle all Kconfigs for the rest of "drivers":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a few more multi-paragraph help texts]
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-06-25 15:00:58 -06:00
Johan JonkerandTom Rini 173ffc7bcf Kconfig: gpio: add empty line
Restyle by adding an empty line between configs.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:59:44 -06:00
Johan JonkerandTom Rini 55ae284935 Kconfig: video: restyle
Restyle all Kconfigs for "video":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a multi-paragraph help text]
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:59:30 -06:00
Johan JonkerandTom Rini 8b09b702d4 Kconfig: usb: restyle
Restyle all Kconfigs for "usb":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:58:13 -06:00
Johan JonkerandTom Rini b2c5dd6048 Kconfig: power: restyle
Restyle all Kconfigs for "power":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a few more multi-paragraph help texts]
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:57:42 -06:00
Johan JonkerandTom Rini 591086d49d Kconfig: pinctrl: restyle
Restyle all Kconfigs for "pinctrl":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:53:58 -06:00
Johan JonkerandTom Rini 2b92ad8622 Kconfig: net: restyle
Restyle all Kconfigs for "net":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:53:51 -06:00
Johan JonkerandTom Rini 11b7a94757 Kconfig: mtd: restyle
Restyle all Kconfigs for "mtd":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a few more multi-paragraph help texts]
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:53:19 -06:00
Johan JonkerandTom Rini 54cac2bf5c Kconfig: i2c: restyle
Restyle all Kconfigs for "i2c":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:15:37 -06:00
Johan JonkerandTom Rini f934012cd9 Kconfig: net: restyle
Restyle all Kconfigs for "net":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:15:33 -06:00
Johan JonkerandTom Rini 8e85b5c761 Kconfig: lib: restyle
Restyle all Kconfigs for "lib":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:13:44 -06:00
Johan JonkerandTom Rini 5c1ab62653 Kconfig: fs: restyle
Restyle all Kconfigs for "fs":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:13:42 -06:00
Johan JonkerandTom Rini 5bae190bde Kconfig: dts: restyle
Restyle all Kconfigs for "dts":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:13:40 -06:00
Johan JonkerandTom Rini 7ffcbd87d2 Kconfig: disk: restyle
Restyle all Kconfigs for "disk":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:13:38 -06:00
Johan JonkerandTom Rini 89957a4f58 Kconfig: common: restyle
Restyle all Kconfigs for "common":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:13:36 -06:00
Johan JonkerandTom Rini 6f9303f330 Kconfig: cmd: restyle
Restyle all Kconfigs for "cmd":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:13:34 -06:00
Johan JonkerandTom Rini c28e57164d Kconfig: boot: restyle
Restyle all Kconfigs for "boot":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2026-06-25 14:13:31 -06:00
Tom Rini 39e9806303 Merge patch series "Kconfig restyle"
Johan Jonker <jbx6244@gmail.com> says:

The Kconfig menu attribute '---help---' is deprecated.
If we change to "help" the text has to indent.
This again has to align with other attributes,
so we have to restyle them as well.
And as there's a script then change all Kconfig
to start with the 'arch' and 'board' directories.

Restyle all Kconfigs:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Problems:
People creating indents in help texts.
The script doesn't care. It puts everything left aligned.

Help texts with empty lines. It stops aligning as help test.

Other fixes:
While using checkpatch.pl or the script some issues showed up,
so fix them as well.

Link: https://lore.kernel.org/r/d1270724-50eb-450d-8847-a3271ea27a2a@gmail.com
2026-06-25 14:07:01 -06:00
Johan JonkerandTom Rini df3d87bd69 Kconfig: board: restyle
Restyle all Kconfigs:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:55 -06:00
Johan JonkerandTom Rini f952ddb7ec Kconfig: arch: restyle
Restyle all Kconfigs other then "arm":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:55 -06:00
Johan JonkerandTom Rini 0caac78a06 Kconfig: arm: restyle
Restyle all Kconfigs for "arm":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:18 -06:00
Johan JonkerandTom Rini 2ffe968701 Kconfig: misc: add empty line
Restyle by adding an empty line between configs.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:18 -06:00
Johan JonkerandTom Rini d20d285cf0 Kconfig: themal: fix typo
While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: Possible repeated word: 'for'

Fix by changing 'for for' to 'for'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:18 -06:00
Johan JonkerandTom Rini 08fc979a61 Kconfig: power: pmic: fix typo
While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: 'refered' may be misspelled - perhaps 'referred'?

Fix by changing 'refered' to 'referred'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:18 -06:00
Johan JonkerandTom Rini 4b199a549f Kconfig: powerpc: mpc85xx: fix typo
While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: 'Enble' may be misspelled - perhaps 'Enable'?

Fix by changing 'Enble' to 'Enable'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:18 -06:00
Johan JonkerandTom Rini 0c0074f983 Kconfig: armv7: fix typo
While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: 'suppport' may be misspelled - perhaps 'support'?

Fix by changing 'suppport' to 'support'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-25 14:06:17 -06:00
Tom Rini 19eafbadf2 Merge patch series "Relocate U-Boot in the last bank"
Ilias Apalodimas <ilias.apalodimas@linaro.org> says:

There was a discussion recently on the mailing lists regarding our
management of memory above ram_top [0]. The tl;dr is that we have two problems.

The first one is that U-Boot always relocates to the top of the first available
bank unless there's special board code to sidestep that. The second is we don't
successfully deal with devices that can only do 32-bit DMA.

This patch series deals with the first problem by adding a Kconfig option
allowing platforms to relocate to the top of the last discovered bank.

It's worth noting that this is easily testable with QEMU

qemu-system-aarch64 -m 8192 -smp 2 -nographic -cpu cortex-a57 \
    -machine virt,secure=off \
    -bios u-boot.bin \
    -device virtio-rng-pci \
    -drive id=os,if=none,file="$image" \
    -device virtio-blk-device,drive=os \
    -object memory-backend-ram,id=ram0,size=4G \
    -object memory-backend-ram,id=ram1,size=4G \
    -numa node,memdev=ram0 \
    -numa node,memdev=ram1

# RELOC_ADDR_TOP not set
Hit any key to stop autoboot: 0
=> bdinfo
[...]
relocaddr   = 0x000000013f66c000
reloc off   = 0x000000013f66c000
[...]
lmb_dump_all:
 memory.count = 0x1
 memory[0]	[0x40000000-0x23fffffff], 0x200000000 bytes, flags: none
 reserved.count = 0x2
 reserved[0]	[0x13d507000-0x13d509fff], 0x3000 bytes, flags: no-notify, no-overwrite
reserved[1]	[0x13d50aff0-0x23fffffff], 0x102af5010 bytes, flags: no-overwrite
devicetree  = board
[...]
TLB addr    = 0x000000013ffe0000
irq_sp      = 0x000000013e50aff0
sp start    = 0x000000013e50aff0
Early malloc usage: e88 / 2000
=>

# RELOC_ADDR_TOP enabled

=> bdinfo
[...]
relocaddr   = 0x000000023f66c000
reloc off   = 0x000000023f66c000
[...]
lmb_dump_all:
 memory.count = 0x1
 memory[0]	[0x40000000-0x23fffffff], 0x200000000 bytes, flags: none
 reserved.count = 0x2
 reserved[0]	[0x23d507000-0x23d509fff], 0x3000 bytes, flags: no-notify, no-overwrite
 reserved[1]	[0x23d50aff0-0x23fffffff], 0x2af5010 bytes, flags: no-overwrite
devicetree  = board
[...]
TLB addr    = 0x000000023ffe0000
irq_sp      = 0x000000023e50aff0
sp start    = 0x000000023e50aff0
Early malloc usage: e88 / 2000
=>

[0] https://lore.kernel.org/u-boot/CAC_iWjKFAzpj3B_MEW7-dnOrcAV-rfkhXXo8Bv0KgLNP2VJxRA@mail.gmail.com/

Link: https://lore.kernel.org/r/20260617074846.84362-1-ilias.apalodimas@linaro.org
2026-06-24 18:13:25 -06:00
Ilias ApalodimasandTom Rini fb537c85bc doc: Add a warning about using RELOC_ADDR_TOP
Since devices that can't DMA above 4GiB will misbehave with this option
enabled add a warning on the documentation.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2026-06-24 18:13:24 -06:00
Ilias ApalodimasandTom Rini aefd4a769b configs: Enable RELOC_ADDR_TOP on arm64 QEMU
Since we added an option for relocating U-Boot to the last memory bank,
enable it for QEMU to get some coverage

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2026-06-24 18:13:24 -06:00
Ilias ApalodimasandTom Rini 55a3421769 common: Add an option to relocate on ram top
Right now we only relocate u-boot to the top of the first
memory bank unless the board specific code overwrites it.
This is problematic when loading big binaries as it
fragments the contiguous memory space for no apparent reason.

On certain platforms, it is currently not possible to relocate U-Boot
above the 32bit boundary, due to various dependencies on content located
below the 32bit boundary. One such example is ethernet, where the packet
buffer built into U-Boot binary is placed below the 32bit boundary and
allows loading of data via ethernet even above 32bit boundary due to
memory copy from the packet buffer to the destination location.

A previous patch moves the bi_dram[] info from bd to gd and make
the memory bank information available early. So move the
dram_init_banksize() INITCALL before the relocation address calculation
and use it to derive the address.

Also add a Kconfig option and allow the common code to relocate U-Boot
to the top of the last discovered bank.
It's worth noting that this patch changes when dram_init_banksize()
is called. It's now called  much earlier in the board init process.
That is a significant ordering change for every board with a custom
dram_init_banksize(), and it is unconditional (not gated on RELOC_ADDR_TOP).

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>  # Radxa ROCK 5B
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2026-06-24 18:13:24 -06:00
Ilias ApalodimasandTom Rini d19d9e1c06 rpi: Add a local get_effective_memsize()
We are about to change the place we call dram_init_banksize().
The goal is to have all the information we need to pick a proper
relocation address in gd->dram[].

However, the RPI boards, and specifically the tested rpi4, seems
to hang if we relocate anywhere above the address returned from
bcm2835_mbox_call_prop().
So store that address and return it on get_effective_memsize()
which is used to calculate ram_top.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>   # rpi, rpi4
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2026-06-24 18:13:24 -06:00
Ilias ApalodimasandTom Rini 0943f107ce common: Clean up setup_dest_addr()
Right now the function does
- Re-adjust the ram_size based on Kconfig options
- Set ram_top
- Set the relocation address

It also does not set the ram_size in case ram_top grew
from it's initial value. But ram_top and ram_size should
always be changed together.

So let's make things a bit cleaner and move the ram calculations
in their own INITCALL

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Michal Simek <michal.simek@amd.com> # Versal Gen 2 Vek385
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2026-06-24 18:13:24 -06:00
Ilias ApalodimasandTom Rini 15b35e4289 common: move ram_base calculation to independent INITCALL()
Currently, ram_base is calculated within setup_dest_addr().
However, upcoming patches that enable U-Boot relocation to the highest
DRAM bank require ram_base to be initialized earlier.

The default dram_init_banksize() definition relies on ram_base
to calculate the start of the first bank. But following patches
will move that function to execute immediately before setup_dest_addr().

So let's split the ram_base initialization in its own INITCALL.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Michal Simek <michal.simek@amd.com> # Versal Gen 2 Vek385
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2026-06-24 18:13:24 -06:00
Ilias ApalodimasandTom Rini 1174c99ab4 treewide: move bi_dram[] from bd to gd
Currently, the bi_dram[] information is stored in the board info
structure (bd). Because bd is only valid after reserve_board(),
dram_init_banksize() must be called late in the initialization process.
This limitation is problematic, as it forces us to rely on a variety of
bespoke functions to determine board RAM, bank memory sizes, and other
early setup requirements.

By moving bi_dram[] into the global data (gd), we can run it earlier.
This is particularly convenient since boards define their own
dram_init_banksize() routines, which do not always rely on parsing
Device Tree (DT) memory nodes.

Additionally, U-Boot defaults to relocating to the top of the first memory
bank. While boards currently use custom functions to override this
behavior, having the DRAM bank information available earlier in gd makes
relocating to a different bank trivial and standardizes the process.

Reviewed-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Michal Simek <michal.simek@amd.com> # Versal Gen 2 Vek385
Tested-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2026-06-24 18:13:24 -06:00
Kuan-Wei ChiuandTom Rini 47e9c542ee rtc: goldfish: Return error when device address is invalid
goldfish_rtc_of_to_plat() currently returns success even when
dev_read_addr() fails to find a valid address. This leaves plat->reg
unset (or 0) and defers the failure to probe().

Return -EINVAL immediately when the address is FDT_ADDR_T_NONE so the
failure is reported at the of_to_plat stage where it belongs. This
aligns the driver with the recent fix introduced in the goldfish
serial driver by Naveen Kumar Chaudhary. [1]

Link: https://lore.kernel.org/u-boot/vgwnt6mnls3lf3zdm6mz5siztzkvppte4ykszbvifjzukvmksf@maaxe5agqpim/ [1]
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
2026-06-23 12:38:01 -06:00
Kuan-Wei ChiuandTom Rini 2bc9c58e7f timer: goldfish: Return error when device address is invalid
goldfish_timer_of_to_plat() currently returns success even when
dev_read_addr() fails to find a valid address. This leaves plat->reg
unset and defers the failure to probe().

Return -EINVAL immediately when the address is FDT_ADDR_T_NONE so the
failure is reported at the of_to_plat stage where it belongs. This
aligns the driver with the recent fix introduced in the goldfish
serial driver by Naveen Kumar Chaudhary. [1]

Link: https://lore.kernel.org/u-boot/vgwnt6mnls3lf3zdm6mz5siztzkvppte4ykszbvifjzukvmksf@maaxe5agqpim/ [1]
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
2026-06-23 12:38:01 -06:00
Naveen Kumar ChaudharyandTom Rini d73aed0b05 serial: goldfish: return error when device address is invalid
goldfish_serial_of_to_plat() returns success even when dev_read_addr()
fails to find a valid address. This leaves plat->reg unset and defers
the failure to probe().

Return -EINVAL immediately when the address is FDT_ADDR_T_NONE so the
failure is reported at the of_to_plat stage where it belongs.

Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
Acked-by: Kuan-Wei Chiu <visitorckw@gmail.com>
2026-06-23 12:37:21 -06:00
Naveen Kumar ChaudharyandTom Rini 0bef438428 serial: cortina: check RX FIFO status before reading data
ca_serial_getc() reads from the URX_DATA register unconditionally
without first checking whether the RX FIFO contains valid data. When
the FIFO is empty, this returns whatever stale value is in the
register, which the DM serial framework interprets as a valid
character.

The DM serial framework expects getc() to return -EAGAIN when no data
is available, so it can handle retries and call schedule() to service
the watchdog between attempts.

Add a check of the UINFO register's UINFO_RX_FIFO_EMPTY bit before
reading URX_DATA, returning -EAGAIN when no data is pending. This
is consistent with how ca_serial_putc() already checks
UINFO_TX_FIFO_FULL before writing.

Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
2026-06-23 12:37:02 -06:00
Alexander SteinandTom Rini 157186fbfc global_data: fix type for gd_malloc_ptr()
With commit 92aa3ec321 ("global_data: Reduce size of early-malloc vars")
the type changes from (unsigned) long to int. But the type for default
if SYS_MALLOC_F_LEN is unset was not changed. Remove the suffix.
Fixes the warning:
 common/spl/spl.c:800:23: warning: format '%x' expects argument of type
 'unsigned int', but argument 2 has type 'long int' [-Wformat=]

Fixes: 92aa3ec321 ("global_data: Reduce size of early-malloc vars")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2026-06-23 12:36:26 -06:00
Tom Rini 9f16b258e5 Merge tag 'v2026.07-rc5' into next
Prepare v2026.07-rc5
2026-06-22 16:42:41 -06:00
Tom Rini f072620dc9 Prepare v2026.07-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-06-22 16:22:08 -06:00
Tom Rini cfaf135460 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
- serial: sh: Fix dev_read_addr error check
2026-06-22 08:19:12 -06:00