summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDhruva Gole <d-gole@ti.com>2022-11-17 17:40:59 +0530
committerAnand Gadiyar <gadiyar@ti.com>2022-11-21 09:33:36 -0600
commit663e96dce3b4aa8e499f59d9e80adfe3aad2438b (patch)
treec9a737182104264f376e593ac60d531ad193410a /include
parenta9df6cd890da6984504c00d466069b960366395e (diff)
mtd: spi-nor-core: Add the ->ready() hook
Commit 24b1e2c690fb953a3a981a282e37de5a0f1a98b1 upstream. For dual/quad die package devices from Spansion/Cypress, the device's status needs to be checked by reading status registers in all dies, by using Read Any Register command. To support this, a Flash specific hook that can overwrite the legacy status check is needed. Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Signed-off-by: Dhruva Gole <d-gole@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/spi-nor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 74e5348e33..980f44618b 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -503,6 +503,7 @@ struct flash_info;
* @quad_enable: [FLASH-SPECIFIC] enables SPI NOR quad mode
* completely locked
* @octal_dtr_enable: [FLASH-SPECIFIC] enables SPI NOR octal DTR mode.
+ * @ready: [FLASH-SPECIFIC] check if the flash is ready
* @priv: the private data
*/
struct spi_nor {
@@ -551,6 +552,7 @@ struct spi_nor {
int (*flash_is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
int (*quad_enable)(struct spi_nor *nor);
int (*octal_dtr_enable)(struct spi_nor *nor);
+ int (*ready)(struct spi_nor *nor);
void *priv;
/* Compatibility for spi_flash, remove once sf layer is merged with mtd */