source: trunk/target/linux/generic/patches-2.6.32/086-mtd_m25p80_add_xxxs33b_support.patch @ 22643

Last change on this file since 22643 was 22643, checked in by juhosg, 6 years ago

generic: fix wrong number of erase sectors for xxxS33B SPI flashes

File size: 984 bytes
  • drivers/mtd/devices/m25p80.c

    a b static struct flash_info __devinitdata m 
    630630        { "en25p32", 0x1c2016, 0, 64 * 1024,  64, }, 
    631631        { "en25p64", 0x1c2017, 0, 64 * 1024, 128, }, 
    632632 
     633        /* Numonyx -- xxxs33b */ 
     634        { "160s33b",  0x898911, 0, 64 * 1024,  32, }, 
     635        { "320s33b",  0x898912, 0, 64 * 1024,  64, }, 
     636        { "640s33b",  0x898913, 0, 64 * 1024, 128, }, 
     637 
    633638        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    634639        { "pm25lv512",         0, 32 * 1024, 2, SECT_4K }, 
    635640        { "pm25lv010",         0, 32 * 1024, 4, SECT_4K }, 
    static int __devinit m25p_probe(struct s 
    784789        dev_set_drvdata(&spi->dev, flash); 
    785790 
    786791        /* 
    787          * Atmel serial flash tend to power up 
     792         * Atmel and Intel/Numonyx serial flash tend to power up 
    788793         * with the software protection bits set 
    789794         */ 
    790795 
    791         if (info->jedec_id >> 16 == 0x1f) { 
     796        if (info->jedec_id >> 16 == 0x1f || 
     797            info->jedec_id >> 16 == 0x89) { 
    792798                write_enable(flash); 
    793799                write_sr(flash, 0); 
    794800        } 
Note: See TracBrowser for help on using the repository browser.