]> git.ipfire.org Git - thirdparty/u-boot.git/commit
mtd: spi-nor: Fix read SFDP data in dual parallel mode
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 18 Jun 2021 15:39:04 +0000 (17:39 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 30 Jun 2021 09:26:12 +0000 (11:26 +0200)
commitb8c90c2d903aeccc10a0011e2937cb4eeb3d4655
tree602ce0ddca9a698ece08f42d3bd14e9f4ad88d3d
parent7093e16dd4987089a1d2709d3fc79d74f036ddf2
mtd: spi-nor: Fix read SFDP data in dual parallel mode

Reading the SFDP data is broken in two ways in dual parallel mode in the
current implementation.

1) It reads the data interleaved from both chips, which results in data
that can not be parsed. Since both chips have to be identical for dual
parallel mode the SFDP data will also be identical. So only read the data
from one of the chips.

2) The page, erase and chip size are not update to reflect that they should
be twice as large in dual parallel mode. Fix this by moving the update of
those parameter after running the SFDP detection rather than doing it
before.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
drivers/mtd/spi/spi-nor-core.c