]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbfd867f9ac014ca7841184067d8406b2603ff336
tree67e38d102d8dcbbb1386a070a20ab572cdd783cc
parent7bda9b14a0e730407dc93a2a1820737cf10e41aa
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