spi: spi-fsl-qspi: Clear TDH bits in FLSHCR register
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Mon, 7 Oct 2019 07:23:02 +0000 (07:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:43:12 +0000 (08:43 +0100)
commitc69b17da53b2e68f612941ab2d534c8bca9986a3
tree2789e27c8d4052eeb37e0545e2cdd6561b37a4a2
parentd8d63ea238cc34dd3874969b13d44a158cd0fdd0
spi: spi-fsl-qspi: Clear TDH bits in FLSHCR register

commit f6910679e17ad4915f008bd2c614d38052426f7c upstream.

Later versions of the QSPI controller (e.g. in i.MX6UL/ULL and i.MX7)
seem to have an additional TDH setting in the FLSHCR register, that
needs to be set in accordance with the access mode that is used (DDR
or SDR).

Previous bootstages such as BootROM or bootloader might have used the
DDR mode to access the flash. As we currently only use SDR mode, we
need to make sure the TDH bits are cleared upon initialization.

Fixes: 84d043185dbe ("spi: Add a driver for the Freescale/NXP QuadSPI controller")
Cc: <stable@vger.kernel.org>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: Han Xu <han.xu@nxp.com>
Link: https://lore.kernel.org/r/20191007071933.26786-1-frieder.schrempf@kontron.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-fsl-qspi.c