From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] env: Add back default action of get_char in env_get_char()
Date: Wed, 7 Feb 2018 14:17:12 -0800 [thread overview]
Message-ID: <1518041832-337-2-git-send-email-york.sun@nxp.com> (raw)
In-Reply-To: <1518041832-337-1-git-send-email-york.sun@nxp.com>
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@nxp.com>
CC: Maxime Ripard <maxime.ripard@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
next prev parent reply other threads:[~2018-02-07 22:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 22:17 [U-Boot] [PATCH 1/2] env: Fix env_load_location York Sun
2018-02-07 22:17 ` York Sun [this message]
2018-02-08 8:47 ` [U-Boot] [PATCH 2/2] env: Add back default action of get_char in env_get_char() Maxime Ripard
2018-02-08 9:42 ` Simon Goldschmidt
2018-02-08 9:43 ` Simon Goldschmidt
2018-02-08 9:52 ` Simon Goldschmidt
2018-02-08 22:10 ` Maxime Ripard
2018-02-09 20:25 ` Goldschmidt Simon
2018-02-08 8:38 ` [U-Boot] [PATCH 1/2] env: Fix env_load_location Maxime Ripard
2018-02-08 10:05 ` Simon Goldschmidt
2018-02-08 19:28 ` York Sun
2018-02-17 20:51 ` [U-Boot] [U-Boot,1/2] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518041832-337-2-git-send-email-york.sun@nxp.com \
--to=york.sun@nxp.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox