diff options
Diffstat (limited to 'include/linux/mtd/spi-nor.h')
-rw-r--r-- | include/linux/mtd/spi-nor.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index d0c66a0975cf..de36969eb359 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h | |||
@@ -61,6 +61,7 @@ | |||
61 | #define SPINOR_OP_RDSFDP 0x5a /* Read SFDP */ | 61 | #define SPINOR_OP_RDSFDP 0x5a /* Read SFDP */ |
62 | #define SPINOR_OP_RDCR 0x35 /* Read configuration register */ | 62 | #define SPINOR_OP_RDCR 0x35 /* Read configuration register */ |
63 | #define SPINOR_OP_RDFSR 0x70 /* Read flag status register */ | 63 | #define SPINOR_OP_RDFSR 0x70 /* Read flag status register */ |
64 | #define SPINOR_OP_CLFSR 0x50 /* Clear flag status register */ | ||
64 | 65 | ||
65 | /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ | 66 | /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ |
66 | #define SPINOR_OP_READ_4B 0x13 /* Read data bytes (low frequency) */ | 67 | #define SPINOR_OP_READ_4B 0x13 /* Read data bytes (low frequency) */ |
@@ -130,7 +131,10 @@ | |||
130 | #define EVCR_QUAD_EN_MICRON BIT(7) /* Micron Quad I/O */ | 131 | #define EVCR_QUAD_EN_MICRON BIT(7) /* Micron Quad I/O */ |
131 | 132 | ||
132 | /* Flag Status Register bits */ | 133 | /* Flag Status Register bits */ |
133 | #define FSR_READY BIT(7) | 134 | #define FSR_READY BIT(7) /* Device status, 0 = Busy, 1 = Ready */ |
135 | #define FSR_E_ERR BIT(5) /* Erase operation status */ | ||
136 | #define FSR_P_ERR BIT(4) /* Program operation status */ | ||
137 | #define FSR_PT_ERR BIT(1) /* Protection error bit */ | ||
134 | 138 | ||
135 | /* Configuration Register bits. */ | 139 | /* Configuration Register bits. */ |
136 | #define CR_QUAD_EN_SPAN BIT(1) /* Spansion Quad I/O */ | 140 | #define CR_QUAD_EN_SPAN BIT(1) /* Spansion Quad I/O */ |
@@ -399,4 +403,10 @@ struct spi_nor_hwcaps { | |||
399 | int spi_nor_scan(struct spi_nor *nor, const char *name, | 403 | int spi_nor_scan(struct spi_nor *nor, const char *name, |
400 | const struct spi_nor_hwcaps *hwcaps); | 404 | const struct spi_nor_hwcaps *hwcaps); |
401 | 405 | ||
406 | /** | ||
407 | * spi_nor_restore_addr_mode() - restore the status of SPI NOR | ||
408 | * @nor: the spi_nor structure | ||
409 | */ | ||
410 | void spi_nor_restore(struct spi_nor *nor); | ||
411 | |||
402 | #endif | 412 | #endif |