diff options
author | Takahiro Kuwano <Takahiro.Kuwano@infineon.com> | 2021-06-29 09:01:00 +0300 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2021-06-29 16:46:54 +0300 |
commit | 24b1e2c690fb953a3a981a282e37de5a0f1a98b1 (patch) | |
tree | c453da44e5d67ed2e62abeb5ee873e8f06bb31d5 /include/linux | |
parent | a4aa9b7522dc67745795c1e2a76115a616da00ea (diff) | |
download | u-boot-24b1e2c690fb953a3a981a282e37de5a0f1a98b1.tar.xz |
mtd: spi-nor-core: Add the ->ready() hook
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>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mtd/spi-nor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 81df05fe84..e579ff2c7e 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -504,6 +504,7 @@ struct spi_flash { * completely locked * @quad_enable: [FLASH-SPECIFIC] enables SPI NOR quad mode * @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 { @@ -552,6 +553,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 */ |