mtd: spi-nor: Modify rule of parse SFDP
cover mtd: spi-nor: Modify rule of parse SFDP
From: JaimeLiao <[email protected]>
This series change the rule of parse sfdp for enhance complementary relationship between SFDP table and ID table.
JaimeLiao (3):
mtd: spi-nor: Modify rule for parse sfdp
mtd: spi-nor: Add features support by parse sfdp
mtd: spi-nor: change MACRO for flash ID tables
drivers/mtd/spi-nor/atmel.c | 40 +++++------ drivers/mtd/spi-nor/core.c | 82 ++++++++++++---------- drivers/mtd/spi-nor/core.h | 39 ++++------- drivers/mtd/spi-nor/eon.c | 15 ++-- drivers/mtd/spi-nor/esmt.c | 10 ++- drivers/mtd/spi-nor/gigadevice.c | 43 ++++++------ drivers/mtd/spi-nor/issi.c | 28 ++++---- drivers/mtd/spi-nor/macronix.c | 65 +++++++++-------- drivers/mtd/spi-nor/micron-st.c | 68 ++++++++---------- drivers/mtd/spi-nor/sfdp.c | 25 +++++++ drivers/mtd/spi-nor/sfdp.h | 2 + drivers/mtd/spi-nor/spansion.c | 75 +++++++++----------- drivers/mtd/spi-nor/sst.c | 53 +++++++------- drivers/mtd/spi-nor/winbond.c | 115 +++++++++++++++---------------- drivers/mtd/spi-nor/xmc.c | 8 +-- 15 files changed, 329 insertions(+), 339 deletions(-)
Signature · 6 lines
2.25.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 1/3 mtd: spi-nor: Modify rule for parse sfdp
From: JaimeLiao <[email protected]>
With various vendors adhering to the JEDEC Standard, the percentage of SPI-NOR flash devices on the market that can read SFDP table is increasing.
To enhance reliance on SFDP table, remove PARSE_SFDP flag, allowing all SPI-NOR flash devices to read SFDP talbe. The exception to this ule is for ICs that included SPI_NOR_SKIP_SFDP flag. Furthermore, to establish a complementary relationship between ID table information and SFDP talbe, organize no_sfdp_flags into nor->info->flags.
The flash parameters are then organized by spi_nor_init_flags.
--- drivers/mtd/spi-nor/core.c | 82 ++++++++++++++++++++------------------ drivers/mtd/spi-nor/core.h | 39 +++++++----------- 2 files changed, 59 insertions(+), 62 deletions(-)
drivers/mtd/spi-nor/core.c +44 -38
@@ -2024,7 +2024,6 @@ static const struct flash_info spi_nor_generic_flash = {* sane default. */ .page_size = 256, - .parse_sfdp = true, }; static const struct flash_info *spi_nor_match_id(struct spi_nor *nor,
@@ -2760,50 +2759,51 @@ static void spi_nor_manufacturer_init_params(struct spi_nor *nor) }/** -* spi_nor_no_sfdp_init_params() - Initialize the flash's parameters and -* settings based on nor->info->sfdp_flags. This method should be called only by -* flashes that do not define SFDP tables. If the flash supports SFDP but the -* information is wrong and the settings from this function can not be retrieved +* spi_nor_flags_init_params() - Initialize the flash's parameters and +* settings based on nor->flags. This method should be called by flashes +* that define both on SFDP tables and id table informations. +* If the flash supports SFDP but the information is wrong +* and the settings from this function can not be retrieved * by parsing SFDP, one should instead use the fixup hooks and update the wrong * bits. * @nor: pointer to a 'struct spi_nor'. */ -static void spi_nor_no_sfdp_init_params (struct spi_nor *nor) +static void spi_nor_flags_init_params (struct spi_nor *nor) {struct spi_nor_flash_parameter *params = nor->params;struct spi_nor_erase_map *map = ¶ms->erase_map; -const u8 no_sfdp_flags = nor->info->no_sfdp_flags; +const u32 flags = nor->flags;u8 i, erase_mask; -if (no_sfdp_flags &SPI_NOR_DUAL_READ ) { +if (flags &SPI_NOR_DUAL_READ ) { params->hwcaps.mask |=SNOR_HWCAPS_READ_1_1_2 ;spi_nor_set_read_settings (¶ms->reads[SNOR_CMD_READ_1_1_2 ],0 ,8 ,SPINOR_OP_READ_1_1_2 ,SNOR_PROTO_1_1_2 ); } -if (no_sfdp_flags &SPI_NOR_QUAD_READ ) { +if (flags &SPI_NOR_QUAD_READ ) { params->hwcaps.mask |=SNOR_HWCAPS_READ_1_1_4 ;spi_nor_set_read_settings (¶ms->reads[SNOR_CMD_READ_1_1_4 ],0 ,8 ,SPINOR_OP_READ_1_1_4 ,SNOR_PROTO_1_1_4 ); } -if (no_sfdp_flags &SPI_NOR_OCTAL_READ ) { +if (flags &SPI_NOR_OCTAL_READ ) { params->hwcaps.mask |=SNOR_HWCAPS_READ_1_1_8 ;spi_nor_set_read_settings (¶ms->reads[SNOR_CMD_READ_1_1_8 ],0 ,8 ,SPINOR_OP_READ_1_1_8 ,SNOR_PROTO_1_1_8 ); } -if (no_sfdp_flags &SPI_NOR_OCTAL_DTR_READ ) { +if (flags &SPI_NOR_OCTAL_DTR_READ ) { params->hwcaps.mask |=SNOR_HWCAPS_READ_8_8_8_DTR ;spi_nor_set_read_settings (¶ms->reads[SNOR_CMD_READ_8_8_8_DTR ],0 ,20 ,SPINOR_OP_READ_FAST ,SNOR_PROTO_8_8_8_DTR ); } -if (no_sfdp_flags &SPI_NOR_OCTAL_DTR_PP ) { +if (flags &SPI_NOR_OCTAL_DTR_PP ) { params->hwcaps.mask |=SNOR_HWCAPS_PP_8_8_8_DTR ;/* * Since xSPI Page Program opcode is backward compatible with
@@ -2819,7 +2819,7 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor)*/ erase_mask =0 ; i =0 ; -if (no_sfdp_flags &SECT_4K ) { +if (flags &SECT_4K ) { erase_mask |=BIT (i);spi_nor_set_erase_type (&map->erase_type[i],4096u ,SPINOR_OP_BE_4K );
@@ -2832,8 +2832,8 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor) }/** -* spi_nor_init_flags() - Initialize NOR flags for settings that are not defined -* in the JESD216 SFDP standard, thus can not be retrieved when parsing SFDP. +* spi_nor_init_flags() - Initialize NOR flags for settings that are defined +* in the id table information. * @nor: pointer to a 'struct spi_nor' */ static void spi_nor_init_flags (struct spi_nor *nor)
@@ -2868,6 +2868,24 @@ static void spi_nor_init_flags(struct spi_nor *nor)if (flags &SPI_NOR_RWW && nor->info->n_banks >1 && !nor->controller_ops) nor->flags |=SNOR_F_RWW ; + +if (nor->info->flags &SECT_4K ) + nor->flags |=SNOR_F_SECT_4K ; + +if (nor->info->flags &SPI_NOR_DUAL_READ ) + nor->flags |=SNOR_F_DUAL_READ ; + +if (nor->info->flags &SPI_NOR_QUAD_READ ) + nor->flags |=SNOR_F_QUAD_READ ; + +if (nor->info->flags &SPI_NOR_OCTAL_READ ) + nor->flags |=SNOR_F_OCTAL_READ ; + +if (nor->info->flags &SPI_NOR_OCTAL_DTR_READ ) + nor->flags |=SNOR_F_OCTAL_DTR_READ ; + +if (nor->info->flags &SPI_NOR_OCTAL_DTR_PP ) + nor->flags |=SNOR_F_OCTAL_DTR_PP ; }/**
@@ -2901,6 +2919,8 @@ static void spi_nor_late_init_params(struct spi_nor *nor) {struct spi_nor_flash_parameter *params = nor->params; +spi_nor_manufacturer_init_params (nor); +if (nor->manufacturer && nor->manufacturer->fixups && nor->manufacturer->fixups->late_init) nor->manufacturer->fixups->late_init (nor);
@@ -2915,6 +2935,8 @@ static void spi_nor_late_init_params(struct spi_nor *nor)spi_nor_init_flags (nor);spi_nor_init_fixup_flags (nor); +spi_nor_flags_init_params (nor); +/* * NOR protection support. When locking_ops are not provided, we pick * the default ones.
@@ -2952,19 +2974,17 @@ static void spi_nor_sfdp_init_params_deprecated(struct spi_nor *nor)* @nor: pointer to a 'struct spi_nor'. * * The method assumes that flash doesn't support SFDP so it initializes flash -* parameters in spi_nor_no_sfdp_init_params() which later on can be overwritten +* parameters in spi_nor_late_init_params() which later on can be overwritten * when parsing SFDP, if supported. */ static void spi_nor_init_params_deprecated (struct spi_nor *nor) { -spi_nor_no_sfdp_init_params (nor); -spi_nor_manufacturer_init_params (nor); -if (nor->info->no_sfdp_flags & (SPI_NOR_DUAL_READ | -SPI_NOR_QUAD_READ | -SPI_NOR_OCTAL_READ | -SPI_NOR_OCTAL_DTR_READ )) +if (nor->info->flags & (SPI_NOR_DUAL_READ | +SPI_NOR_QUAD_READ | +SPI_NOR_OCTAL_READ | +SPI_NOR_OCTAL_DTR_READ ))spi_nor_sfdp_init_params_deprecated (nor); }
@@ -3041,19 +3061,7 @@ static void spi_nor_init_default_params(struct spi_nor *nor)* spi_nor_manufacturer_init_params() * * which can be overwritten by: -* 3/ SFDP flash parameters initialization. JESD216 SFDP is a standard and -* should be more accurate that the above. -* spi_nor_parse_sfdp() or spi_nor_no_sfdp_init_params() -* -* Please note that there is a ->post_bfpt() fixup hook that can overwrite -* the flash parameters and settings immediately after parsing the Basic -* Flash Parameter Table. -* spi_nor_post_sfdp_fixups() is called after the SFDP tables are parsed. -* It is used to tweak various flash parameters when information provided -* by the SFDP tables are wrong. -* -* which can be overwritten by: -* 4/ Late flash parameters initialization, used to initialize flash +* 3/ Late flash parameters initialization, used to initialize flash * parameters that are not declared in the JESD216 SFDP standard, or where SFDP * tables are not defined at all. * spi_nor_late_init_params()
@@ -3070,14 +3078,12 @@ static int spi_nor_init_params(struct spi_nor *nor)spi_nor_init_default_params (nor); -if (nor->info->parse_sfdp) { +if (!(nor->info->flags &SPI_NOR_SKIP_SFDP )) { ret =spi_nor_parse_sfdp (nor);if (ret) {dev_err (nor->dev,"BFPT parsing failed. Please consider using SPI_NOR_SKIP_SFDP when declaring the flash\n" );return ret; } - }else if (nor->info->no_sfdp_flags &SPI_NOR_SKIP_SFDP ) { -spi_nor_no_sfdp_init_params (nor); }else {spi_nor_init_params_deprecated (nor); }
drivers/mtd/spi-nor/core.h +15 -24
@@ -132,6 +132,13 @@ enum spi_nor_option_flags {SNOR_F_SWP_IS_VOLATILE =BIT (13 ),SNOR_F_RWW =BIT (14 ),SNOR_F_ECC =BIT (15 ), +SNOR_F_SECT_4K =BIT (16 ), +SNOR_F_DUAL_READ =BIT (17 ), +SNOR_F_QUAD_READ =BIT (18 ), +SNOR_F_OCTAL_READ =BIT (19 ), +SNOR_F_OCTAL_DTR_READ =BIT (20 ), + SNOR_F_OCTAL_DTR_PP = BIT(21), + }; struct spi_nor_read_command {
@@ -447,9 +454,6 @@ struct spi_nor_fixups {* @page_size: the flash's page size. * @addr_nbytes: number of address bytes to send. * -* @parse_sfdp: true when flash supports SFDP tables. The false value has no -* meaning. If one wants to skip the SFDP tables, one should -* instead use the SPI_NOR_SKIP_SFDP sfdp_flag. * @flags: flags that indicate support that is not defined by the * JESD216 standard in its SFDP tables. Flag meanings: * SPI_NOR_HAS_LOCK: flash supports lock/unlock via SR
@@ -469,10 +473,6 @@ struct spi_nor_fixups {* SPI_NOR_NO_FR: can't do fastread. * SPI_NOR_QUAD_PP: flash supports Quad Input Page Program. * SPI_NOR_RWW: flash supports reads while write. -* -* @no_sfdp_flags: flags that indicate support that can be discovered via SFDP. -* Used when SFDP tables are not defined in the flash. These -* flags are used together with the SPI_NOR_SKIP_SFDP flag. * SPI_NOR_SKIP_SFDP: skip parsing of SFDP tables. * SECT_4K: SPINOR_OP_BE_4K works uniformly. * SPI_NOR_DUAL_READ: flash supports Dual Read.
@@ -508,8 +508,7 @@ struct flash_info {u8 n_banks;u8 addr_nbytes; -bool parse_sfdp; -u16 flags; +u32 flags;#define SPI_NOR_HAS_LOCK BIT(0)#define SPI_NOR_HAS_TB BIT(1)#define SPI_NOR_TB_SR_BIT6 BIT(2)
@@ -521,15 +520,13 @@ struct flash_info {#define SPI_NOR_NO_FR BIT(8)#define SPI_NOR_QUAD_PP BIT(9)#define SPI_NOR_RWW BIT(10) - -u8 no_sfdp_flags; -#define SPI_NOR_SKIP_SFDP BIT(0) -#define SECT_4K BIT(1) -#define SPI_NOR_DUAL_READ BIT(3) -#define SPI_NOR_QUAD_READ BIT(4) -#define SPI_NOR_OCTAL_READ BIT(5) -#define SPI_NOR_OCTAL_DTR_READ BIT(6) -#define SPI_NOR_OCTAL_DTR_PP BIT(7) +#define SPI_NOR_SKIP_SFDP BIT(11) +#define SECT_4K BIT(12) +#define SPI_NOR_DUAL_READ BIT(13) +#define SPI_NOR_QUAD_READ BIT(14) +#define SPI_NOR_OCTAL_READ BIT(15) +#define SPI_NOR_OCTAL_DTR_READ BIT(16) +#define SPI_NOR_OCTAL_DTR_PP BIT(17)u8 fixup_flags;#define SPI_NOR_4B_OPCODES BIT(0)
@@ -587,15 +584,9 @@ struct flash_info { .n_regions = (_n_regions), \ }, -#define PARSE_SFDP \ - .parse_sfdp = true, \ -#define FLAGS (_flags) \ .flags = (_flags), \ -#define NO_SFDP_FLAGS (_no_sfdp_flags) \ - .no_sfdp_flags = (_no_sfdp_flags), \ -#define FIXUP_FLAGS (_fixup_flags) \ .fixup_flags = (_fixup_flags), \
Signature · 6 lines
2.25.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH v1 1/3] mtd: spi-nor: Modify rule for parse sfdp
Quoted 10 lines · Jaime Liao
With various vendors adhering to the JEDEC Standard, the percentage of SPI-NOR flash devices on the market that can read SFDP table is increasing.
To enhance reliance on SFDP table, removePARSE_SFDPflag, allowing all SPI-NOR flash devices to read SFDP talbe. The exception to this ule is for ICs that includedSPI_NOR_SKIP_SFDPflag. Furthermore, to establish a complementary relationship between ID table information and SFDP talbe, organizeno_sfdp_flagsintonor->info->flags.
The flash parameters are then organized byspi_nor_init_flags.
what are you trying to achieve?
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH v1 1/3] mtd: spi-nor: Modify rule for parse sfdp
Quoted 15 lines · Jaime Liao
Quoted 10 lines
With various vendors adhering to the JEDEC Standard, the percentage of SPI-NOR flash devices on the market that can read SFDP table is increasing.
To enhance reliance on SFDP table, removePARSE_SFDPflag, allowing all SPI-NOR flash devices to read SFDP talbe. The exception to this ule is for ICs that includedSPI_NOR_SKIP_SFDPflag. Furthermore, to establish a complementary relationship between ID table information and SFDP talbe, organizeno_sfdp_flagsintonor->info->flags.
The flash parameters are then organized byspi_nor_init_flags.
Quoted 1 line
what are you trying to achieve?
Sorry, I got something misunderstand.
Please reject this patchset.
Thanks
Jaime
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 2/3 mtd: spi-nor: Add features support by parse sfdp
In reply to Jaime LiaoFrom: JaimeLiao <[email protected]>
Add SECT_4K, DUAL_READ, QUAD_READ, OCTAL_DTR_READ feature checking by parsing sfdp tables.
--- drivers/mtd/spi-nor/sfdp.c | 25 +++++++++++++++++++++++++ drivers/mtd/spi-nor/sfdp.h | 2 ++ 2 files changed, 27 insertions(+)
drivers/mtd/spi-nor/sfdp.c +25 -0
@@ -463,6 +463,24 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,/* Fix endianness of the BFPT DWORDs. */ le32_to_cpu_array (bfpt.dwords,BFPT_DWORD_MAX ); +/* Checking Sector Size 4K */ +switch (bfpt.dwords[SFDP_DWORD (1 )] &BFPT_DWORD1_SECT_SIZE_MASK ) { +case BFPT_DWORD1_SUPPORT_SECT_4K : + nor->flags |=SNOR_F_SECT_4K ; +default : +break ; + } + +/* Checking 1-1-2 Fast Read */ +if (bfpt.dwords[SFDP_DWORD (1 )] &BFPT_DWORD1_FAST_READ_1_1_2 ) { + nor->flags |=SNOR_F_DUAL_READ ; + } + +/* Checking 1-1-4 Fast Read */ +if (bfpt.dwords[SFDP_DWORD (1 )] &BFPT_DWORD1_FAST_READ_1_1_4 ) { + nor->flags |=SNOR_F_QUAD_READ ; + } +/* Number of address bytes. */ switch (bfpt.dwords[SFDP_DWORD (1 )] &BFPT_DWORD1_ADDRESS_BYTES_MASK ) {case BFPT_DWORD1_ADDRESS_BYTES_3_ONLY :
@@ -1218,6 +1236,7 @@ static int spi_nor_parse_profile1(struct spi_nor *nor, }#define SCCR_DWORD22_OCTAL_DTR_EN_VOLATILE BIT(31) +#define SCCR_DWORD22_OCTAL_DTR_MODE BIT(23)/** * spi_nor_parse_sccr() - Parse the Status, Control and Configuration Register
@@ -1264,6 +1283,12 @@ static int spi_nor_parse_sccr(struct spi_nor *nor, dwords[SFDP_DWORD(22)])) nor->flags |=SNOR_F_IO_MODE_EN_VOLATILE ; +if (FIELD_GET (SCCR_DWORD22_OCTAL_DTR_MODE , + dwords[SFDP_DWORD (22 )])) { + nor->flags |=SNOR_F_OCTAL_DTR_READ ; + nor->flags |=SNOR_F_OCTAL_DTR_PP ; + } + out:kfree (dwords);return ret;
drivers/mtd/spi-nor/sfdp.h +2 -0
@@ -31,6 +31,8 @@ struct sfdp_bfpt {#define BFPT_DWORD_MAX_JESD216B 16/* 1st DWORD. */ +#define BFPT_DWORD1_SECT_SIZE_MASK GENMASK(1, 0) +#define BFPT_DWORD1_SUPPORT_SECT_4K (0x1UL << 0)#define BFPT_DWORD1_FAST_READ_1_1_2 BIT(16)#define BFPT_DWORD1_ADDRESS_BYTES_MASK GENMASK(18, 17)#define BFPT_DWORD1_ADDRESS_BYTES_3_ONLY (0x0UL << 17)
Signature · 6 lines
2.25.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 3/3 mtd: spi-nor: change MACRO for flash ID tables
In reply to Jaime LiaoFrom: JaimeLiao <[email protected]>
Remove flag PARSE_SFDP and organize no_sfdp_flags into nor->info->flags
--- drivers/mtd/spi-nor/atmel.c | 40 +++++------ drivers/mtd/spi-nor/eon.c | 15 ++-- drivers/mtd/spi-nor/esmt.c | 10 ++- drivers/mtd/spi-nor/gigadevice.c | 43 ++++++------ drivers/mtd/spi-nor/issi.c | 28 ++++---- drivers/mtd/spi-nor/macronix.c | 65 +++++++++-------- drivers/mtd/spi-nor/micron-st.c | 68 ++++++++---------- drivers/mtd/spi-nor/spansion.c | 75 +++++++++----------- drivers/mtd/spi-nor/sst.c | 53 +++++++------- drivers/mtd/spi-nor/winbond.c | 115 +++++++++++++++---------------- drivers/mtd/spi-nor/xmc.c | 8 +-- 11 files changed, 243 insertions(+), 277 deletions(-)
drivers/mtd/spi-nor/atmel.c +19 -21
@@ -161,47 +161,45 @@ static const struct spi_nor_fixups atmel_nor_global_protection_fixups = {static const struct flash_info atmel_nor_parts[] = {/* Atmel -- some are (confusingly) marketed as "DataFlash" */ { "at25fs010", INFO(0x1f6601, 0, 32 * 1024, 4) - FLAGS(SPI_NOR_HAS_LOCK) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SECT_4K ) .fixups = &at25fs_nor_fixups }, { "at25fs040", INFO(0x1f6604, 0, 64 * 1024, 8) - FLAGS(SPI_NOR_HAS_LOCK) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SECT_4K ) .fixups = &at25fs_nor_fixups }, { "at25df041a", INFO(0x1f4401, 0, 64 * 1024, 8) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) .fixups = &atmel_nor_global_protection_fixups }, { "at25df321", INFO(0x1f4700, 0, 64 * 1024, 64) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) .fixups = &atmel_nor_global_protection_fixups }, { "at25df321a", INFO(0x1f4701, 0, 64 * 1024, 64) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) .fixups = &atmel_nor_global_protection_fixups }, { "at25df641", INFO(0x1f4800, 0, 64 * 1024, 128) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) .fixups = &atmel_nor_global_protection_fixups }, { "at25sl321", INFO(0x1f4216, 0, 64 * 1024, 64) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, { "at26f004", INFO(0x1f0400, 0, 64 * 1024, 8) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SECT_4K ) }, { "at26df081a", INFO(0x1f4501, 0, 64 * 1024, 16) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) .fixups = &atmel_nor_global_protection_fixups }, { "at26df161a", INFO(0x1f4601, 0, 64 * 1024, 32) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) .fixups = &atmel_nor_global_protection_fixups }, { "at26df321", INFO(0x1f4700, 0, 64 * 1024, 64) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) .fixups = &atmel_nor_global_protection_fixups }, { "at45db081d", INFO(0x1f2500, 0, 64 * 1024, 16) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SECT_4K ) }, };const struct spi_nor_manufacturer spi_nor_atmel = {
drivers/mtd/spi-nor/eon.c +7 -8
@@ -11,24 +11,23 @@static const struct flash_info eon_nor_parts[] = {/* EON -- en25xxx */ { "en25f32", INFO(0x1c3116, 0, 64 * 1024, 64) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SECT_4K ) }, {"en25p32" ,INFO (0x1c2016 ,0 ,64 *1024 ,64 ) }, {"en25q32b" ,INFO (0x1c3016 ,0 ,64 *1024 ,64 ) }, {"en25p64" ,INFO (0x1c2017 ,0 ,64 *1024 ,128 ) }, { "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SECT_4K ) }, { "en25q80a", INFO(0x1c3014, 0, 64 * 1024, 16) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, { "en25qh16", INFO(0x1c7015, 0, 64 * 1024, 32) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, {"en25qh32" ,INFO (0x1c7016 ,0 ,64 *1024 ,64 ) }, { "en25qh64", INFO(0x1c7017, 0, 64 * 1024, 128) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, {"en25qh128" ,INFO (0x1c7018 ,0 ,64 *1024 ,256 ) }, - {"en25qh256" ,INFO (0x1c7019 ,0 ,64 *1024 ,512 ) - PARSE_SFDP }, + {"en25qh256" ,INFO (0x1c7019 ,0 ,64 *1024 ,512 ) }, { "en25s64", INFO(0x1c3817, 0, 64 * 1024, 128) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SECT_4K ) }, };const struct spi_nor_manufacturer spi_nor_eon = {
drivers/mtd/spi-nor/esmt.c +4 -6
@@ -11,14 +11,12 @@static const struct flash_info esmt_nor_parts[] = {/* ESMT */ { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64) - FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SPI_NOR_HAS_LOCK |SPI_NOR_SWP_IS_VOLATILE | +SECT_4K ) }, { "f25l32qa-2s", INFO(0x8c4116, 0, 64 * 1024, 64) - FLAGS(SPI_NOR_HAS_LOCK) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SPI_NOR_HAS_LOCK |SECT_4K ) }, { "f25l64qa", INFO(0x8c4117, 0, 64 * 1024, 128) - FLAGS(SPI_NOR_HAS_LOCK) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SPI_NOR_HAS_LOCK |SECT_4K ) }, };const struct spi_nor_manufacturer spi_nor_esmt = {
drivers/mtd/spi-nor/gigadevice.c +21 -22
56 lines not on this page · raw message
drivers/mtd/spi-nor/issi.c +13 -15
@@ -47,46 +47,44 @@ static const struct spi_nor_fixups pm25lv_nor_fixups = {static const struct flash_info issi_nor_parts[] = {/* ISSI */ { "is25cd512", INFO(0x7f9d20, 0, 32 * 1024, 2) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SECT_4K ) }, { "is25lq040b", INFO(0x9d4013, 0, 64 * 1024, 8) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, { "is25lp016d", INFO(0x9d6015, 0, 64 * 1024, 32) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, { "is25lp080d", INFO(0x9d6014, 0, 64 * 1024, 16) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, { "is25lp032", INFO(0x9d6016, 0, 64 * 1024, 64) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, { "is25lp064", INFO(0x9d6017, 0, 64 * 1024, 128) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, { "is25lp128", INFO(0x9d6018, 0, 64 * 1024, 256) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ ) }, { "is25lp256", INFO(0x9d6019, 0, 64 * 1024, 512) - PARSE_SFDPFIXUP_FLAGS (SPI_NOR_4B_OPCODES ) .fixups = &is25lp256_fixups }, { "is25wp032", INFO(0x9d7016, 0, 64 * 1024, 64) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, { "is25wp064", INFO(0x9d7017, 0, 64 * 1024, 128) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, { "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ ) }, { "is25wp256", INFO(0x9d7019, 0, 0, 0) - PARSE_SFDP FIXUP_FLAGS(SPI_NOR_4B_OPCODES)FLAGS (SPI_NOR_QUAD_PP ) .fixups = &is25lp256_fixups },/* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SECT_4K ) .fixups = &pm25lv_nor_fixups }, { "pm25lv010", INFO(0, 0, 32 * 1024, 4) -NO_SFDP_FLAGS (SECT_4K ) +FLAGS (SECT_4K ) .fixups = &pm25lv_nor_fixups }, { "pm25lq032", INFO(0x7f9d46, 0, 64 * 1024, 64) -NO_SFDP_FLAGS (SECT_4K ) }, +FLAGS (SECT_4K ) }, };static void issi_nor_default_init (struct spi_nor *nor)
drivers/mtd/spi-nor/macronix.c +32 -33
105 lines not on this page · raw message
drivers/mtd/spi-nor/micron-st.c +30 -38
150 lines not on this page · raw message
drivers/mtd/spi-nor/spansion.c +32 -43
167 lines not on this page · raw message
drivers/mtd/spi-nor/sst.c +25 -28
84 lines not on this page · raw message
drivers/mtd/spi-nor/winbond.c +56 -59
160 lines not on this page · raw message
drivers/mtd/spi-nor/xmc.c +4 -4
@@ -11,11 +11,11 @@static const struct flash_info xmc_nor_parts[] = {/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ | -SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ | +SPI_NOR_QUAD_READ ) }, { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ | -SPI_NOR_QUAD_READ ) }, +FLAGS (SECT_4K |SPI_NOR_DUAL_READ | +SPI_NOR_QUAD_READ ) }, };const struct spi_nor_manufacturer spi_nor_xmc = {
Signature · 6 lines
2.25.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/