In set_km_env() the pram variable was set to an hexadecimal value, while initr_mem() expects an unsigned decimal. Set the pram variable to an unsigned decimal instead.
Signed-off-by: Niel Fourie <lu...@denx.de> Cc: Holger Brunck <holger.bru...@hitachi-powergrids.com> Cc: Heiko Schocher <h...@denx.de> Cc: Priyanka Jain <priyanka.j...@nxp.com> --- board/keymile/common/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 03c7ce9da7..106787efd5 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -60,7 +60,7 @@ int set_km_env(void) strict_strtoul(p, 16, &rootfssize); pram = (rootfssize + CONFIG_KM_RESERVED_PRAM + CONFIG_KM_PHRAM + CONFIG_KM_PNVRAM) / 0x400; - sprintf((char *)buf, "0x%x", pram); + sprintf((char *)buf, "%u", pram); env_set("pram", (char *)buf); varaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM; -- 2.29.2