From 8952f13bfb4b844171551ee0eaaabf2d83105883 Mon Sep 17 00:00:00 2001 From: Bridge Wu Date: Tue, 25 Sep 2007 19:11:00 +0200 Subject: [PATCH] --- yaml --- r: 65647 b: refs/heads/master c: 5d3ad4e8a12e538eead0a37d22b1ba6aec0f2127 h: refs/heads/master i: 65645: 81605f18623d030557ddfb7859d0bfd7cd9c46b3 65643: ffa9650bebf69dc5d534d321a0eea67ff030a0cd 65639: 62a8af838ae86a2a2313638c0d066b2f390e8e5c 65631: 1afdbc65f2c3eaeb1c3c303a2931181e5277cf3b v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/pxamci.c | 28 +++++++++++++++++++++++----- trunk/drivers/mmc/host/pxamci.h | 1 + 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index fb869347a330..aa825424cc19 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: df456f479aa6fdc812df51627c6f2c21d8a1aed8 +refs/heads/master: 5d3ad4e8a12e538eead0a37d22b1ba6aec0f2127 diff --git a/trunk/drivers/mmc/host/pxamci.c b/trunk/drivers/mmc/host/pxamci.c index 6549f546df55..91e25683b397 100644 --- a/trunk/drivers/mmc/host/pxamci.c +++ b/trunk/drivers/mmc/host/pxamci.c @@ -309,6 +309,10 @@ static irqreturn_t pxamci_irq(int irq, void *devid) handled |= pxamci_cmd_done(host, stat); if (ireg & DATA_TRAN_DONE) handled |= pxamci_data_done(host, stat); + if (ireg & SDIO_INT) { + mmc_signal_sdio_irq(host->mmc); + handled = 1; + } } return IRQ_RETVAL(handled); @@ -391,10 +395,21 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->clkrt, host->cmdat); } +static void pxamci_enable_sdio_irq(struct mmc_host *host, int enable) +{ + struct pxamci_host *pxa_host = mmc_priv(host); + + if (enable) + pxamci_enable_irq(pxa_host, SDIO_INT); + else + pxamci_disable_irq(pxa_host, SDIO_INT); +} + static const struct mmc_host_ops pxamci_ops = { - .request = pxamci_request, - .get_ro = pxamci_get_ro, - .set_ios = pxamci_set_ios, + .request = pxamci_request, + .get_ro = pxamci_get_ro, + .set_ios = pxamci_set_ios, + .enable_sdio_irq = pxamci_enable_sdio_irq, }; static void pxamci_dma_irq(int dma, void *devid) @@ -466,8 +481,11 @@ static int pxamci_probe(struct platform_device *pdev) host->pdata->ocr_mask : MMC_VDD_32_33|MMC_VDD_33_34; mmc->caps = 0; - if (!cpu_is_pxa21x() && !cpu_is_pxa25x()) - mmc->caps |= MMC_CAP_4_BIT_DATA; + host->cmdat = 0; + if (!cpu_is_pxa21x() && !cpu_is_pxa25x()) { + mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; + host->cmdat |= CMDAT_SDIO_INT_EN; + } host->sg_cpu = dma_alloc_coherent(&pdev->dev, PAGE_SIZE, &host->sg_dma, GFP_KERNEL); if (!host->sg_cpu) { diff --git a/trunk/drivers/mmc/host/pxamci.h b/trunk/drivers/mmc/host/pxamci.h index 5655be823a00..3153e779d46a 100644 --- a/trunk/drivers/mmc/host/pxamci.h +++ b/trunk/drivers/mmc/host/pxamci.h @@ -25,6 +25,7 @@ #define SPI_EN (1 << 0) #define MMC_CMDAT 0x0010 +#define CMDAT_SDIO_INT_EN (1 << 11) #define CMDAT_SD_4DAT (1 << 8) #define CMDAT_DMAEN (1 << 7) #define CMDAT_INIT (1 << 6)