]> git.baikalelectronics.ru Git - uboot.git/commit
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)
commit676a826b10d1a8d1cab57732b9d9c40189b7076b
treef4123efd62c01cbad1f3bf11ecdb380a4968ac76
parent6fc91526193e651439d87f776f02c3b2505cacf4
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