ar71xx: fix 320S33B flash chip support
authorGabor Juhos <juhosg@openwrt.org>
Wed, 13 Jan 2010 06:52:12 +0000 (06:52 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 13 Jan 2010 06:52:12 +0000 (06:52 +0000)
SVN-Revision: 19114

target/linux/ar71xx/patches-2.6.30/106-mtd_m25p80_add_xxxs33b_support.patch
target/linux/ar71xx/patches-2.6.30/109-mtd-wrt160nl-trx-parser.patch
target/linux/ar71xx/patches-2.6.31/106-mtd_m25p80_add_xxxs33b_support.patch
target/linux/ar71xx/patches-2.6.31/109-mtd-wrt160nl-trx-parser.patch
target/linux/ar71xx/patches-2.6.32/106-mtd_m25p80_add_xxxs33b_support.patch
target/linux/ar71xx/patches-2.6.32/109-mtd-wrt160nl-trx-parser.patch

index 68f17596fe2a522da6f8982fec3c2c616859d4a9..5bd20a7692c38626d484f4a7e416c9b7eea6081c 100644 (file)
        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */
        { "pm25lv512",         0, 32 * 1024, 2, SECT_4K },
        { "pm25lv010",         0, 32 * 1024, 4, SECT_4K },
+@@ -656,11 +661,12 @@ static int __devinit m25p_probe(struct s
+       dev_set_drvdata(&spi->dev, flash);
+       /*
+-       * Atmel serial flash tend to power up
++       * Atmel and Intel/Numonyx serial flash tend to power up
+        * with the software protection bits set
+        */
+-      if (info->jedec_id >> 16 == 0x1f) {
++      if (info->jedec_id >> 16 == 0x1f ||
++          info->jedec_id >> 16 == 0x89) {
+               write_enable(flash);
+               write_sr(flash, 0);
+       }
index 749c1d70dca2110a5fe49dd7d98fa30348a9c809..5696d3965164ea08822fe3796087b3e5b5db5513 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -751,6 +751,16 @@ static int __devinit m25p_probe(struct s
+@@ -752,6 +752,16 @@ static int __devinit m25p_probe(struct s
                                        part_probes, &parts, 0);
                }
  #endif
index e4e01637d66bddff7ad64dd615e5937a006842ed..dfd855a499330d61649ce4a547f4cd5abb8ade67 100644 (file)
        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */
        { "pm25lv512",         0, 32 * 1024, 2, SECT_4K },
        { "pm25lv010",         0, 32 * 1024, 4, SECT_4K },
+@@ -660,11 +665,12 @@ static int __devinit m25p_probe(struct s
+       dev_set_drvdata(&spi->dev, flash);
+       /*
+-       * Atmel serial flash tend to power up
++       * Atmel and Intel/Numonyx serial flash tend to power up
+        * with the software protection bits set
+        */
+-      if (info->jedec_id >> 16 == 0x1f) {
++      if (info->jedec_id >> 16 == 0x1f ||
++          info->jedec_id >> 16 == 0x89) {
+               write_enable(flash);
+               write_sr(flash, 0);
+       }
index 4ab53a48d082cf36a6c9a23a031d9c666feac4bc..ccf4b66b603e1325598889e3533c6b2313679fb4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -755,6 +755,16 @@ static int __devinit m25p_probe(struct s
+@@ -756,6 +756,16 @@ static int __devinit m25p_probe(struct s
                                        part_probes, &parts, 0);
                }
  #endif
index 01be5dbb4e14ab218ddac7162289727c2edfb7c8..8f1a842beb369da24117fc3a205104b99aec503d 100644 (file)
        /* PMC -- pm25x "blocks" are 32K, sectors are 4K */
        { "pm25lv512",         0, 32 * 1024, 2, SECT_4K },
        { "pm25lv010",         0, 32 * 1024, 4, SECT_4K },
+@@ -789,11 +794,12 @@ static int __devinit m25p_probe(struct s
+       dev_set_drvdata(&spi->dev, flash);
+       /*
+-       * Atmel serial flash tend to power up
++       * Atmel and Intel/Numonyx serial flash tend to power up
+        * with the software protection bits set
+        */
+-      if (info->jedec_id >> 16 == 0x1f) {
++      if (info->jedec_id >> 16 == 0x1f ||
++          info->jedec_id >> 16 == 0x89) {
+               write_enable(flash);
+               write_sr(flash, 0);
+       }
index 4136db8e9a4befb27b21850a46c074cc1dfcad99..b4eab674a9d893e19207dd6b72c059bb2d6102be 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -889,6 +889,16 @@ static int __devinit m25p_probe(struct s
+@@ -890,6 +890,16 @@ static int __devinit m25p_probe(struct s
                                        part_probes, &parts, 0);
                }
  #endif