summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor/sfdp.c
diff options
context:
space:
mode:
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>2022-08-31 13:59:03 +0900
committerTudor Ambarus <tudor.ambarus@microchip.com>2022-10-25 05:11:34 +0300
commitd189614f24799ce150eaf3ecca8483c0a3697e9b (patch)
tree7bc983d79f4841f749108bd3ae721233c3330fb0 /drivers/mtd/spi-nor/sfdp.c
parent8f1ee9ef71d0c0b185d2afc800e68d6addf29fe5 (diff)
downloadlinux-d189614f24799ce150eaf3ecca8483c0a3697e9b.tar.bz2
mtd: spi-nor: sfdp: Update params->hwcaps.mask at xSPI profile 1.0 table parse
Existece of xSPI profile 1.0 table implies that the flash supports read and program in 8D-8D-8D mode. Update the params->hwcaps.mask in spi_nor_parase_profile1(). Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/1b449bae6978f11f7636f2b5acb6435723963f59.1661915569.git.Takahiro.Kuwano@infineon.com
Diffstat (limited to 'drivers/mtd/spi-nor/sfdp.c')
-rw-r--r--drivers/mtd/spi-nor/sfdp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c
index 2257f1b4c2e2..15fb7f661ae9 100644
--- a/drivers/mtd/spi-nor/sfdp.c
+++ b/drivers/mtd/spi-nor/sfdp.c
@@ -1183,10 +1183,17 @@ static int spi_nor_parse_profile1(struct spi_nor *nor,
dummy = round_up(dummy, 2);
/* Update the fast read settings. */
+ nor->params->hwcaps.mask |= SNOR_HWCAPS_READ_8_8_8_DTR;
spi_nor_set_read_settings(&nor->params->reads[SNOR_CMD_READ_8_8_8_DTR],
0, dummy, opcode,
SNOR_PROTO_8_8_8_DTR);
+ /*
+ * Page Program is "Required Command" in the xSPI Profile 1.0. Update
+ * the params->hwcaps.mask here.
+ */
+ nor->params->hwcaps.mask |= SNOR_HWCAPS_PP_8_8_8_DTR;
+
out:
kfree(dwords);
return ret;