mtd: cfi_cmdset_0002: Tone down warning messages about TopBottom CFI field
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu May 13 21:59:02 EDT 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=412da2f6e083eba6e4bd91ff2e78abb4735357a7
Commit: 412da2f6e083eba6e4bd91ff2e78abb4735357a7
Parent: 564b84978df2bf83d334940f1a1190702579f79f
Author: David Woodhouse <David.Woodhouse at intel.com>
AuthorDate: Fri May 14 01:35:54 2010 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri May 14 01:39:20 2010 +0100
mtd: cfi_cmdset_0002: Tone down warning messages about TopBottom CFI field
Accept values of 2-5 for TopBottom, where the newly-added 4 and 5 values
mean a uniform layout. It does indicate WP layout but we don't handle that.
Also don't say "broken" when swapping erase regions in a top-boot chip.
That got retrospectively documented in the spec.
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
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 ce38d3d..c27dd1c 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)
#endif
bootloc = extp->TopBottom;
- if ((bootloc != 2) && (bootloc != 3)) {
- printk(KERN_WARNING "%s: CFI does not contain boot "
- "bank location. Assuming top.\n", map->name);
+ if ((bootloc < 2) || (bootloc > 5)) {
+ printk(KERN_WARNING "%s: CFI contains unrecognised boot "
+ "bank location (%d). Assuming bottom.\n",
+ bootloc, map->name);
bootloc = 2;
}
if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) {
- printk(KERN_WARNING "%s: Swapping erase regions for broken CFI table.\n", map->name);
+ printk(KERN_WARNING "%s: Swapping erase regions for top-boot CFI table.\n", map->name);
for (i=0; i<cfi->cfiq->NumEraseRegions / 2; i++) {
int j = (cfi->cfiq->NumEraseRegions-1)-i;
More information about the linux-mtd-cvs
mailing list