]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: micron-st: write 2 bytes when disabling Octal DTR mode
authorPratyush Yadav <p.yadav@ti.com>
Mon, 31 May 2021 18:17:54 +0000 (23:47 +0530)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 23 Dec 2021 13:04:13 +0000 (15:04 +0200)
commit58e7738398705889e867becae7802eb8fe6e1d51
tree20e28aa3c303d2c5a856229afb9cfb65d8abe938
parent2e2d58a9787a8175e00eabe96cf99e79673bcd73
mtd: spi-nor: micron-st: write 2 bytes when disabling Octal DTR mode

The Octal DTR configuration is stored in the CFR0V register. This
register is 1 byte wide. But 1 byte long transactions are not allowed in
8D-8D-8D mode. The next byte address contains the CFR1V register, which
contains the number of dummy cycles. This is very fortunate since the
enable path changes the value of this register. Reset the value to its
default when disabling Octal DTR mode. This way, both changes to the
flash state made when enabling can be reverted in one single
transaction.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20210531181757.19458-4-p.yadav@ti.com
drivers/mtd/spi-nor/micron-st.c