diff options
author | Pratyush Yadav <p.yadav@ti.com> | 2020-10-05 18:31:27 +0300 |
---|---|---|
committer | Vignesh Raghavendra <vigneshr@ti.com> | 2020-11-09 09:26:16 +0300 |
commit | 0e1b2fc4e5f681ba716f5a50da710251c717413d (patch) | |
tree | 7ee58269bd7281dd9193b791ba2af19d8dc8623a /drivers/mtd/spi-nor/sfdp.h | |
parent | 0e30f47232ab57c685258aa91adc3a3e67bd023e (diff) | |
download | linux-0e1b2fc4e5f681ba716f5a50da710251c717413d.tar.xz |
mtd: spi-nor: sfdp: get command opcode extension type from BFPT
Some devices in DTR mode expect an extra command byte called the
extension. The extension can either be same as the opcode, bitwise
inverse of the opcode, or another additional byte forming a 16-byte
opcode. Get the extension type from the BFPT. For now, only flashes with
"repeat" and "inverse" extensions are supported.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20201005153138.6437-5-p.yadav@ti.com
Diffstat (limited to 'drivers/mtd/spi-nor/sfdp.h')
-rw-r--r-- | drivers/mtd/spi-nor/sfdp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/sfdp.h b/drivers/mtd/spi-nor/sfdp.h index 7f9846b3a1ad..6d7243067252 100644 --- a/drivers/mtd/spi-nor/sfdp.h +++ b/drivers/mtd/spi-nor/sfdp.h @@ -90,6 +90,12 @@ struct sfdp_bfpt { #define BFPT_DWORD15_QER_SR2_BIT1_NO_RD (0x4UL << 20) #define BFPT_DWORD15_QER_SR2_BIT1 (0x5UL << 20) /* Spansion */ +#define BFPT_DWORD18_CMD_EXT_MASK GENMASK(30, 29) +#define BFPT_DWORD18_CMD_EXT_REP (0x0UL << 29) /* Repeat */ +#define BFPT_DWORD18_CMD_EXT_INV (0x1UL << 29) /* Invert */ +#define BFPT_DWORD18_CMD_EXT_RES (0x2UL << 29) /* Reserved */ +#define BFPT_DWORD18_CMD_EXT_16B (0x3UL << 29) /* 16-bit opcode */ + struct sfdp_parameter_header { u8 id_lsb; u8 minor; |