[U-Boot-Users] [PATCH] HEAD cmd_falsh.c for m68k tool chain

CHANGELOG entry:
* Patch by Jens Scharsig, 28 July 2005
- fix some compiler/parser error, if using m68k tool chain - optical fix for protect on/off all messages, if using more then one bank
Best regards,
Jens Scharsig
Index: common/cmd_flash.c =================================================================== RCS file: /cvsroot/u-boot/u-boot/common/cmd_flash.c,v retrieving revision 1.13 diff -p -u -r1.13 cmd_flash.c --- common/cmd_flash.c 15 Jul 2005 22:47:24 -0000 1.13 +++ common/cmd_flash.c 28 Jul 2005 12:32:00 -0000 @@ -117,11 +117,15 @@ static int addr_spec(char *arg1, char *arg2, ulong *addr_first, ulong *addr_last) { char *ep; + char len_used; /* indicates if the "start +length" form used */ + char found; + ulong bank; + *addr_first = simple_strtoul(arg1, &ep, 16); if (ep == arg1 || *ep != '\0') - return -1; - - char len_used = 0; /* indicates if the "start +length" form used */ + return -1; + + len_used = 0; /* indicates if the "start +length" form used */ if (arg2 && *arg2 == '+'){ len_used = 1; ++arg2; @@ -146,8 +150,7 @@ addr_spec(char *arg1, char *arg2, ulong */
/* find the end addr of the sector where the *addr_last is */ - char found = 0; - ulong bank; + found = 0; for (bank = 0; bank < CFG_MAX_FLASH_BANKS && !found; ++bank){ int i; flash_info_t *info = &flash_info[bank]; @@ -453,12 +456,10 @@ int do_protect (cmd_tbl_t *cmdtp, int fl info->protect[i] = p; #endif /* CFG_FLASH_PROTECTION */ } - } - #if defined(CFG_FLASH_PROTECTION) - if (!rcode) puts (" done\n"); + if (!rcode) puts (" done\n"); #endif /* CFG_FLASH_PROTECTION */ - + } return rcode; }

Dear Jens,
in message dcajl9$hub$1@sea.gmane.org you wrote:
Patch by Jens Scharsig, 28 July 2005
- fix some compiler/parser error, if using m68k tool chain
Thanks - I think these fixes have been applied since - please confirm.
- optical fix for protect on/off all messages, if using more then one bank
I have to admit that I don't understand which sort of problem your patch is supposed to fix. Please explain.
Best regards,
Wolfgang Denk

Wolfgang Denk schrieb:
Dear Jens,
in message dcajl9$hub$1@sea.gmane.org you wrote:
Patch by Jens Scharsig, 28 July 2005
- fix some compiler/parser error, if using m68k tool chain
Thanks - I think these fixes have been applied since - please confirm.
The problem don't exist at current git arcive anymore. I think the state is FIXED
- optical fix for protect on/off all messages, if using more then one bank
I have to admit that I don't understand which sort of problem your patch is supposed to fix. Please explain.
If you have more than one flash bank and you are use the command "protect off all" or "protect on all", the output is fail formated (some newline chars missed). This patch gets a better format:
EV123 U-Boot> protect off all Un-Protect Flash Bank # 1 ................................ done Un-Protect Flash Bank # 2 ................................... done
Best regards,
Wolfgang Denk
participants (2)
-
Jens Scharsig
-
Wolfgang Denk