OSDN Git Service

mmc: sdhci: call sdhci_init() before request irq
authorHaibo Chen <haibo.chen@freescale.com>
Tue, 15 Sep 2015 10:32:58 +0000 (18:32 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Oct 2015 14:59:55 +0000 (15:59 +0100)
commit14a7b416434a8076afb2dea8bb51c6514b41a47b
tree67e38d102d8dcbbb1386a070a20ab572cdd783cc
parent28804293b9086100ae784a15d62ebf6249db433c
mmc: sdhci: call sdhci_init() before request irq

sdhci_init() will clear all irqs and set the needed irqs. So
logically sdhci_init() should be called before request irq.

If not, some irqs may be triggled and handled wrongly. Take
the following into consideration, after request irq, if
SDIO card interrupt enabled, a sd card in the sd slot will
trigger a mass of interrupt(SDHCI_INT_CARD_INT), because at
this time, the vmmc-regulator still not restore, no voltage
supply for the sd card, so the pin of data0~data3 change and
keep low, interrupt(SDHCI_INT_CARD_INT) will rise up ceaselessly.
Due to we already reguest irq, system will be busy in handling
this endless irq, can't response to other event.

So we should call sdhci_init() before request irq in sd resume.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c