Commit ad9679f3 authored by Takahiro Kuwano's avatar Takahiro Kuwano Committed by Tudor Ambarus

mtd: spi-nor: sfdp: Fix index value for SCCR dwords

Array index for SCCR 22th DOWRD should be 21.

Fixes: 981a8d60 ("mtd: spi-nor: Parse SFDP SCCR Map")
Signed-off-by: default avatarTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: default avatarMichael Walle <michael@walle.cc>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/d8a2a77c2c95cf776e7dcae6392d29fdcf5d6307.1672026365.git.Takahiro.Kuwano@infineon.com
parent 1b929c02
...@@ -1228,7 +1228,7 @@ static int spi_nor_parse_sccr(struct spi_nor *nor, ...@@ -1228,7 +1228,7 @@ static int spi_nor_parse_sccr(struct spi_nor *nor,
le32_to_cpu_array(dwords, sccr_header->length); le32_to_cpu_array(dwords, sccr_header->length);
if (FIELD_GET(SCCR_DWORD22_OCTAL_DTR_EN_VOLATILE, dwords[22])) if (FIELD_GET(SCCR_DWORD22_OCTAL_DTR_EN_VOLATILE, dwords[21]))
nor->flags |= SNOR_F_IO_MODE_EN_VOLATILE; nor->flags |= SNOR_F_IO_MODE_EN_VOLATILE;
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment