diff options
author | Takahiro Kuwano <Takahiro.Kuwano@infineon.com> | 2022-09-12 08:25:40 +0300 |
---|---|---|
committer | Jagan Teki <jagan@edgeble.ai> | 2022-10-23 08:22:16 +0300 |
commit | e28d3ead7258ce1deb87003d0064b16ec50abc81 (patch) | |
tree | ebb9959d0c20848abb0b9e0998deefa72e15361a /drivers/mtd | |
parent | 7a4b6f8cf72e3566fd67ea840d248d8a34b8083e (diff) | |
download | u-boot-e28d3ead7258ce1deb87003d0064b16ec50abc81.tar.xz |
mtd: spi-nor-core: Fix index value for SCCR dwords
Array index for SCCR 22th DWORD should be 21.
Fixes: bebdc237507c ("mtd: spi-nor: Parse SFDP SCCR Map")
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 44674cbec0..78de3c5281 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -2520,7 +2520,7 @@ static int spi_nor_parse_sccr(struct spi_nor *nor, for (i = 0; i < sccr_header->length; i++) table[i] = le32_to_cpu(table[i]); - if (FIELD_GET(SCCR_DWORD22_OCTAL_DTR_EN_VOLATILE, table[22])) + if (FIELD_GET(SCCR_DWORD22_OCTAL_DTR_EN_VOLATILE, table[21])) nor->flags |= SNOR_F_IO_MODE_EN_VOLATILE; out: |