diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index ce38d3d049ef..c27dd1c936cd 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -390,14 +390,15 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) | |||
390 | #endif | 390 | #endif |
391 | 391 | ||
392 | bootloc = extp->TopBottom; | 392 | bootloc = extp->TopBottom; |
393 | if ((bootloc != 2) && (bootloc != 3)) { | 393 | if ((bootloc < 2) || (bootloc > 5)) { |
394 | printk(KERN_WARNING "%s: CFI does not contain boot " | 394 | printk(KERN_WARNING "%s: CFI contains unrecognised boot " |
395 | "bank location. Assuming top.\n", map->name); | 395 | "bank location (%d). Assuming bottom.\n", |
396 | bootloc, map->name); | ||
396 | bootloc = 2; | 397 | bootloc = 2; |
397 | } | 398 | } |
398 | 399 | ||
399 | if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) { | 400 | if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) { |
400 | printk(KERN_WARNING "%s: Swapping erase regions for broken CFI table.\n", map->name); | 401 | printk(KERN_WARNING "%s: Swapping erase regions for top-boot CFI table.\n", map->name); |
401 | 402 | ||
402 | for (i=0; i<cfi->cfiq->NumEraseRegions / 2; i++) { | 403 | for (i=0; i<cfi->cfiq->NumEraseRegions / 2; i++) { |
403 | int j = (cfi->cfiq->NumEraseRegions-1)-i; | 404 | int j = (cfi->cfiq->NumEraseRegions-1)-i; |