sdhci: Split card-detection IRQs management from sdhci_init()
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Mon, 16 Mar 2009 21:13:48 +0000 (00:13 +0300)
committerPierre Ossman <drzeus@drzeus.cx>
Tue, 24 Mar 2009 20:30:08 +0000 (21:30 +0100)
commit7260cf5e12393536ce61d184c3fc750fb2ba635a
treed5ffc4ed3d4051670dc93581cdbd22b2091ceee7
parent4e4141a526dd7f5ac3ce1458ae79ea6e5a515b06
sdhci: Split card-detection IRQs management from sdhci_init()

Card detection interrupts should be handled separately as they should
not be enabled before mmc_add_host() returns and should be disabled
before calling mmc_remove_host(). The same is for suspend and resume
routines.

sdhci_init() no longer enables card-detection irqs. Instead, two new
functions implemented: sdhci_enable_card_detection() and
sdhci_disable_card_detection().

New sdhci_reinit() call implemented to behave the same way as the old
sdhci_init().

Also, this patch implements and uses few new helpers to manage IRQs in
a more conveinient way, that is:

- sdhci_clear_set_irqs()
- sdhci_unmask_irqs()
- sdhci_mask_irqs()
- SDHCI_INT_ALL_MASK constant

sdhci_enable_sdio_irq() converted to these new helpers, plus the
helpers will be used by the subsequent patches.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h