]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: dw: Disable clock after unregistering the host
authorMarek Vasut <marex@denx.de>
Tue, 18 Apr 2017 18:09:06 +0000 (20:09 +0200)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:49 +0000 (21:33 -0400)
commit6057cc8646ea50afc63824c56d8be5965c8c20b6
tree9700ae6fe04068a05f71c6cee14f96e443b29bed
parent4810dc942f3ce46eb005e64b0fe3c3d7cf5e9703
spi: dw: Disable clock after unregistering the host

[ Upstream commit 400c18e3dc86e04ef5afec9b86a8586ca629b9e9 ]

The dw_mmio driver disables the block clock before unregistering
the host. The code unregistering the host may access the SPI block
registers. If register access happens with block clock disabled,
this may lead to a bus hang. Disable the clock after unregistering
the host to prevent such situation.

This bug was observed on Altera Cyclone V SoC.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/spi/spi-dw-mmio.c