spi: imx: do not access registers while clocks disabled
commitbac4bf53ca7c65d6c06808aab70c6caa0b9c78b9
authorStefan Agner <stefan@agner.ch>
Sun, 7 Jan 2018 14:05:49 +0000 (7 15:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:58:42 +0000 (3 17:58 +0100)
treef356a4683a01a8f246c9df9419fbf372c65ea058
parent68c610bf1e38e3a01a17bd101b089102a76d03b3
spi: imx: do not access registers while clocks disabled

commit d593574aff0ab846136190b1729c151c736727ec upstream.

Since clocks are disabled except during message transfer clocks
are also disabled when spi_imx_remove gets called. Accessing
registers leads to a freeeze at least on a i.MX 6ULL. Enable
clocks before disabling accessing the MXC_CSPICTRL register.

Fixes: 9e556dcc55774 ("spi: spi-imx: only enable the clocks when we start to transfer a message")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-imx.c