summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>2018-03-28 18:00:47 -0300
committerUlf Hansson <ulf.hansson@linaro.org>2018-05-02 15:08:31 +0200
commit436a3cfddcb7a9b92a2035464139ea6be2afe74c (patch)
treedf3e5374ddb8cca278f23100d79efdfc8c416751 /drivers/mmc
parent39e9ef1dca795d054f2708e284a3284228cdebbc (diff)
downloadop-kernel-dev-436a3cfddcb7a9b92a2035464139ea6be2afe74c.zip
op-kernel-dev-436a3cfddcb7a9b92a2035464139ea6be2afe74c.tar.gz
mmc: jz4740: Reset the device requesting the interrupt
In case a bootloader leaves the device in a bad state, requesting the interrupt before resetting results in a bad interrupt loop. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> [Ezequiel: cleanup commit description] Tested-by: Mathieu Malaterre <malat@debian.org> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.co.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/jz4740_mmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index b11f650..9f316d9 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -1027,6 +1027,8 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
spin_lock_init(&host->lock);
host->irq_mask = 0xffff;
+ jz4740_mmc_reset(host);
+
ret = request_threaded_irq(host->irq, jz_mmc_irq, jz_mmc_irq_worker, 0,
dev_name(&pdev->dev), host);
if (ret) {
@@ -1034,7 +1036,6 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
goto err_free_gpios;
}
- jz4740_mmc_reset(host);
jz4740_mmc_clock_disable(host);
timer_setup(&host->timeout_timer, jz4740_mmc_timeout, 0);
OpenPOWER on IntegriCloud