[U-Boot] [PATCH 2/2] env: Add back default action of get_char in env_get_char()
York Sun
york.sun at nxp.com
Wed Feb 7 22:17:12 UTC 2018
Commit 8a3a7e2270b3 ("env: Pass additional parameters to the env
lookup function") dropped the default action if driver doesn't have
get_char() defined. This causes failure to get environmental
variables from NOR flash. Add back this default action for now.
Signed-off-by: York Sun <york.sun at nxp.com>
CC: Maxime Ripard <maxime.ripard at free-electrons.com>
---
Limited test on LS1043ARDB.
env/env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/env/env.c b/env/env.c
index edfb575..210bae2 100644
--- a/env/env.c
+++ b/env/env.c
@@ -159,7 +159,7 @@ int env_get_char(int index)
int ret;
if (!drv->get_char)
- continue;
+ return *(uchar *)(gd->env_addr + index);
if (!env_has_inited(drv->location))
continue;
--
2.7.4
More information about the U-Boot
mailing list