diff options
author | Marek Vasut <marex@denx.de> | 2012-07-06 02:10:26 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 09:50:22 -0400 |
commit | 8bb8b85f6732ed579222a465d0749f66a3cace4d (patch) | |
tree | 482c0842f4c3e00976cc3d7165d7c772a2accba6 /drivers | |
parent | f728598f8d8edd6df2b53665ddadaf18401e5b11 (diff) |
mtd: m25p80: Fix the Spansion chip detection
Due to the implementation of the following loop at the end
of jedec_probe():
776 for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) {
777 info = (void *)m25p_ids[tmp].driver_data;
778 if (info->jedec_id == jedec) {
779 if (info->ext_id != 0 && info->ext_id != ext_jedec)
780 continue;
781 return &m25p_ids[tmp];
782 }
783 }
In particular line 779 in the above numbering, the chips with ext_id != 0 must
be ordered first in the list of chips (m25p_ids[]).
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index a3f4832cf54e..d16f75ce16e9 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -665,12 +665,7 @@ static const struct spi_device_id m25p_ids[] = { | |||
665 | /* Spansion -- single (large) sector size only, at least | 665 | /* Spansion -- single (large) sector size only, at least |
666 | * for the chips listed here (without boot sectors). | 666 | * for the chips listed here (without boot sectors). |
667 | */ | 667 | */ |
668 | { "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) }, | ||
669 | { "s25sl008a", INFO(0x010213, 0, 64 * 1024, 16, 0) }, | ||
670 | { "s25sl016a", INFO(0x010214, 0, 64 * 1024, 32, 0) }, | ||
671 | { "s25sl032a", INFO(0x010215, 0, 64 * 1024, 64, 0) }, | ||
672 | { "s25sl032p", INFO(0x010215, 0x4d00, 64 * 1024, 64, SECT_4K) }, | 668 | { "s25sl032p", INFO(0x010215, 0x4d00, 64 * 1024, 64, SECT_4K) }, |
673 | { "s25sl064a", INFO(0x010216, 0, 64 * 1024, 128, 0) }, | ||
674 | { "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128, SECT_4K) }, | 669 | { "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128, SECT_4K) }, |
675 | { "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) }, | 670 | { "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) }, |
676 | { "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, 0) }, | 671 | { "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, 0) }, |
@@ -680,6 +675,11 @@ static const struct spi_device_id m25p_ids[] = { | |||
680 | { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) }, | 675 | { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) }, |
681 | { "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, 0) }, | 676 | { "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, 0) }, |
682 | { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, 0) }, | 677 | { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, 0) }, |
678 | { "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) }, | ||
679 | { "s25sl008a", INFO(0x010213, 0, 64 * 1024, 16, 0) }, | ||
680 | { "s25sl016a", INFO(0x010214, 0, 64 * 1024, 32, 0) }, | ||
681 | { "s25sl032a", INFO(0x010215, 0, 64 * 1024, 64, 0) }, | ||
682 | { "s25sl064a", INFO(0x010216, 0, 64 * 1024, 128, 0) }, | ||
683 | { "s25fl016k", INFO(0xef4015, 0, 64 * 1024, 32, SECT_4K) }, | 683 | { "s25fl016k", INFO(0xef4015, 0, 64 * 1024, 32, SECT_4K) }, |
684 | { "s25fl064k", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) }, | 684 | { "s25fl064k", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) }, |
685 | 685 | ||