[PATCH v1] mach-k3: fix reading size and addr from fdt on R5
Dhruva Gole
d-gole at ti.com
Fri Sep 5 21:00:38 CEST 2025
On Sep 03, 2025 at 16:47:02 +0530, Anshul Dalal wrote:
> fdtdec_get_addr_size uses architecture dependent datatypes which causes
> the 32-bit R5 to fail when reading the 64-bit size and addr fields of
> reg nodes from the fdt.
>
> Therefore change it to a common api for both 64 and 32 bit platforms to
> allow for fdt fixups from R5.
>
> Fixes: 8b0fc29de0e3 ("arm: mach-k3: am62: Fixup TF-A/OP-TEE reserved-memory node in FDT")
> Signed-off-by: Anshul Dalal <anshuld at ti.com>
> ---
> arch/arm/mach-k3/common_fdt.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c
> index 2777354c6ab..1e6786f6c20 100644
> --- a/arch/arm/mach-k3/common_fdt.c
> +++ b/arch/arm/mach-k3/common_fdt.c
> @@ -140,7 +140,9 @@ int fdt_fixup_reserved(void *blob, const char *name,
> return -EINVAL;
> if (!strncmp(node_name, name, strlen(name))) {
> /* Read out old size first */
> - addr = fdtdec_get_addr_size(blob, subnode, "reg", &size);
> + addr = fdtdec_get_addr_size_auto_parent(
> + blob, nodeoffset, subnode, "reg", 0, &size,
> + false);
Reviewed-by: Dhruva Gole <d-gole at ti.com>
--
Best regards,
Dhruva Gole
Texas Instruments Incorporated
More information about the U-Boot
mailing list