[v2,3/4] fdtdec: Introduce fdtdec_setup_ram_size() to determine the memory size
Simon Glass
sjg at chromium.org
Wed Apr 1 21:21:36 CEST 2026
Hi Ilias,
On 2026-03-31T08:01:10, Ilias Apalodimas <ilias.apalodimas at linaro.org> wrote:
> diff --git a/include/fdtdec.h b/include/fdtdec.h
> @@ -965,6 +965,21 @@ int fdtdec_setup_mem_ram_top(void);
> int fdtdec_setup_memory_banksize(void);
> +/**
> + * fdtdec_setup_ram_size() - decode and setup setup gd->ram_size to the sum of
There's a missing blank line between fdtdec_setup_memory_banksize()
and the new kerneldoc comment.
Also, 'setup setup' is duplicated.
> diff --git a/include/fdtdec.h b/include/fdtdec.h
> @@ -965,6 +965,21 @@ int fdtdec_setup_mem_ram_top(void);
> + * This function should be called from a boards board_get_usable_ram_top().
> + * This helper function allows for boards to query the device tree for the
> + * overall memory described in as the sum of all memory banks.
'described in as' should be 'described as'
'a boards' -> 'a board's'
> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
> @@ -1142,6 +1142,24 @@ int fdtdec_setup_memory_banksize(void)
> +int fdtdec_setup_ram_size(void)
> +{
> + int ret;
> + phys_addr_t old_size = gd->ram_size;
'old_size' should be 'phys_size_t' rather than 'phys_addr_t' since
'gd->ram_size' is a size, not an address
Regards,
Simon
More information about the U-Boot
mailing list