summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor/core.h
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2021-12-07 16:02:45 +0200
committerTudor Ambarus <tudor.ambarus@microchip.com>2021-12-07 17:05:10 +0200
commit7683b39d6030264176dcd5ec1980622a620ee010 (patch)
treea65a958eec73fd73bb7ba0f99c77dc041ae27cac /drivers/mtd/spi-nor/core.h
parent5273cc6df984967068f3acfcbe0def1562db5409 (diff)
mtd: spi-nor: core: Introduce flash_info mfr_flags
Used in the manufacturer fixup hooks to differentiate support between flashes of the same manufacturer. Not used in the SPI NOR core. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Michael Walle <michael@walle.cc> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Link: https://lore.kernel.org/r/20211207140254.87681-6-tudor.ambarus@microchip.com
Diffstat (limited to 'drivers/mtd/spi-nor/core.h')
-rw-r--r--drivers/mtd/spi-nor/core.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index f6c4b6f4743b..a9fd956eed4e 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -336,7 +336,6 @@ struct flash_info {
u32 flags;
#define SECT_4K BIT(0) /* SPINOR_OP_BE_4K works uniformly */
#define SPI_NOR_NO_ERASE BIT(1) /* No erase command needed */
-#define SST_WRITE BIT(2) /* use SST byte programming */
#define SPI_NOR_NO_FR BIT(3) /* Can't do fastread */
#define SECT_4K_PMC BIT(4) /* SPINOR_OP_BE_4K_PMC works uniformly */
#define SPI_NOR_DUAL_READ BIT(5) /* Flash supports Dual Read */
@@ -385,6 +384,12 @@ struct flash_info {
* protection bits. Usually these will
* power-up in a write-protected state.
*/
+ u8 mfr_flags; /*
+ * Manufacturer private flags. Used in
+ * the manufacturer fixup hooks to
+ * differentiate support between flashes
+ * of the same manufacturer.
+ */
const struct spi_nor_otp_organization otp_org;
@@ -450,6 +455,9 @@ struct flash_info {
.n_regions = (_n_regions), \
},
+#define MFR_FLAGS(_mfr_flags) \
+ .mfr_flags = (_mfr_flags), \
+
/**
* struct spi_nor_manufacturer - SPI NOR manufacturer object
* @name: manufacturer name