Hi Jiaxun,

On 2026-10-16T06:54:41, Yao Zi <[email protected]> wrote:
> lib: fdtdec: Handle multiple memory nodes
>
> Current code only tries to fetch the first memory node found in
> fdt tree and determine memory banks from multiple reg properties.
>
> Specification allows multiple memory nodes in devicetree, rework
> fdtdec_setup_mem_size_base_lowest and fdtdec_setup_memory_banksize
> to iterate over all memory nodes.
>
> Signed-off-by: Jiaxun Yang <[email protected]>
> Signed-off-by: Yao Zi <[email protected]>
>
>  include/asm-generic/global_data.h |   2 +-
>  lib/fdtdec.c                      | 127 
> ++++++++++++++++++++++----------------
>  2 files changed, 74 insertions(+), 55 deletions(-)

> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
> @@ -1115,90 +1116,108 @@ ofnode fdtdec_get_next_memory_node(ofnode mem)
> +                     log_debug("%s: DRAM Bank #%d %s.%d: start = 0x%pap, 
> size = 0x%pap\n",
> +                               __func__, bank, ofnode_get_name(mem), reg,
> +                               &gd->dram[bank].start, &gd->dram[bank].size);

%pap already emits the '0x' prefix, so this prints '0x0x...'. Please
drop the literal '0x' here and in the final log_debug() below.

Regards,
Simon

Reply via email to