aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/m25p80.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 0b8672b6c8d2..6f93d32ce04b 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -691,6 +691,7 @@ struct flash_info {
691#define SECT_4K 0x01 /* OPCODE_BE_4K works uniformly */ 691#define SECT_4K 0x01 /* OPCODE_BE_4K works uniformly */
692#define M25P_NO_ERASE 0x02 /* No erase command needed */ 692#define M25P_NO_ERASE 0x02 /* No erase command needed */
693#define SST_WRITE 0x04 /* use SST byte programming */ 693#define SST_WRITE 0x04 /* use SST byte programming */
694#define M25P_NO_FR 0x08 /* Can't do fastread */
694}; 695};
695 696
696#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \ 697#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
@@ -741,7 +742,7 @@ static const struct spi_device_id m25p_ids[] = {
741 { "en25qh256", INFO(0x1c7019, 0, 64 * 1024, 512, 0) }, 742 { "en25qh256", INFO(0x1c7019, 0, 64 * 1024, 512, 0) },
742 743
743 /* Everspin */ 744 /* Everspin */
744 { "mr25h256", CAT25_INFO( 32 * 1024, 1, 256, 2, M25P_NO_ERASE) }, 745 { "mr25h256", CAT25_INFO( 32 * 1024, 1, 256, 2, M25P_NO_ERASE | M25P_NO_FR) },
745 746
746 /* GigaDevice */ 747 /* GigaDevice */
747 { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, 748 { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) },
@@ -856,11 +857,11 @@ static const struct spi_device_id m25p_ids[] = {
856 { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K) }, 857 { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K) },
857 858
858 /* Catalyst / On Semiconductor -- non-JEDEC */ 859 /* Catalyst / On Semiconductor -- non-JEDEC */
859 { "cat25c11", CAT25_INFO( 16, 8, 16, 1, M25P_NO_ERASE) }, 860 { "cat25c11", CAT25_INFO( 16, 8, 16, 1, M25P_NO_ERASE | M25P_NO_FR) },
860 { "cat25c03", CAT25_INFO( 32, 8, 16, 2, M25P_NO_ERASE) }, 861 { "cat25c03", CAT25_INFO( 32, 8, 16, 2, M25P_NO_ERASE | M25P_NO_FR) },
861 { "cat25c09", CAT25_INFO( 128, 8, 32, 2, M25P_NO_ERASE) }, 862 { "cat25c09", CAT25_INFO( 128, 8, 32, 2, M25P_NO_ERASE | M25P_NO_FR) },
862 { "cat25c17", CAT25_INFO( 256, 8, 32, 2, M25P_NO_ERASE) }, 863 { "cat25c17", CAT25_INFO( 256, 8, 32, 2, M25P_NO_ERASE | M25P_NO_FR) },
863 { "cat25128", CAT25_INFO(2048, 8, 64, 2, M25P_NO_ERASE) }, 864 { "cat25128", CAT25_INFO(2048, 8, 64, 2, M25P_NO_ERASE | M25P_NO_FR) },
864 { }, 865 { },
865}; 866};
866MODULE_DEVICE_TABLE(spi, m25p_ids); 867MODULE_DEVICE_TABLE(spi, m25p_ids);
@@ -1044,6 +1045,8 @@ static int m25p_probe(struct spi_device *spi)
1044#ifdef CONFIG_M25PXX_USE_FAST_READ 1045#ifdef CONFIG_M25PXX_USE_FAST_READ
1045 flash->fast_read = true; 1046 flash->fast_read = true;
1046#endif 1047#endif
1048 if (info->flags & M25P_NO_FR)
1049 flash->fast_read = false;
1047 1050
1048 /* Default commands */ 1051 /* Default commands */
1049 if (flash->fast_read) 1052 if (flash->fast_read)