Patchwork [U-Boot,v4,10/10] arm/km: fix u-boot update functionality

login
register
mail settings
Submitter Heiko Schocher
Date May 18, 2013, 9:38 a.m.
Message ID <1368869881-4398-11-git-send-email-hs@denx.de>
Download mbox | patch
Permalink /patch/244746/
State Accepted
Delegated to: Heiko Schocher
Headers show

Comments

Heiko Schocher - May 18, 2013, 9:38 a.m.
From: Holger Brunck <holger.brunck@keymile.com>

Due to the new I2C framework we need to adapt the u-boot update
function. Due to the new framework all i2c leafs behind a mux are
present in the system and not only those who are defined and used. So it
is bus number 5 after the rework.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>

---
- changes for v4:
  new in v4
---
 include/configs/km/km_arm.h | 3 ++-
 1 Datei geändert, 2 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
Prafulla Wadaskar - May 18, 2013, 9:47 a.m.
> -----Original Message-----
> From: Heiko Schocher [mailto:hs@denx.de]
> Sent: 18 May 2013 15:08
> To: u-boot@lists.denx.de
> Cc: Holger Brunck; Heiko Schocher; Prafulla Wadaskar
> Subject: [PATCH v4 10/10] arm/km: fix u-boot update
> functionality
> 
> From: Holger Brunck <holger.brunck@keymile.com>
> 
> Due to the new I2C framework we need to adapt the u-
> boot update
> function. Due to the new framework all i2c leafs behind
> a mux are
> present in the system and not only those who are
> defined and used. So it
> is bus number 5 after the rework.
> 
> Signed-off-by: Holger Brunck
> <holger.brunck@keymile.com>
> cc: Heiko Schocher <hs@denx.de>
> cc: Prafulla Wadaskar <prafulla@marvell.com>
> 
> ---
> - changes for v4:
>   new in v4
> ---
>  include/configs/km/km_arm.h | 3 ++-
>  1 Datei geändert, 2 Zeilen hinzugefügt(+), 1 Zeile
> entfernt(-)
> 
> diff --git a/include/configs/km/km_arm.h
> b/include/configs/km/km_arm.h
> index ebbfa84..4da54d5 100644
> --- a/include/configs/km/km_arm.h
> +++ b/include/configs/km/km_arm.h
> @@ -295,7 +295,8 @@ int get_scl(void);
>  #else
>  #define CONFIG_KM_NEW_ENV						\
>  	"newenv=setenv addr 0x100000 && "				\
> -		"i2c dev 1; mw.b ${addr} 0 4 && "			\
> +		"i2c dev "
> __stringify(CONFIG_I2C_ENV_EEPROM_BUS) "; "  \
> +		"mw.b ${addr} 0 4 && "					\
>  		"eeprom write "
> __stringify(CONFIG_SYS_DEF_EEPROM_ADDR)	\
>  		" ${addr} " __stringify(CONFIG_ENV_OFFSET) " 4
> && "	\
>  		"eeprom write "
> __stringify(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> --
> 1.7.11.7

Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>

Regards...
Prafulla . . .

Patch

diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index ebbfa84..4da54d5 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -295,7 +295,8 @@  int get_scl(void);
 #else
 #define CONFIG_KM_NEW_ENV						\
 	"newenv=setenv addr 0x100000 && "				\
-		"i2c dev 1; mw.b ${addr} 0 4 && "			\
+		"i2c dev " __stringify(CONFIG_I2C_ENV_EEPROM_BUS) "; "  \
+		"mw.b ${addr} 0 4 && "					\
 		"eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR)	\
 		" ${addr} " __stringify(CONFIG_ENV_OFFSET) " 4 && "	\
 		"eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR)	\