diff options
author | Manuel Lauss <mano@roarinelk.homelinux.net> | 2008-06-09 02:38:03 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-07-15 08:14:43 -0400 |
commit | 20f522ff5583a818922b3f650f6f7ef0e3e1aa68 (patch) | |
tree | d8cbc986daff29529665f493331bbf11111018ed /drivers/mmc | |
parent | 281dd23ea03e9893c02d237d9e35a7d20d412452 (diff) |
au1xmmc: SDIO IRQ support.
Wire up the SD controllers' SDIO IRQ capability.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/au1xmmc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 2bd4cf427093..16b5640d826e 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c | |||
@@ -736,6 +736,9 @@ static irqreturn_t au1xmmc_irq(int irq, void *dev_id) | |||
736 | if (!(status & SD_STATUS_I)) | 736 | if (!(status & SD_STATUS_I)) |
737 | return IRQ_NONE; /* not ours */ | 737 | return IRQ_NONE; /* not ours */ |
738 | 738 | ||
739 | if (status & SD_STATUS_SI) /* SDIO */ | ||
740 | mmc_signal_sdio_irq(host->mmc); | ||
741 | |||
739 | if (host->mrq && (status & STATUS_TIMEOUT)) { | 742 | if (host->mrq && (status & STATUS_TIMEOUT)) { |
740 | if (status & SD_STATUS_RAT) | 743 | if (status & SD_STATUS_RAT) |
741 | host->mrq->cmd->error = -ETIMEDOUT; | 744 | host->mrq->cmd->error = -ETIMEDOUT; |
@@ -862,10 +865,21 @@ static void au1xmmc_dbdma_shutdown(struct au1xmmc_host *host) | |||
862 | } | 865 | } |
863 | #endif | 866 | #endif |
864 | 867 | ||
868 | static void au1xmmc_enable_sdio_irq(struct mmc_host *mmc, int en) | ||
869 | { | ||
870 | struct au1xmmc_host *host = mmc_priv(mmc); | ||
871 | |||
872 | if (en) | ||
873 | IRQ_ON(host, SD_CONFIG_SI); | ||
874 | else | ||
875 | IRQ_OFF(host, SD_CONFIG_SI); | ||
876 | } | ||
877 | |||
865 | static const struct mmc_host_ops au1xmmc_ops = { | 878 | static const struct mmc_host_ops au1xmmc_ops = { |
866 | .request = au1xmmc_request, | 879 | .request = au1xmmc_request, |
867 | .set_ios = au1xmmc_set_ios, | 880 | .set_ios = au1xmmc_set_ios, |
868 | .get_ro = au1xmmc_card_readonly, | 881 | .get_ro = au1xmmc_card_readonly, |
882 | .enable_sdio_irq = au1xmmc_enable_sdio_irq, | ||
869 | }; | 883 | }; |
870 | 884 | ||
871 | static void au1xmmc_poll_event(unsigned long arg) | 885 | static void au1xmmc_poll_event(unsigned long arg) |
@@ -964,7 +978,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev) | |||
964 | mmc->max_blk_count = 512; | 978 | mmc->max_blk_count = 512; |
965 | 979 | ||
966 | mmc->ocr_avail = AU1XMMC_OCR; | 980 | mmc->ocr_avail = AU1XMMC_OCR; |
967 | mmc->caps = MMC_CAP_4_BIT_DATA; | 981 | mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; |
968 | 982 | ||
969 | host->status = HOST_S_IDLE; | 983 | host->status = HOST_S_IDLE; |
970 | 984 | ||