mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 10:54:37 +00:00

LDFW firmware loading can fail, e.g. in case if user forgot to upload the binary to the appropriate location (/EFI/firmware/ldfw.bin on ESP partition). Report such errors explicitly, so that the user can notice it early and take necessary actions. But don't return error code from board_init() in this case, as LDFW firmware is not mandatory for board operation and is only required for some features like TRNG. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
29 lines
436 B
C
29 lines
436 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (c) 2024, Linaro Ltd.
|
|
* Author: Sam Protsenko <semen.protsenko@linaro.org>
|
|
*/
|
|
|
|
#include <init.h>
|
|
#include "fw.h"
|
|
|
|
int dram_init(void)
|
|
{
|
|
return fdtdec_setup_mem_size_base();
|
|
}
|
|
|
|
int dram_init_banksize(void)
|
|
{
|
|
return fdtdec_setup_memory_banksize();
|
|
}
|
|
|
|
int board_init(void)
|
|
{
|
|
int err;
|
|
|
|
err = load_ldfw();
|
|
if (err)
|
|
printf("ERROR: LDFW loading failed (%d)\n", err);
|
|
|
|
return 0;
|
|
}
|