Patchwork [U-Boot,v3,2/8] arm/km: move CONFIG_EXTRA_ENV_SETTINGS from board to km_arm file

login
register
mail settings
Submitter Valentin Longchamp
Date May 4, 2011, 3:53 p.m.
Message ID <fda63da3df5fb74e5e2d8e23297c5f58c0236095.1304523385.git.valentin.longchamp@keymile.com>
Download mbox | patch
Permalink /patch/94080/
State Changes Requested
Delegated to: Albert ARIBAUD
Headers show

Comments

Valentin Longchamp - May 4, 2011, 3:53 p.m.
Since all the boards define the same env settings, this simplifies
the board files.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
---
changes for v3:
	- this patch is new in the series

 include/configs/km_arm.h    |   15 +++++++++++++++
 include/configs/mgcoge2un.h |   15 ---------------
 include/configs/suen3.h     |   15 ---------------
 include/configs/suen8.h     |   15 ---------------
 4 files changed, 15 insertions(+), 45 deletions(-)
Prafulla Wadaskar - May 12, 2011, 10:41 a.m.
> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp@keymile.com]
> Sent: Wednesday, May 04, 2011 9:24 PM
> To: u-boot@lists.denx.de
> Cc: holger.brunck@keymile.com; Prafulla Wadaskar; Valentin Longchamp;
> Heiko Schocher; Wolfgang Denk; Detlev Zundel
> Subject: [PATCH v3 2/8] arm/km: move CONFIG_EXTRA_ENV_SETTINGS from
> board to km_arm file
> 
> Since all the boards define the same env settings, this simplifies
> the board files.
> 
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Holger Brunck <holger.brunck@keymile.com>
> cc: Heiko Schocher <hs@denx.de>
> cc: Wolfgang Denk <wd@denx.de>
> cc: Detlev Zundel <dzu@denx.de>
> cc: Prafulla Wadaskar <prafulla@marvell.com>
> ---
> changes for v3:
> 	- this patch is new in the series
> 
>  include/configs/km_arm.h    |   15 +++++++++++++++
>  include/configs/mgcoge2un.h |   15 ---------------
>  include/configs/suen3.h     |   15 ---------------
>  include/configs/suen8.h     |   15 ---------------
>  4 files changed, 15 insertions(+), 45 deletions(-)
> 
> diff --git a/include/configs/km_arm.h b/include/configs/km_arm.h
> index 70113d4..313a7f8 100644
> --- a/include/configs/km_arm.h
> +++ b/include/configs/km_arm.h
> @@ -242,6 +242,21 @@ int get_scl (void);
>  		"sf write ${u-boot_addr_r} 0 ${filesize};"		\
>  		"spi off\0"
> 
> +/*
> + * Default environment variables
> + */
> +#define CONFIG_EXTRA_ENV_SETTINGS					\
> +	CONFIG_KM_DEF_ENV						\
> +	"newenv=setenv addr 0x100000 && "				\
> +		"i2c dev 1; mw.b ${addr} 0 4 && "			\
> +		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> +		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
> +		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> +		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
> +	"rootpath=/opt/eldk/arm\0"					\
> +	"EEprom_ivm=" KM_IVM_BUS "\0"					\
> +	""
> +
>  #if defined(CONFIG_SYS_NO_FLASH)
>  #define CONFIG_KM_UBI_PARTITION_NAME   "ubi0"
>  #undef	CONFIG_FLASH_CFI_MTD
> diff --git a/include/configs/mgcoge2un.h b/include/configs/mgcoge2un.h
> index d3c7bdc..876ac34 100644
> --- a/include/configs/mgcoge2un.h
> +++ b/include/configs/mgcoge2un.h
> @@ -47,19 +47,4 @@
>  #define KM_IVM_BUS	"pca9547:70:9" /* I2C2 (Mux-Port 1)*/
>  #define KM_ENV_BUS	"pca9547:70:d" /* I2C2 (Mux-Port 5)*/
> 
> -/*
> - * Default environment variables
> - */
> -#define CONFIG_EXTRA_ENV_SETTINGS					\
> -	CONFIG_KM_DEF_ENV						\
> -	"newenv=setenv addr 0x100000 && "				\
> -		"i2c dev 1; mw.b ${addr} 0 4 && "			\
> -		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> -		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
> -		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> -		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
> -	"rootpath=/opt/eldk/arm\0"					\
> -	"EEprom_ivm=" KM_IVM_BUS "\0"					\
> -	""
> -
>  #endif /* _CONFIG_MGCOGE2UN_H */
> diff --git a/include/configs/suen3.h b/include/configs/suen3.h
> index 2b6f19e..7d7a4ff 100644
> --- a/include/configs/suen3.h
> +++ b/include/configs/suen3.h
> @@ -46,19 +46,4 @@
>  #define KM_IVM_BUS	"pca9544a:70:9"	/* I2C2 (Mux-Port 1)*/
>  #define KM_ENV_BUS	"pca9544a:70:d"	/* I2C2 (Mux-Port 5)*/
> 
> -/*
> - * Default environment variables
> - */
> -#define CONFIG_EXTRA_ENV_SETTINGS					\
> -	CONFIG_KM_DEF_ENV						\
> -	"newenv=setenv addr 0x100000 && "				\
> -		"i2c dev 1; mw.b ${addr} 0 4 && "			\
> -		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> -		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
> -		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> -		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
> -	"rootpath=/opt/eldk/arm\0"					\
> -	"EEprom_ivm=" KM_IVM_BUS "\0"					\
> -	""
> -
>  #endif /* _CONFIG_SUEN3_H */
> diff --git a/include/configs/suen8.h b/include/configs/suen8.h
> index 3f60bc3..28c8a0b 100644
> --- a/include/configs/suen8.h
> +++ b/include/configs/suen8.h
> @@ -47,19 +47,4 @@
>  #define KM_IVM_BUS	"pca9544a:70:9" /* I2C2 (Mux-Port 1)*/
>  #define KM_ENV_BUS	"pca9544a:70:d" /* I2C2 (Mux-Port 5)*/
> 
> -/*
> - * Default environment variables
> - */
> -#define CONFIG_EXTRA_ENV_SETTINGS					\
> -	CONFIG_KM_DEF_ENV						\
> -	"newenv=setenv addr 0x100000 && "				\
> -		"i2c dev 1; mw.b ${addr} 0 4 && "			\
> -		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> -		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
> -		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
> -		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
> -	"rootpath=/opt/eldk/arm\0"					\
> -	"EEprom_ivm=" KM_IVM_BUS "\0"					\
> -	""
> -
>  #endif /* _CONFIG_SUEN8_H */
> --

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

Regards..
Prafulla . .

Patch

diff --git a/include/configs/km_arm.h b/include/configs/km_arm.h
index 70113d4..313a7f8 100644
--- a/include/configs/km_arm.h
+++ b/include/configs/km_arm.h
@@ -242,6 +242,21 @@  int get_scl (void);
 		"sf write ${u-boot_addr_r} 0 ${filesize};"		\
 		"spi off\0"
 
+/*
+ * Default environment variables
+ */
+#define CONFIG_EXTRA_ENV_SETTINGS					\
+	CONFIG_KM_DEF_ENV						\
+	"newenv=setenv addr 0x100000 && "				\
+		"i2c dev 1; mw.b ${addr} 0 4 && "			\
+		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
+		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
+		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
+		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
+	"rootpath=/opt/eldk/arm\0"					\
+	"EEprom_ivm=" KM_IVM_BUS "\0"					\
+	""
+
 #if defined(CONFIG_SYS_NO_FLASH)
 #define CONFIG_KM_UBI_PARTITION_NAME   "ubi0"
 #undef	CONFIG_FLASH_CFI_MTD
diff --git a/include/configs/mgcoge2un.h b/include/configs/mgcoge2un.h
index d3c7bdc..876ac34 100644
--- a/include/configs/mgcoge2un.h
+++ b/include/configs/mgcoge2un.h
@@ -47,19 +47,4 @@ 
 #define KM_IVM_BUS	"pca9547:70:9" /* I2C2 (Mux-Port 1)*/
 #define KM_ENV_BUS	"pca9547:70:d" /* I2C2 (Mux-Port 5)*/
 
-/*
- * Default environment variables
- */
-#define CONFIG_EXTRA_ENV_SETTINGS					\
-	CONFIG_KM_DEF_ENV						\
-	"newenv=setenv addr 0x100000 && "				\
-		"i2c dev 1; mw.b ${addr} 0 4 && "			\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
-	"rootpath=/opt/eldk/arm\0"					\
-	"EEprom_ivm=" KM_IVM_BUS "\0"					\
-	""
-
 #endif /* _CONFIG_MGCOGE2UN_H */
diff --git a/include/configs/suen3.h b/include/configs/suen3.h
index 2b6f19e..7d7a4ff 100644
--- a/include/configs/suen3.h
+++ b/include/configs/suen3.h
@@ -46,19 +46,4 @@ 
 #define KM_IVM_BUS	"pca9544a:70:9"	/* I2C2 (Mux-Port 1)*/
 #define KM_ENV_BUS	"pca9544a:70:d"	/* I2C2 (Mux-Port 5)*/
 
-/*
- * Default environment variables
- */
-#define CONFIG_EXTRA_ENV_SETTINGS					\
-	CONFIG_KM_DEF_ENV						\
-	"newenv=setenv addr 0x100000 && "				\
-		"i2c dev 1; mw.b ${addr} 0 4 && "			\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
-	"rootpath=/opt/eldk/arm\0"					\
-	"EEprom_ivm=" KM_IVM_BUS "\0"					\
-	""
-
 #endif /* _CONFIG_SUEN3_H */
diff --git a/include/configs/suen8.h b/include/configs/suen8.h
index 3f60bc3..28c8a0b 100644
--- a/include/configs/suen8.h
+++ b/include/configs/suen8.h
@@ -47,19 +47,4 @@ 
 #define KM_IVM_BUS	"pca9544a:70:9" /* I2C2 (Mux-Port 1)*/
 #define KM_ENV_BUS	"pca9544a:70:d" /* I2C2 (Mux-Port 5)*/
 
-/*
- * Default environment variables
- */
-#define CONFIG_EXTRA_ENV_SETTINGS					\
-	CONFIG_KM_DEF_ENV						\
-	"newenv=setenv addr 0x100000 && "				\
-		"i2c dev 1; mw.b ${addr} 0 4 && "			\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"	\
-	"rootpath=/opt/eldk/arm\0"					\
-	"EEprom_ivm=" KM_IVM_BUS "\0"					\
-	""
-
 #endif /* _CONFIG_SUEN8_H */