aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/chips/cfi_cmdset_0002.c
diff options
context:
space:
mode:
authorTodd Poynor <tpoynor@mvista.com>2005-07-20 22:01:17 +0100
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-08-04 12:49:25 +0200
commitd88f977b85d251f548add3d0a76fc186f99b1b21 (patch)
tree4c8aecff90397868914a286af6328b08cc911e54 /drivers/mtd/chips/cfi_cmdset_0002.c
parentd95a1b4818f2fe38a3cfc9a7d5817dc9a1a69329 (diff)
[MTD] CHIPS: Recognize Spansion CFI 1.4 chips
Modify Amd/Fujitsu CFI NOR flash primary vendor extension table revision check to recognize version 1.4. Verified the existing driver can handle version 1.4 chips without additional info from 1.4 extended table. Move the primary vendor extension table revision check from common file to the 3 CFI chip driver files, since the data structures and revisions handled by those data structures are specific to the chip driver. Modify the error message printed when the revision is unknown to be a KERN_ERR instead of WARNING since this will cause mtd to ignore the chip. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0002.c')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 8505f118f2d..e3d31c74904 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -17,7 +17,7 @@
*
* This code is GPL
*
- * $Id: cfi_cmdset_0002.c,v 1.118 2005/07/04 22:34:29 gleixner Exp $
+ * $Id: cfi_cmdset_0002.c,v 1.120 2005/07/20 21:01:13 tpoynor Exp $
*
*/
@@ -253,6 +253,16 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
return NULL;
}
+ if (extp->MajorVersion != '1' ||
+ (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
+ printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
+ "version %c.%c.\n", extp->MajorVersion,
+ extp->MinorVersion);
+ kfree(extp);
+ kfree(mtd);
+ return NULL;
+ }
+
/* Install our own private info structure */
cfi->cmdset_priv = extp;