rename target/linux/generic-2.6 to generic
[openwrt.git] / target / linux / generic / patches-2.6.32 / 086-mtd_m25p80_add_xxxs33b_support.patch
1 --- a/drivers/mtd/devices/m25p80.c
2 +++ b/drivers/mtd/devices/m25p80.c
3 @@ -630,6 +630,11 @@ static struct flash_info __devinitdata m
4         { "en25p32", 0x1c2016, 0, 64 * 1024,  64, },
5         { "en25p64", 0x1c2017, 0, 64 * 1024, 128, },
6  
7 +       /* Numonyx -- xxxs33b */
8 +       { "160s33b",  0x898911, 0, 64 * 1024,  64, },
9 +       { "320s33b",  0x898912, 0, 64 * 1024, 128, },
10 +       { "640s33b",  0x898913, 0, 64 * 1024, 256, },
11 +
12         /* PMC -- pm25x "blocks" are 32K, sectors are 4K */
13         { "pm25lv512",         0, 32 * 1024, 2, SECT_4K },
14         { "pm25lv010",         0, 32 * 1024, 4, SECT_4K },
15 @@ -784,11 +789,12 @@ static int __devinit m25p_probe(struct s
16         dev_set_drvdata(&spi->dev, flash);
17  
18         /*
19 -        * Atmel serial flash tend to power up
20 +        * Atmel and Intel/Numonyx serial flash tend to power up
21          * with the software protection bits set
22          */
23  
24 -       if (info->jedec_id >> 16 == 0x1f) {
25 +       if (info->jedec_id >> 16 == 0x1f ||
26 +           info->jedec_id >> 16 == 0x89) {
27                 write_enable(flash);
28                 write_sr(flash, 0);
29         }