From: Ludger Dreier <Ludger.Dreier@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Revert "env_eeprom: Assign default environment during board_init_f"
Date: Tue, 15 Sep 2015 11:35:35 +0200 [thread overview]
Message-ID: <55F7E667.1040802@keymile.com> (raw)
This reverts commit ed6a5d4f880ac248530dbf64683b2257dbe54b64.
The original patch uses ENV_IS_EMBEDDED to decide if the default
environment should be used or the one actually read from EEPROM. The
code in environment.h allows setting of ENV_IS_EMBEDDED only for
a subset of flash types. EEPROM is not included in that list.
So basically reading environment from I2C EEPROM is broken now.
I propose to revert the patch.
Signed-off-by: Ludger Dreier <ludger.dreier@keymile.com>
---
common/env_eeprom.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/common/env_eeprom.c b/common/env_eeprom.c
index 905d39a..490ac73 100644
--- a/common/env_eeprom.c
+++ b/common/env_eeprom.c
@@ -147,7 +147,6 @@ int saveenv(void)
#ifdef CONFIG_ENV_OFFSET_REDUND
int env_init(void)
{
-#ifdef ENV_IS_EMBEDDED
ulong len, crc[2], crc_tmp;
unsigned int off, off_env[2];
uchar buf[64], flags[2];
@@ -213,16 +212,12 @@ int env_init(void)
gd->env_addr = off_env[1] + offsetof(env_t, data);
else if (gd->env_valid == 1)
gd->env_addr = off_env[0] + offsetof(env_t, data);
-#else
- gd->env_addr = (ulong)&default_environment[0];
- gd->env_valid = 1;
-#endif
+
return 0;
}
#else
int env_init(void)
{
-#ifdef ENV_IS_EMBEDDED
ulong crc, len, new;
unsigned off;
uchar buf[64];
@@ -255,10 +250,7 @@ int env_init(void)
gd->env_addr = 0;
gd->env_valid = 0;
}
-#else
- gd->env_addr = (ulong)&default_environment[0];
- gd->env_valid = 1;
-#endif
+
return 0;
}
#endif
--
1.7.0.5
next reply other threads:[~2015-09-15 9:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 9:35 Ludger Dreier [this message]
2015-09-15 16:54 ` [U-Boot] [PATCH] Revert "env_eeprom: Assign default environment during board_init_f" Tom Rini
2015-09-16 11:46 ` Ludger Dreier
2015-09-16 11:53 ` 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=55F7E667.1040802@keymile.com \
--to=ludger.dreier@keymile.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.