[U-Boot-Users] [PATCH] complains on bad CFG_MAX_FLASH_SECT description

Hello,
this Patch complains if the macro CFG_MAX_FLASH_SECT is smaller than the truly available flash sectors.
best regards Mirco
Signed-off-by: Mirco Fuchs mircofuchs@web.de
---
--- u-boot_1.1.4/u-boot-1.1.4/drivers/cfi_flash.c 2006-03-12 02:13:21.000000000 +0100 +++ u-boot-1.1.4/drivers/cfi_flash.c 2006-04-27 17:41:54.495071792 +0200 @@ -1131,6 +1131,10 @@ ulong flash_get_size (ulong base, int ba erase_region_count = (tmp & 0xffff) + 1; debug ("erase_region_count = %d erase_region_size = %d\n", erase_region_count, erase_region_size); + if (erase_region_count > CFG_MAX_FLASH_SECT) { + printf ("*** Warning - nbr. of erase regions > CFG_MAX_FLASH_SECT\n"); + return 0; + } for (j = 0; j < erase_region_count; j++) { info->start[sect_cnt] = sector; sector += (erase_region_size * size_ratio);
participants (1)
-
Mirco Fuchs