diff options
author | Dhruva Gole <d-gole@ti.com> | 2022-11-17 17:41:01 +0530 |
---|---|---|
committer | Anand Gadiyar <gadiyar@ti.com> | 2022-11-21 09:33:37 -0600 |
commit | 15d6f04fd76c5646b5b609e2606425182710130b (patch) | |
tree | 4a26e016c5c806ab3bee2f8749476ec03433ad34 /drivers | |
parent | 4e09478aa64a2959f9071d74359d7efca1b2c826 (diff) |
mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte
Commit 72151ad10f8dcc3c86084259b227a7d70cc79473 upstream.
Cypress chips support SPINOR_OP_EN4B(B7h) to enable 4-byte addressing mode.
Cypress chips support B8h to disable 4-byte addressing mode instead of
SPINOR_OP_EX4B(E9h).
This patch defines new opcode and updates set_4byte() to support
enable/disable 4-byte addressing mode for Cypress chips.
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/spi/spi-nor-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 57719229f5..64274f0276 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -673,6 +673,9 @@ static int set_4byte(struct spi_nor *nor, const struct flash_info *info, } return status; + case SNOR_MFR_CYPRESS: + cmd = enable ? SPINOR_OP_EN4B : SPINOR_OP_EX4B_CYPRESS; + return nor->write_reg(nor, cmd, NULL, 0); default: /* Spansion style */ nor->cmd_buf[0] = enable << 7; |