schmoogie: fix build error due to removal of forceenv()
PATCH 1/1 schmoogie: fix build error due to removal of forceenv()
commit 6d014adf dropped support for the forceenv() function, but failed to remove references to it from board/davinci/schmoogie/schmoogie.c
Replace forceenv() by setenv() and set CONFIG_ENV_OVERWRITE instead in the board config file to allow overwriting the serial number.
--- board/davinci/schmoogie/schmoogie.c | 8 ++++---- include/configs/davinci-schmoogie.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
board/davinci/schmoogie/schmoogie.c +4 -4
@@ -107,12 +107,12 @@ int misc_init_r(void)/* Set serial number from UID chip */ if (i2c_read (CONFIG_SYS_UID_ADDR ,0 ,1 , buf,8 )) {printf ("\nUID @ 0x%02x read FAILED!!!\n" ,CONFIG_SYS_UID_ADDR ); -forceenv ("serial#" ,"FAILED" ); +setenv ("serial#" ,"FAILED" ); }else {if (buf[0 ] !=0x70 ) {/* Device Family Code */ printf ("\nUID @ 0x%02x read FAILED!!!\n" ,CONFIG_SYS_UID_ADDR ); -forceenv ("serial#" ,"FAILED" ); +setenv ("serial#" ,"FAILED" ); } }/* Now check CRC */
@@ -122,12 +122,12 @@ int misc_init_r(void)if (tmp[0 ] !=0 ) {printf ("\nUID @ 0x%02x - BAD CRC!!!\n" ,CONFIG_SYS_UID_ADDR ); -forceenv ("serial#" ,"FAILED" ); +setenv ("serial#" ,"FAILED" ); }else {/* CRC OK, set "serial" env variable */ sprintf ((char *)&tmp[0 ],"%02x%02x%02x%02x%02x%02x" , buf[6 ], buf[5 ], buf[4 ], buf[3 ], buf[2 ], buf[1 ]); -forceenv ("serial#" , (char *)&tmp[0 ]); +setenv ("serial#" , (char *)&tmp[0 ]); }return (0 );
include/configs/davinci-schmoogie.h +1 -0
@@ -83,6 +83,7 @@/*=====================*/ #undef CONFIG_ENV_IS_IN_FLASH#define CONFIG_SYS_NO_FLASH +#define CONFIG_ENV_OVERWRITE /* instead if obsoleted forceenv() */ #define CONFIG_NAND_DAVINCI #define CONFIG_SYS_NAND_CS 2#define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */
Signature · 1 line
1.7.2.3
PATCH 1/1 schmoogie: fix build error due to removal of forceenv()
On Tue, 5 Oct 2010, Wolfgang Denk wrote:
---
Quoted 62 lines
commit
6d014adfdropped support for theforceenv()function, but failed to remove references to it fromboard/davinci/schmoogie/schmoogie.cReplace
forceenv()bysetenv()and setCONFIG_ENV_OVERWRITEinstead in the board config file to allow overwriting the serial number.Signed-off-by Wolfgang Denk <[email protected]>Cc Sergey Kubushyn <[email protected]>---
board/davinci/schmoogie/schmoogie.c | 8 ++++---- include/configs/davinci-schmoogie.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)board/davinci/schmoogie/schmoogie.c +4
-4@@ -107,12 +107,12 @@ int misc_init_r(void)/* Set serial number from UID chip */ if (i2c_read (CONFIG_SYS_UID_ADDR ,0 ,1 , buf,8 )) {printf ("\nUID @ 0x%02x read FAILED!!!\n" ,CONFIG_SYS_UID_ADDR ); -forceenv ("serial#" ,"FAILED" ); +setenv ("serial#" ,"FAILED" ); }else {if (buf[0 ] !=0x70 ) {/* Device Family Code */ printf ("\nUID @ 0x%02x read FAILED!!!\n" ,CONFIG_SYS_UID_ADDR ); -forceenv ("serial#" ,"FAILED" ); +setenv ("serial#" ,"FAILED" ); } }/* Now check CRC */ @@ -122,12 +122,12 @@ int misc_init_r(void)if (tmp[0 ] !=0 ) {printf ("\nUID @ 0x%02x - BAD CRC!!!\n" ,CONFIG_SYS_UID_ADDR ); -forceenv ("serial#" ,"FAILED" ); +setenv ("serial#" ,"FAILED" ); }else {/* CRC OK, set "serial" env variable */ sprintf ((char *)&tmp[0 ],"%02x%02x%02x%02x%02x%02x" , buf[6 ], buf[5 ], buf[4 ], buf[3 ], buf[2 ], buf[1 ]); -forceenv ("serial#" , (char *)&tmp[0 ]); +setenv ("serial#" , (char *)&tmp[0 ]); }return (0 );include/configs/davinci-schmoogie.h +1
-0@@ -83,6 +83,7 @@/*=====================*/ #undef CONFIG_ENV_IS_IN_FLASH#define CONFIG_SYS_NO_FLASH +#define CONFIG_ENV_OVERWRITE /* instead if obsoleted forceenv() */ #define CONFIG_NAND_DAVINCI #define CONFIG_SYS_NAND_CS 2#define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ Signature · 1 line
1.7.2.3
---
******************************************************************
* KSI at home KOI8 Net < > The impossible we do immediately. *
* Las Vegas NV, USA < > Miracles require 24-hour notice. *
******************************************************************
Paulraj
PATCH 1/1 schmoogie: fix build error due to removal of forceenv()
Quoted 15 lines · Wolfgang Denk
---
Quoted 7 lines
commit
6d014adfdropped support for theforceenv()function, but failed to remove references to it fromboard/davinci/schmoogie/schmoogie.cReplace
forceenv()bysetenv()and setCONFIG_ENV_OVERWRITEinstead in the board config file to allow overwriting the serial number.Signed-off-by Wolfgang Denk <[email protected]>
Thanks
I'll add it to u-boot-ti
Sandeep
Wolfgang Denk
AppliedPATCH 1/1 schmoogie: fix build error due to removal of forceenv()
In reply to Wolfgang DenkQuoted 6 lines · In message <[email protected]> you wrote:
commit
6d014adfdropped support for theforceenv()function, but failed to remove references to it fromboard/davinci/schmoogie/schmoogie.cReplace
forceenv()bysetenv()and setCONFIG_ENV_OVERWRITEinstead in the board config file to allow overwriting the serial number.
Quoted 6 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Sergey Kubushyn <[email protected]>--- board/davinci/schmoogie/schmoogie.c | 8 ++++---- include/configs/davinci-schmoogie.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
Applied.
Sandeep, I hope this is OK with you. Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only person who always got his work done by Friday
was Robinson Crusoe.