Changeset 22861


Ignore:
Timestamp:
2010-08-31T22:06:38+02:00 (7 years ago)
Author:
juhosg
Message:

generic: fix erase operation on the pm25lv flash chip

Location:
trunk/target/linux/generic
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/patches-2.6.32/084-mtd_m25p80_add_pm25lv_flash_support.patch

    r22804 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -626,6 +626,10 @@ static struct flash_info __devinitdata m 
     3@@ -42,6 +42,7 @@ 
     4 #define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */ 
     5 #define        OPCODE_BE_32K           0x52    /* Erase 32KiB block */ 
     6 #define        OPCODE_CHIP_ERASE       0xc7    /* Erase whole flash chip */ 
     7+#define        OPCODE_BE_4K_ALT        0xd7    /* Erase 4KiB block */ 
     8 #define        OPCODE_SE               0xd8    /* Sector erase (usually 64KiB) */ 
     9 #define        OPCODE_RDID             0x9f    /* Read JEDEC ID */ 
     10  
     11@@ -599,6 +600,7 @@ struct flash_info { 
     12  
     13        u16             flags; 
     14 #define        SECT_4K         0x01            /* OPCODE_BE_4K works uniformly */ 
     15+#define        SECT_4K_ALT     0x02            /* OPCODE_BE_4K_ALT works uniformly */ 
     16 }; 
     17  
     18  
     19@@ -626,6 +628,10 @@ static struct flash_info __devinitdata m 
    420        { "mx25l12805d", 0xc22018, 0, 64 * 1024, 256, }, 
    521        { "mx25l12855e", 0xc22618, 0, 64 * 1024, 256, }, 
    622  
    723+       /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    8 +       { "pm25lv512", 0, 0, 32 * 1024, 2, SECT_4K }, 
    9 +       { "pm25lv010", 0, 0, 32 * 1024, 4, SECT_4K }, 
     24+       { "pm25lv512", 0, 0, 32 * 1024, 2, SECT_4K_ALT }, 
     25+       { "pm25lv010", 0, 0, 32 * 1024, 4, SECT_4K_ALT }, 
    1026+ 
    1127        /* Spansion -- single (large) sector size only, at least 
    1228         * for the chips listed here (without boot sectors). 
    1329         */ 
     30@@ -807,6 +813,9 @@ static int __devinit m25p_probe(struct s 
     31        if (info->flags & SECT_4K) { 
     32                flash->erase_opcode = OPCODE_BE_4K; 
     33                flash->mtd.erasesize = 4096; 
     34+       } else if (info->flags & SECT_4K_ALT) { 
     35+               flash->erase_opcode = OPCODE_BE_4K_ALT; 
     36+               flash->mtd.erasesize = 4096; 
     37        } else { 
     38                flash->erase_opcode = OPCODE_SE; 
     39                flash->mtd.erasesize = info->sector_size; 
  • trunk/target/linux/generic/patches-2.6.32/085-mtd_m25p80_add_en25pxx_support.patch

    r22804 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -626,6 +626,10 @@ static struct flash_info __devinitdata m 
     3@@ -628,6 +628,10 @@ static struct flash_info __devinitdata m 
    44        { "mx25l12805d", 0xc22018, 0, 64 * 1024, 256, }, 
    55        { "mx25l12855e", 0xc22618, 0, 64 * 1024, 256, }, 
     
    1010+ 
    1111        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    12         { "pm25lv512", 0, 0, 32 * 1024, 2, SECT_4K }, 
    13         { "pm25lv010", 0, 0, 32 * 1024, 4, SECT_4K }, 
     12        { "pm25lv512", 0, 0, 32 * 1024, 2, SECT_4K_ALT }, 
     13        { "pm25lv010", 0, 0, 32 * 1024, 4, SECT_4K_ALT }, 
  • trunk/target/linux/generic/patches-2.6.32/086-mtd_m25p80_add_xxxs33b_support.patch

    r22804 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -630,6 +630,11 @@ static struct flash_info __devinitdata m 
     3@@ -632,6 +632,11 @@ static struct flash_info __devinitdata m 
    44        { "en25p32", 0x1c2016, 0, 64 * 1024,  64, }, 
    55        { "en25p64", 0x1c2017, 0, 64 * 1024, 128, }, 
     
    1111+ 
    1212        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    13         { "pm25lv512", 0, 0, 32 * 1024, 2, SECT_4K }, 
    14         { "pm25lv010", 0, 0, 32 * 1024, 4, SECT_4K }, 
    15 @@ -784,11 +789,12 @@ static int __devinit m25p_probe(struct s 
     13        { "pm25lv512", 0, 0, 32 * 1024, 2, SECT_4K_ALT }, 
     14        { "pm25lv010", 0, 0, 32 * 1024, 4, SECT_4K_ALT }, 
     15@@ -786,11 +791,12 @@ static int __devinit m25p_probe(struct s 
    1616        dev_set_drvdata(&spi->dev, flash); 
    1717  
  • trunk/target/linux/generic/patches-2.6.32/087-mtd-m25p80-add-w25q32-chip-support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -687,6 +687,7 @@ static struct flash_info __devinitdata m 
     3@@ -689,6 +689,7 @@ static struct flash_info __devinitdata m 
    44        { "w25x80", 0xef3014, 0, 64 * 1024, 16, SECT_4K, }, 
    55        { "w25x16", 0xef3015, 0, 64 * 1024, 32, SECT_4K, }, 
  • trunk/target/linux/generic/patches-2.6.33/084-mtd_m25p80_add_pm25lv_flash_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -645,6 +645,10 @@ static const struct spi_device_id m25p_i 
     3@@ -40,6 +40,7 @@ 
     4 #define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */ 
     5 #define        OPCODE_BE_32K           0x52    /* Erase 32KiB block */ 
     6 #define        OPCODE_CHIP_ERASE       0xc7    /* Erase whole flash chip */ 
     7+#define        OPCODE_BE_4K_PMC        0xd7    /* Erase 4KiB block on PMC chips*/ 
     8 #define        OPCODE_SE               0xd8    /* Sector erase (usually 64KiB) */ 
     9 #define        OPCODE_RDID             0x9f    /* Read JEDEC ID */ 
     10  
     11@@ -599,6 +600,7 @@ struct flash_info { 
     12        u16             flags; 
     13 #define        SECT_4K         0x01            /* OPCODE_BE_4K works uniformly */ 
     14 #define        M25P_NO_ERASE   0x02            /* No erase command needed */ 
     15+#define        SECT_4K_PMC     0x04            /* OPCODE_BE_4K_PMC works uniformly */ 
     16 }; 
     17  
     18 #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags)     \ 
     19@@ -645,6 +647,10 @@ static const struct spi_device_id m25p_i 
    420        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    521        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
    622  
    723+       /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    8 +       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    9 +       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     24+       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     25+       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
    1026+ 
    1127        /* Spansion -- single (large) sector size only, at least 
    1228         * for the chips listed here (without boot sectors). 
    1329         */ 
     30@@ -857,6 +863,9 @@ static int __devinit m25p_probe(struct s 
     31        if (info->flags & SECT_4K) { 
     32                flash->erase_opcode = OPCODE_BE_4K; 
     33                flash->mtd.erasesize = 4096; 
     34+       } else if (info->flags & SECT_4K_PMC) { 
     35+               flash->erase_opcode = OPCODE_BE_4K_PMC; 
     36+               flash->mtd.erasesize = 4096; 
     37        } else { 
     38                flash->erase_opcode = OPCODE_SE; 
     39                flash->mtd.erasesize = info->sector_size; 
  • trunk/target/linux/generic/patches-2.6.33/085-mtd_m25p80_add_en25pxx_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -645,6 +645,10 @@ static const struct spi_device_id m25p_i 
     3@@ -647,6 +647,10 @@ static const struct spi_device_id m25p_i 
    44        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    55        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
     
    1010+ 
    1111        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    12         { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    13         { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     12        { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     13        { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
  • trunk/target/linux/generic/patches-2.6.33/086-mtd_m25p80_add_xxxs33b_support.patch

    r22643 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -649,6 +649,11 @@ static const struct spi_device_id m25p_i 
     3@@ -651,6 +651,11 @@ static const struct spi_device_id m25p_i 
    44        { "en25p32", INFO(0x1c2016, 0, 64 * 1024,  64, 0) }, 
    55        { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) }, 
     
    1111+ 
    1212        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    13         { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    14         { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
    15 @@ -833,11 +838,12 @@ static int __devinit m25p_probe(struct s 
     13        { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     14        { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
     15@@ -835,11 +840,12 @@ static int __devinit m25p_probe(struct s 
    1616        dev_set_drvdata(&spi->dev, flash); 
    1717  
  • trunk/target/linux/generic/patches-2.6.33/087-mtd-m25p80-add-w25q32-chip-support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -706,6 +706,7 @@ static const struct spi_device_id m25p_i 
     3@@ -708,6 +708,7 @@ static const struct spi_device_id m25p_i 
    44        { "w25x80", INFO(0xef3014, 0, 64 * 1024,  16, SECT_4K) }, 
    55        { "w25x16", INFO(0xef3015, 0, 64 * 1024,  32, SECT_4K) }, 
  • trunk/target/linux/generic/patches-2.6.34/084-mtd_m25p80_add_pm25lv_flash_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -646,6 +646,10 @@ static const struct spi_device_id m25p_i 
     3@@ -41,6 +41,7 @@ 
     4 #define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */ 
     5 #define        OPCODE_BE_32K           0x52    /* Erase 32KiB block */ 
     6 #define        OPCODE_CHIP_ERASE       0xc7    /* Erase whole flash chip */ 
     7+#define        OPCODE_BE_4K_PMC        0xd7    /* Erase 4KiB block on PMC chips*/ 
     8 #define        OPCODE_SE               0xd8    /* Sector erase (usually 64KiB) */ 
     9 #define        OPCODE_RDID             0x9f    /* Read JEDEC ID */ 
     10  
     11@@ -600,6 +601,7 @@ struct flash_info { 
     12        u16             flags; 
     13 #define        SECT_4K         0x01            /* OPCODE_BE_4K works uniformly */ 
     14 #define        M25P_NO_ERASE   0x02            /* No erase command needed */ 
     15+#define        SECT_4K_PMC     0x04            /* OPCODE_BE_4K_PMC works uniformly */ 
     16 }; 
     17  
     18 #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags)     \ 
     19@@ -646,6 +648,10 @@ static const struct spi_device_id m25p_i 
    420        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    521        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
    622  
    723+       /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    8 +       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    9 +       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     24+       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     25+       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
    1026+ 
    1127        /* Spansion -- single (large) sector size only, at least 
    1228         * for the chips listed here (without boot sectors). 
    1329         */ 
     30@@ -858,6 +864,9 @@ static int __devinit m25p_probe(struct s 
     31        if (info->flags & SECT_4K) { 
     32                flash->erase_opcode = OPCODE_BE_4K; 
     33                flash->mtd.erasesize = 4096; 
     34+       } else if (info->flags & SECT_4K_PMC) { 
     35+               flash->erase_opcode = OPCODE_BE_4K_PMC; 
     36+               flash->mtd.erasesize = 4096; 
     37        } else { 
     38                flash->erase_opcode = OPCODE_SE; 
     39                flash->mtd.erasesize = info->sector_size; 
  • trunk/target/linux/generic/patches-2.6.34/085-mtd_m25p80_add_en25pxx_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -646,6 +646,10 @@ static const struct spi_device_id m25p_i 
     3@@ -648,6 +648,10 @@ static const struct spi_device_id m25p_i 
    44        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    55        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
     
    1010+ 
    1111        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    12         { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    13         { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     12        { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     13        { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
  • trunk/target/linux/generic/patches-2.6.34/086-mtd_m25p80_add_xxxs33b_support.patch

    r22643 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -650,6 +650,11 @@ static const struct spi_device_id m25p_i 
     3@@ -652,6 +652,11 @@ static const struct spi_device_id m25p_i 
    44        { "en25p32", INFO(0x1c2016, 0, 64 * 1024,  64, 0) }, 
    55        { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) }, 
     
    1111+ 
    1212        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    13         { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    14         { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
    15 @@ -834,11 +839,12 @@ static int __devinit m25p_probe(struct s 
     13        { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     14        { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
     15@@ -836,11 +841,12 @@ static int __devinit m25p_probe(struct s 
    1616        dev_set_drvdata(&spi->dev, flash); 
    1717  
  • trunk/target/linux/generic/patches-2.6.34/087-mtd-m25p80-add-w25q32-chip-support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -707,6 +707,7 @@ static const struct spi_device_id m25p_i 
     3@@ -709,6 +709,7 @@ static const struct spi_device_id m25p_i 
    44        { "w25x80", INFO(0xef3014, 0, 64 * 1024,  16, SECT_4K) }, 
    55        { "w25x16", INFO(0xef3015, 0, 64 * 1024,  32, SECT_4K) }, 
  • trunk/target/linux/generic/patches-2.6.35/084-mtd_m25p80_add_pm25lv_flash_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -646,6 +646,10 @@ static const struct spi_device_id m25p_i 
     3@@ -41,6 +41,7 @@ 
     4 #define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */ 
     5 #define        OPCODE_BE_32K           0x52    /* Erase 32KiB block */ 
     6 #define        OPCODE_CHIP_ERASE       0xc7    /* Erase whole flash chip */ 
     7+#define        OPCODE_BE_4K_PMC        0xd7    /* Erase 4KiB block on PMC chips*/ 
     8 #define        OPCODE_SE               0xd8    /* Sector erase (usually 64KiB) */ 
     9 #define        OPCODE_RDID             0x9f    /* Read JEDEC ID */ 
     10  
     11@@ -600,6 +601,7 @@ struct flash_info { 
     12        u16             flags; 
     13 #define        SECT_4K         0x01            /* OPCODE_BE_4K works uniformly */ 
     14 #define        M25P_NO_ERASE   0x02            /* No erase command needed */ 
     15+#define        SECT_4K_PMC     0x04            /* OPCODE_BE_4K_PMC works uniformly */ 
     16 }; 
     17  
     18 #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags)     \ 
     19@@ -646,6 +648,10 @@ static const struct spi_device_id m25p_i 
    420        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    521        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
    622  
    723+       /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    8 +       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    9 +       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     24+       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     25+       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
    1026+ 
    1127        /* Spansion -- single (large) sector size only, at least 
    1228         * for the chips listed here (without boot sectors). 
    1329         */ 
     30@@ -858,6 +864,9 @@ static int __devinit m25p_probe(struct s 
     31        if (info->flags & SECT_4K) { 
     32                flash->erase_opcode = OPCODE_BE_4K; 
     33                flash->mtd.erasesize = 4096; 
     34+       } else if (info->flags & SECT_4K_PMC) { 
     35+               flash->erase_opcode = OPCODE_BE_4K_PMC; 
     36+               flash->mtd.erasesize = 4096; 
     37        } else { 
     38                flash->erase_opcode = OPCODE_SE; 
     39                flash->mtd.erasesize = info->sector_size; 
  • trunk/target/linux/generic/patches-2.6.35/085-mtd_m25p80_add_en25pxx_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -646,6 +646,10 @@ static const struct spi_device_id m25p_i 
     3@@ -648,6 +648,10 @@ static const struct spi_device_id m25p_i 
    44        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    55        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
     
    1010+ 
    1111        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    12         { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    13         { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     12        { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     13        { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
  • trunk/target/linux/generic/patches-2.6.35/086-mtd_m25p80_add_xxxs33b_support.patch

    r22643 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -650,6 +650,11 @@ static const struct spi_device_id m25p_i 
     3@@ -652,6 +652,11 @@ static const struct spi_device_id m25p_i 
    44        { "en25p32", INFO(0x1c2016, 0, 64 * 1024,  64, 0) }, 
    55        { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) }, 
     
    1111+ 
    1212        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    13         { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    14         { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
    15 @@ -834,11 +839,12 @@ static int __devinit m25p_probe(struct s 
     13        { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     14        { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
     15@@ -836,11 +841,12 @@ static int __devinit m25p_probe(struct s 
    1616        dev_set_drvdata(&spi->dev, flash); 
    1717  
  • trunk/target/linux/generic/patches-2.6.35/087-mtd-m25p80-add-w25q32-chip-support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -707,6 +707,7 @@ static const struct spi_device_id m25p_i 
     3@@ -709,6 +709,7 @@ static const struct spi_device_id m25p_i 
    44        { "w25x80", INFO(0xef3014, 0, 64 * 1024,  16, SECT_4K) }, 
    55        { "w25x16", INFO(0xef3015, 0, 64 * 1024,  32, SECT_4K) }, 
  • trunk/target/linux/generic/patches-2.6.36/084-mtd_m25p80_add_pm25lv_flash_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -646,6 +646,10 @@ static const struct spi_device_id m25p_i 
     3@@ -43,6 +43,7 @@ 
     4 #define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */ 
     5 #define        OPCODE_BE_32K           0x52    /* Erase 32KiB block */ 
     6 #define        OPCODE_CHIP_ERASE       0xc7    /* Erase whole flash chip */ 
     7+#define        OPCODE_BE_4K_PMC        0xd7    /* Erase 4KiB block on PMC chips*/ 
     8 #define        OPCODE_SE               0xd8    /* Sector erase (usually 64KiB) */ 
     9 #define        OPCODE_RDID             0x9f    /* Read JEDEC ID */ 
     10  
     11@@ -598,6 +599,7 @@ struct flash_info { 
     12        u16             flags; 
     13 #define        SECT_4K         0x01            /* OPCODE_BE_4K works uniformly */ 
     14 #define        M25P_NO_ERASE   0x02            /* No erase command needed */ 
     15+#define        SECT_4K_PMC     0x04            /* OPCODE_BE_4K_PMC works uniformly */ 
     16 }; 
     17  
     18 #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags)     \ 
     19@@ -654,6 +656,10 @@ static const struct spi_device_id m25p_i 
    420        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    521        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
    622  
    723+       /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    8 +       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    9 +       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     24+       { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     25+       { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
    1026+ 
    1127        /* Spansion -- single (large) sector size only, at least 
    1228         * for the chips listed here (without boot sectors). 
    1329         */ 
     30@@ -869,6 +875,9 @@ static int __devinit m25p_probe(struct s 
     31        if (info->flags & SECT_4K) { 
     32                flash->erase_opcode = OPCODE_BE_4K; 
     33                flash->mtd.erasesize = 4096; 
     34+       } else if (info->flags & SECT_4K_PMC) { 
     35+               flash->erase_opcode = OPCODE_BE_4K_PMC; 
     36+               flash->mtd.erasesize = 4096; 
     37        } else { 
     38                flash->erase_opcode = OPCODE_SE; 
     39                flash->mtd.erasesize = info->sector_size; 
  • trunk/target/linux/generic/patches-2.6.36/085-mtd_m25p80_add_en25pxx_support.patch

    r21952 r22861  
    11--- a/drivers/mtd/devices/m25p80.c 
    22+++ b/drivers/mtd/devices/m25p80.c 
    3 @@ -646,6 +646,10 @@ static const struct spi_device_id m25p_i 
     3@@ -656,6 +656,10 @@ static const struct spi_device_id m25p_i 
    44        { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, 
    55        { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, 
     
    1010+ 
    1111        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */ 
    12         { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K) }, 
    13         { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K) }, 
     12        { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, 
     13        { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) }, 
Note: See TracChangeset for help on using the changeset viewer.