All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] env_eeprom invalidates gd->env_addr by setting it to an offset value
@ 2016-03-11 13:31 Guy Thouret
  2016-04-12  2:28 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Guy Thouret @ 2016-03-11 13:31 UTC (permalink / raw)
  To: u-boot

Patch to fix boot hang when using env on i2c eeprom caused by invalid gd->env_addr

Signed-off-by: Guy Thouret <guy.thouret@wems.co.uk>
Cc: Heiko Schocher <hs@denx.de>
---
 common/env_eeprom.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/common/env_eeprom.c b/common/env_eeprom.c
index 72b1373..5f63a6c 100644
--- a/common/env_eeprom.c
+++ b/common/env_eeprom.c
@@ -145,11 +145,6 @@ void env_relocate_spec(void)
 			gd->env_valid = 1;
 	}
 
-	if (gd->env_valid == 2)
-		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 /* CONFIG_ENV_OFFSET_REDUND */
 	ulong crc, len, new;
 	uchar rdbuf[64];
@@ -175,10 +170,8 @@ void env_relocate_spec(void)
 	}
 
 	if (crc == new) {
-		gd->env_addr	= offsetof(env_t, data);
 		gd->env_valid	= 1;
 	} else {
-		gd->env_addr	= 0;
 		gd->env_valid	= 0;
 	}
 #endif /* CONFIG_ENV_OFFSET_REDUND */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] env_eeprom invalidates gd->env_addr by setting it to an offset value
  2016-03-11 13:31 [U-Boot] [PATCH] env_eeprom invalidates gd->env_addr by setting it to an offset value Guy Thouret
@ 2016-04-12  2:28 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2016-04-12  2:28 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 11, 2016 at 01:31:39PM +0000, Guy Thouret wrote:

> Patch to fix boot hang when using env on i2c eeprom caused by invalid gd->env_addr
> 
> Signed-off-by: Guy Thouret <guy.thouret@wems.co.uk>
> Cc: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160411/522fff32/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-12  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 13:31 [U-Boot] [PATCH] env_eeprom invalidates gd->env_addr by setting it to an offset value Guy Thouret
2016-04-12  2:28 ` [U-Boot] " Tom Rini

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.