Commit 541e7ef0 authored by Nicolas Ferre's avatar Nicolas Ferre Committed by Linus Torvalds

mmc: at91_mci: Enable MMC_CAP_SDIO_IRQ only when it actually works.

According to the datasheets AT91SAM9261 does not support SDIO interrupts,
and AT91SAM9260/9263 have an erratum requiring 4bit mode while using slot
B for the interrupt to work.
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Cc: Wolfgang Muees <wolfgang.mues@auerswald.de>
Cc: Andrew Victor <avictor.za@gmail.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9af13be2
...@@ -929,7 +929,7 @@ static int __init at91_mci_probe(struct platform_device *pdev) ...@@ -929,7 +929,7 @@ static int __init at91_mci_probe(struct platform_device *pdev)
mmc->f_min = 375000; mmc->f_min = 375000;
mmc->f_max = 25000000; mmc->f_max = 25000000;
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
mmc->caps = MMC_CAP_SDIO_IRQ; mmc->caps = 0;
mmc->max_blk_size = MCI_MAXBLKSIZE; mmc->max_blk_size = MCI_MAXBLKSIZE;
mmc->max_blk_count = MCI_BLKATONCE; mmc->max_blk_count = MCI_BLKATONCE;
...@@ -958,6 +958,13 @@ static int __init at91_mci_probe(struct platform_device *pdev) ...@@ -958,6 +958,13 @@ static int __init at91_mci_probe(struct platform_device *pdev)
goto fail5; goto fail5;
} }
/* Add SDIO capability when available */
if (cpu_is_at91sam9260() || cpu_is_at91sam9263()) {
/* AT91SAM9260/9263 erratum */
if (host->board->wire4 || !host->board->slot_b)
mmc->caps |= MMC_CAP_SDIO_IRQ;
}
/* /*
* Reserve GPIOs ... board init code makes sure these pins are set * Reserve GPIOs ... board init code makes sure these pins are set
* up as GPIOs with the right direction (input, except for vcc) * up as GPIOs with the right direction (input, except for vcc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment