[ar71xx] experimental support for the Planex MZK-W04NU board
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.21 / 007-samsung_flash.patch
1 Index: linux-2.6.21.7/drivers/mtd/chips/cfi_cmdset_0002.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/drivers/mtd/chips/cfi_cmdset_0002.c
4 +++ linux-2.6.21.7/drivers/mtd/chips/cfi_cmdset_0002.c
5 @@ -51,6 +51,7 @@
6 #define SST49LF040B 0x0050
7 #define SST49LF008A 0x005a
8 #define AT49BV6416 0x00d6
9 +#define MANUFACTURER_SAMSUNG 0x00ec
10
11 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
12 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
13 @@ -294,12 +295,19 @@ struct mtd_info *cfi_cmdset_0002(struct
14
15 if (extp->MajorVersion != '1' ||
16 (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
17 - printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
18 - "version %c.%c.\n", extp->MajorVersion,
19 - extp->MinorVersion);
20 - kfree(extp);
21 - kfree(mtd);
22 - return NULL;
23 + if (cfi->mfr == MANUFACTURER_SAMSUNG &&
24 + (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
25 + printk(KERN_NOTICE " Newer Samsung flash detected, "
26 + "should be compatibile with Amd/Fujitsu.\n");
27 + }
28 + else {
29 + printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
30 + "version %c.%c.\n", extp->MajorVersion,
31 + extp->MinorVersion);
32 + kfree(extp);
33 + kfree(mtd);
34 + return NULL;
35 + }
36 }
37
38 /* Install our own private info structure */
This page took 0.041978 seconds and 5 git commands to generate.