summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor/core.h
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@linaro.org>2023-03-31 10:46:05 +0300
committerTudor Ambarus <tudor.ambarus@linaro.org>2023-04-04 09:43:50 +0300
commitb6094ac83dd4fb4fa2849b804cc9fc1c70054852 (patch)
tree4eb98c03c554891d49984c2ef2d28e22111f3c77 /drivers/mtd/spi-nor/core.h
parent37513c56139b79dd43c1774513c28f8ab2b05224 (diff)
downloadlinux-b6094ac83dd4fb4fa2849b804cc9fc1c70054852.tar.xz
mtd: spi-nor: core: Introduce spi_nor_set_4byte_addr_mode()
Make the method public, as it will be used as a last resort to enable 4byte address mode when we can't determine the address mode at runtime. Update the addr_nbytes and current address mode while exiting the 4byte address mode too, as it may be used in the future by manufacturer drivers. No functional change. spi_nor_restore didn't update the address mode nbytes, but updating them now doesn't harm as the method is called in the driver's remove and shutdown paths. Link: https://lore.kernel.org/r/20230331074606.3559258-10-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Diffstat (limited to 'drivers/mtd/spi-nor/core.h')
-rw-r--r--drivers/mtd/spi-nor/core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 8953ddeb8625..ea9033cb0a01 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -651,6 +651,7 @@ int spi_nor_set_4byte_addr_mode_en4b_ex4b(struct spi_nor *nor, bool enable);
int spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(struct spi_nor *nor,
bool enable);
int spi_nor_set_4byte_addr_mode_brwr(struct spi_nor *nor, bool enable);
+int spi_nor_set_4byte_addr_mode(struct spi_nor *nor, bool enable);
int spi_nor_wait_till_ready(struct spi_nor *nor);
int spi_nor_global_block_unlock(struct spi_nor *nor);
int spi_nor_prep_and_lock(struct spi_nor *nor);