diff options
author | Pratyush Yadav <p.yadav@ti.com> | 2021-06-26 00:47:24 +0530 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2021-06-28 12:04:53 +0530 |
commit | 575caf45004fb9be983db33f86425c95d4619213 (patch) | |
tree | 1b78fa1eb8f1498f250055ff30ee66db7ae2cc47 /drivers/mtd/spi/Kconfig | |
parent | a1122a3d98430754626547eb0acba11645039881 (diff) | |
download | u-boot-575caf45004fb9be983db33f86425c95d4619213.zip u-boot-575caf45004fb9be983db33f86425c95d4619213.tar.gz u-boot-575caf45004fb9be983db33f86425c95d4619213.tar.bz2 |
mtd: spi-nor-core: Perform a Soft Reset on shutdown
On probe, the SPI NOR core will put a flash in 8D-8D-8D mode if it
supports it. But Linux as of now expects to get the flash in 1S-1S-1S
mode. Handing the flash to Linux in Octal DTR mode means the kernel will
fail to detect the flash.
So, we need to reset to Power-on-Reset (POR) state before handing off
the flash. A Software Reset command can be used to do this.
One limitation of the soft reset is that it will restore state from
non-volatile registers in some flashes. This means that if the flash was
set to 8D mode in a non-volatile configuration, a soft reset won't help.
This commit assumes that we don't set any non-volatile bits anywhere,
and the flash doesn't have any non-volatile Octal DTR mode
configuration.
Since spi-nor-tiny doesn't (and likely shouldn't) have
spi_nor_soft_reset(), add a dummy spi_nor_remove() for it that does
nothing.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/mtd/spi/Kconfig')
-rw-r--r-- | drivers/mtd/spi/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index a701167..185ebbe 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -97,6 +97,13 @@ config SPI_FLASH_SMART_HWCAPS can support a type of operation in a much more refined way compared to using flags like SPI_RX_DUAL, SPI_TX_QUAD, etc. +config SPI_FLASH_SOFT_RESET + bool "Software Reset support for SPI NOR flashes" + default n + help + Enable support for xSPI Software Reset. It will be used to switch from + Octal DTR mode to legacy mode on shutdown and boot (if enabled). + config SPI_FLASH_BAR bool "SPI flash Bank/Extended address register support" help |