mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
mtd: spi-nor: sfdp: get the 1-1-8 and 1-8-8 page programs from 4BAIT
Commit af2792abd4 ("mtd: spi-nor: sfdp: get the 1-1-8 and 1-8-8
protocol from SFDP") taught the core to discover octal read support
from BFPT, but the 4-Byte Address Instruction Table parser was never
extended accordingly.
Parse the 1-1-8 and 1-8-8 page program bits of 4BAIT DWORD1 and set the
corresponding 4-byte opcodes, so that octal writes stay available once
the flash switches to the 4-byte address instruction set.
This is in preparation of adding support for the ISSI IS25WX01G, a
1 Gbit octal flash which is beyond the 3-byte address range and
advertises 4-byte 1-1-8 and 1-8-8 page program instructions.
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Michael Walle <mwalle@kernel.org>
This commit is contained in:
parent
ceedf3193c
commit
68d7115d77
|
|
@ -1088,6 +1088,8 @@ static int spi_nor_parse_4bait(struct spi_nor *nor,
|
|||
{ SNOR_HWCAPS_PP, BIT(6) },
|
||||
{ SNOR_HWCAPS_PP_1_1_4, BIT(7) },
|
||||
{ SNOR_HWCAPS_PP_1_4_4, BIT(8) },
|
||||
{ SNOR_HWCAPS_PP_1_1_8, BIT(23) },
|
||||
{ SNOR_HWCAPS_PP_1_8_8, BIT(24) },
|
||||
};
|
||||
static const struct sfdp_4bait erases[SNOR_ERASE_TYPE_MAX] = {
|
||||
{ 0u /* not used */, BIT(9) },
|
||||
|
|
@ -1214,6 +1216,14 @@ static int spi_nor_parse_4bait(struct spi_nor *nor,
|
|||
spi_nor_set_pp_settings(¶ms_pp[SNOR_CMD_PP_1_4_4],
|
||||
SPINOR_OP_PP_1_4_4_4B,
|
||||
SNOR_PROTO_1_4_4);
|
||||
if (pp_hwcaps & SNOR_HWCAPS_PP_1_1_8)
|
||||
spi_nor_set_pp_settings(¶ms_pp[SNOR_CMD_PP_1_1_8],
|
||||
SPINOR_OP_PP_1_1_8_4B,
|
||||
SNOR_PROTO_1_1_8);
|
||||
if (pp_hwcaps & SNOR_HWCAPS_PP_1_8_8)
|
||||
spi_nor_set_pp_settings(¶ms_pp[SNOR_CMD_PP_1_8_8],
|
||||
SPINOR_OP_PP_1_8_8_4B,
|
||||
SNOR_PROTO_1_8_8);
|
||||
|
||||
for (i = 0; i < SNOR_ERASE_TYPE_MAX; i++) {
|
||||
if (erase_mask & BIT(i))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user