diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2024-10-26 22:16:18 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-31 10:49:47 -0600 |
commit | 19e189b1de0c12cbd5a93aa37da675ee4b076d24 (patch) | |
tree | 3bef22a885fedbaeeb9f39859211bb6919526520 /lib/mbedtls/sha256.c | |
parent | 8963d433eb5d4a9f3a9def84e9c61a45c13e72bc (diff) |
mtd: spi-nor: Remove recently added nor->addr_width == 3 test
Remove undocumented nor->addr_width == 3 test. This was added in commit
5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
without any explanation in the commit message. Remove it.
This also has a bad side-effect which breaks READ operation of every SPI NOR
which does not use addr_width == 3, e.g. s25fs512s does not work at all. This
is because if addr_width != 3, rem_bank_len is always 0, and if rem_bank_len
is 0, then read_len is 0 and if read_len is 0, then the spi_nor_read() returns
-EIO.
Basic reproducer is as follows:
"
=> sf probe ; sf read 0x50000000 0 0x10000
SF: Detected s25fs512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB
device 0 offset 0x0, size 0x10000
SF: 65536 bytes @ 0x0 Read: ERROR -5
"
Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Diffstat (limited to 'lib/mbedtls/sha256.c')
0 files changed, 0 insertions, 0 deletions