@@ -2078,27 +2078,26 @@ static int spi_nor_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
20782078}
20792079
20802080/**
2081- * macronix_quad_enable() - set QE bit in Status Register.
2081+ * spi_nor_sr1_bit6_quad_enable() - Set the Quad Enable BIT(6) in the Status
2082+ * Register 1.
20822083 * @nor: pointer to a 'struct spi_nor'
20832084 *
2084- * Set the Quad Enable (QE) bit in the Status Register.
2085- *
2086- * bit 6 of the Status Register is the QE bit for Macronix like QSPI memories.
2085+ * Bit 6 of the Status Register 1 is the QE bit for Macronix like QSPI memories.
20872086 *
20882087 * Return: 0 on success, -errno otherwise.
20892088 */
2090- static int macronix_quad_enable (struct spi_nor * nor )
2089+ static int spi_nor_sr1_bit6_quad_enable (struct spi_nor * nor )
20912090{
20922091 int ret ;
20932092
20942093 ret = spi_nor_read_sr (nor , nor -> bouncebuf );
20952094 if (ret )
20962095 return ret ;
20972096
2098- if (nor -> bouncebuf [0 ] & SR_QUAD_EN_MX )
2097+ if (nor -> bouncebuf [0 ] & SR1_QUAD_EN_BIT6 )
20992098 return 0 ;
21002099
2101- nor -> bouncebuf [0 ] |= SR_QUAD_EN_MX ;
2100+ nor -> bouncebuf [0 ] |= SR1_QUAD_EN_BIT6 ;
21022101
21032102 return spi_nor_write_sr1_and_check (nor , nor -> bouncebuf [0 ]);
21042103}
@@ -2130,7 +2129,7 @@ static int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor)
21302129}
21312130
21322131/**
2133- * sr2_bit7_quad_enable () - set QE bit in Status Register 2.
2132+ * spi_nor_sr2_bit7_quad_enable () - set QE bit in Status Register 2.
21342133 * @nor: pointer to a 'struct spi_nor'
21352134 *
21362135 * Set the Quad Enable (QE) bit in the Status Register 2.
@@ -2141,7 +2140,7 @@ static int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor)
21412140 *
21422141 * Return: 0 on success, -errno otherwise.
21432142 */
2144- static int sr2_bit7_quad_enable (struct spi_nor * nor )
2143+ static int spi_nor_sr2_bit7_quad_enable (struct spi_nor * nor )
21452144{
21462145 u8 * sr2 = nor -> bouncebuf ;
21472146 int ret ;
@@ -2281,7 +2280,7 @@ static void gd25q256_default_init(struct spi_nor *nor)
22812280 * indicate the quad_enable method for this case, we need
22822281 * to set it in the default_init fixup hook.
22832282 */
2284- nor -> params .quad_enable = macronix_quad_enable ;
2283+ nor -> params .quad_enable = spi_nor_sr1_bit6_quad_enable ;
22852284}
22862285
22872286static struct spi_nor_fixups gd25q256_fixups = {
@@ -3661,12 +3660,12 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
36613660
36623661 case BFPT_DWORD15_QER_SR1_BIT6 :
36633662 nor -> flags &= ~SNOR_F_HAS_16BIT_SR ;
3664- params -> quad_enable = macronix_quad_enable ;
3663+ params -> quad_enable = spi_nor_sr1_bit6_quad_enable ;
36653664 break ;
36663665
36673666 case BFPT_DWORD15_QER_SR2_BIT7 :
36683667 nor -> flags &= ~SNOR_F_HAS_16BIT_SR ;
3669- params -> quad_enable = sr2_bit7_quad_enable ;
3668+ params -> quad_enable = spi_nor_sr2_bit7_quad_enable ;
36703669 break ;
36713670
36723671 case BFPT_DWORD15_QER_SR2_BIT1 :
@@ -4569,7 +4568,7 @@ static void intel_set_default_init(struct spi_nor *nor)
45694568
45704569static void macronix_set_default_init (struct spi_nor * nor )
45714570{
4572- nor -> params .quad_enable = macronix_quad_enable ;
4571+ nor -> params .quad_enable = spi_nor_sr1_bit6_quad_enable ;
45734572 nor -> params .set_4byte = macronix_set_4byte ;
45744573}
45754574
0 commit comments