[U-Boot] [PATCH v4 2/5] arm bootm: Do not append zero ATAG_MEM

Marek Vasut
2012-10-20T09:34:20Z

Dear Pali Roh?r,

> If dram bank size is calculated at runtime, it can be zero on some boards.
> This patch added code which ignore these zero bank size in ATAG_MEM.
>
> Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
> ---
> Changes in v4:
> - No changes

Did we not discuss this patch?

> arch/arm/lib/bootm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index 9323db0..d5811e0 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -133,6 +133,9 @@ static void setup_memory_tags(bd_t *bd)
> int i;
>
> for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> + if (bd->bi_dram[i].size == 0)
> + continue;
> +
> params->hdr.tag = ATAG_MEM;
> params->hdr.size = tag_size (tag_mem32);

Best regards,
Marek Vasut