X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fupdater%2Fflash.c;h=5be5f1b099645ee32e09f616773ae4bec3c44acc;hb=aa7f281ce4af14a95f1df88bf32d828562fb4604;hp=32a17677aaf97bdc9de2a8ebfaf5065e36d96e66;hpb=e6f2e902334d5ee65bab9cf8292cf668243531e9;p=u-boot diff --git a/tools/updater/flash.c b/tools/updater/flash.c index 32a17677aa..5be5f1b099 100644 --- a/tools/updater/flash.c +++ b/tools/updater/flash.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000 + * (C) Copyright 2000-2006 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -66,18 +66,18 @@ flash_protect (int flag, ulong from, ulong to, flash_info_t *info) */ if (from <= end && to >= info->start[i]) { if (flag & FLAG_PROTECT_CLEAR) { -#if defined(CFG_FLASH_PROTECTION) +#if defined(CONFIG_SYS_FLASH_PROTECTION) flash_real_protect(info, i, 0); #else info->protect[i] = 0; -#endif /* CFG_FLASH_PROTECTION */ +#endif /* CONFIG_SYS_FLASH_PROTECTION */ } else if (flag & FLAG_PROTECT_SET) { -#if defined(CFG_FLASH_PROTECTION) +#if defined(CONFIG_SYS_FLASH_PROTECTION) flash_real_protect(info, i, 1); #else info->protect[i] = 1; -#endif /* CFG_FLASH_PROTECTION */ +#endif /* CONFIG_SYS_FLASH_PROTECTION */ } } } @@ -93,7 +93,7 @@ addr2info (ulong addr) flash_info_t *info; int i; - for (i=0, info=&flash_info[0]; iflash_id != FLASH_UNKNOWN && addr >= info->start[0] && /* WARNING - The '- 1' is needed if the flash @@ -124,7 +124,7 @@ addr2info (ulong addr) * (only some targets require alignment) */ int -flash_write (uchar *src, ulong addr, ulong cnt) +flash_write (char *src, ulong addr, ulong cnt) { #ifdef CONFIG_SPD823TS return (ERR_TIMOUT); /* any other error codes are possible as well */