mtd: spi-nor-core: Prepare Read SR and FSR for Octal DTR mode
authorPratyush Yadav <p.yadav@ti.com>
Fri, 25 Jun 2021 19:17:20 +0000 (00:47 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 28 Jun 2021 06:32:39 +0000 (12:02 +0530)
commitb862765c7c9a64640ce557bc10a10b4f20e8584b
treef4123efd62c01cbad1f3bf11ecdb380a4968ac76
parent4d40e82663fe5ed8b65242bc28b3faaf838f5dcc
mtd: spi-nor-core: Prepare Read SR and FSR for Octal DTR mode

The xSPI Profile 1.0 table specifies how many dummy cycles and address
bytes are needed for the Read Status Register command in Octal DTR mode.
Use that information to send the correct Read SR command.

Some controllers might have trouble reading just 1 byte in DTR mode. So,
when we are in DTR mode read 2 bytes and discard the second. This shows
no side effects with the two flashes I tested: Micron mt35xu512aba and
Cypress s28hs512t.

Update Read FSR to mimic Read SR because they share the same
characteristics.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/spi-nor-core.c