Skip to content

Commit d75c22f

Browse files
committed
mtd: spi-nor: core: Update name and description of spi_nor_set_4byte_addr_mode
Rename method to spi_nor_set_4byte_addr_mode_en4b_ex4b and extend its description. This method is described in JESD216 BFPT[SFDP_DWORD(16)], BIT(31) and BIT(23). Reviewed-by: Michael Walle <michael@walle.cc> Link: https://lore.kernel.org/r/20230331074606.3559258-5-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent f1f1976 commit d75c22f

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

drivers/mtd/spi-nor/core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,16 @@ int spi_nor_read_cr(struct spi_nor *nor, u8 *cr)
508508
}
509509

510510
/**
511-
* spi_nor_set_4byte_addr_mode() - Enter/Exit 4-byte address mode.
511+
* spi_nor_set_4byte_addr_mode_en4b_ex4b() - Enter/Exit 4-byte address mode
512+
* using SPINOR_OP_EN4B/SPINOR_OP_EX4B. Typically used by
513+
* Winbond and Macronix.
512514
* @nor: pointer to 'struct spi_nor'.
513515
* @enable: true to enter the 4-byte address mode, false to exit the 4-byte
514516
* address mode.
515517
*
516518
* Return: 0 on success, -errno otherwise.
517519
*/
518-
int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable)
520+
int spi_nor_set_4byte_addr_mode_en4b_ex4b(struct spi_nor *nor, bool enable)
519521
{
520522
int ret;
521523

@@ -556,7 +558,7 @@ int spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(struct spi_nor *nor, bool enable)
556558
if (ret)
557559
return ret;
558560

559-
ret = spi_nor_set_4byte_addr_mode(nor, enable);
561+
ret = spi_nor_set_4byte_addr_mode_en4b_ex4b(nor, enable);
560562
if (ret)
561563
return ret;
562564

drivers/mtd/spi-nor/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ void spi_nor_spimem_setup_op(const struct spi_nor *nor,
647647
const enum spi_nor_protocol proto);
648648
int spi_nor_write_enable(struct spi_nor *nor);
649649
int spi_nor_write_disable(struct spi_nor *nor);
650-
int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable);
650+
int spi_nor_set_4byte_addr_mode_en4b_ex4b(struct spi_nor *nor, bool enable);
651651
int spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(struct spi_nor *nor,
652652
bool enable);
653653
int spi_nor_wait_till_ready(struct spi_nor *nor);

drivers/mtd/spi-nor/macronix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static const struct flash_info macronix_nor_parts[] = {
108108
static void macronix_nor_default_init(struct spi_nor *nor)
109109
{
110110
nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable;
111-
nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode;
111+
nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_en4b_ex4b;
112112
}
113113

114114
static const struct spi_nor_fixups macronix_nor_fixups = {

drivers/mtd/spi-nor/winbond.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static int winbond_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable)
188188
{
189189
int ret;
190190

191-
ret = spi_nor_set_4byte_addr_mode(nor, enable);
191+
ret = spi_nor_set_4byte_addr_mode_en4b_ex4b(nor, enable);
192192
if (ret || enable)
193193
return ret;
194194

0 commit comments

Comments
 (0)