[PATCH v2 3/5] microblaze: board: Check return value whlie saving env variables
Michal Simek
michal.simek at xilinx.com
Mon Oct 12 10:00:43 CEST 2020
From: T Karthik Reddy <t.karthik.reddy at xilinx.com>
Check and print warning if run time env variables are not saved.
Signed-off-by: T Karthik Reddy <t.karthik.reddy at xilinx.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
(no changes since v1)
board/xilinx/microblaze-generic/microblaze-generic.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 4e569e910d90..724c33987ba4 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -37,6 +37,7 @@ int dram_init(void)
int board_late_init(void)
{
ulong max_size, lowmem_size;
+ u32 status = 0;
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE)
int ret;
@@ -58,9 +59,12 @@ int board_late_init(void)
/* Linux default LOWMEM_SIZE is 0x30000000 = 768MB */
lowmem_size = gd->ram_base + 768 * 1024 * 1024;
- env_set_addr("initrd_high", (void *)min_t(ulong, max_size,
- lowmem_size));
- env_set_addr("fdt_high", (void *)min_t(ulong, max_size, lowmem_size));
+ status |= env_set_addr("initrd_high", (void *)min_t(ulong, max_size,
+ lowmem_size));
+ status |= env_set_addr("fdt_high", (void *)min_t(ulong, max_size,
+ lowmem_size));
+ if (status)
+ printf("%s: Saving run time variables FAILED\n", __func__);
return 0;
}
--
2.28.0
More information about the U-Boot
mailing list