diff options
author | Takahiro Kuwano <Takahiro.Kuwano@infineon.com> | 2021-06-29 15:01:02 +0900 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2021-06-29 19:16:54 +0530 |
commit | 72151ad10f8dcc3c86084259b227a7d70cc79473 (patch) | |
tree | 475d783fcf6b2b7de17377c3d74d21ed7edfdf33 /drivers/mtd | |
parent | d2d79895da1b80275fe0ffd84d697519c73c924d (diff) | |
download | u-boot-72151ad10f8dcc3c86084259b227a7d70cc79473.tar.gz |
mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte
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>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/mtd')
-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 7f1ed1bb36..94dfa97110 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -662,6 +662,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; |