diff options
author | Tudor Ambarus <tudor.ambarus@linaro.org> | 2023-03-31 10:45:57 +0300 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@linaro.org> | 2023-04-04 09:43:49 +0300 |
commit | 076aa4eac8b3f7e8ade56a64a7197836d6bd3a72 (patch) | |
tree | a1df5a9f49e976b08c2cdc85a5005917ec25ca79 /drivers/mtd/spi-nor/micron-st.c | |
parent | f0a499acb4b6f4c9a169ce35195b8021578ea14a (diff) | |
download | linux-076aa4eac8b3f7e8ade56a64a7197836d6bd3a72.tar.xz |
mtd: spi-nor: core: Move generic method to core - micron_st_nor_set_4byte_addr_mode
This method is described in JESD216 BFPT[SFDP_DWORD(16)], BIT(30) and
BIT(22). Move the method to core.
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20230331074606.3559258-2-tudor.ambarus@linaro.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Diffstat (limited to 'drivers/mtd/spi-nor/micron-st.c')
-rw-r--r-- | drivers/mtd/spi-nor/micron-st.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c index 7bb86df52f0b..3bbf65234ebd 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -302,30 +302,6 @@ static const struct flash_info st_nor_parts[] = { }; /** - * micron_st_nor_set_4byte_addr_mode() - Set 4-byte address mode for ST and - * Micron flashes. - * @nor: pointer to 'struct spi_nor'. - * @enable: true to enter the 4-byte address mode, false to exit the 4-byte - * address mode. - * - * Return: 0 on success, -errno otherwise. - */ -static int micron_st_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable) -{ - int ret; - - ret = spi_nor_write_enable(nor); - if (ret) - return ret; - - ret = spi_nor_set_4byte_addr_mode(nor, enable); - if (ret) - return ret; - - return spi_nor_write_disable(nor); -} - -/** * micron_st_nor_read_fsr() - Read the Flag Status Register. * @nor: pointer to 'struct spi_nor' * @fsr: pointer to a DMA-able buffer where the value of the |