From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Pierre Ossman <drzeus@drzeus.cx>
Cc: ARM Linux Mailing List <linux-arm-kernel@lists.arm.linux.org.uk>,
Andrew Victor <linux@maxim.org.za>,
Ville Syrjala <syrjala@sci.fi>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/3] at91_mci: Enable MMC_CAP_SDIO_IRQ only when it actually works
Date: Thu, 17 Jul 2008 11:34:07 +0200 [thread overview]
Message-ID: <487F120F.2050305@atmel.com> (raw)
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: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Original patch from Ville Syrjala.
I removed the rm9200 from the original patch as this chip is not
SDIO capable (error in datasheet).
drivers/mmc/host/at91_mci.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 59bf71e..f3d725e 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -1000,7 +1000,7 @@ static int __init at91_mci_probe(struct platform_device *pdev)
mmc->f_min = 375000;
mmc->f_max = 25000000;
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
- mmc->caps = MMC_CAP_SDIO_IRQ;
+ mmc->caps = 0;
mmc->max_blk_size = 4095;
mmc->max_blk_count = mmc->max_req_size;
@@ -1018,6 +1018,13 @@ static int __init at91_mci_probe(struct platform_device *pdev)
" - using 1 wire\n");
}
+ /* 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
* up as GPIOs with the right direction (input, except for vcc)
--
1.5.3.7
next reply other threads:[~2008-07-17 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 9:34 Nicolas Ferre [this message]
2008-07-17 10:55 ` [PATCH 1/3] at91_mci: Enable MMC_CAP_SDIO_IRQ only when it actually works Pierre Ossman
2008-07-18 13:30 ` Nicolas Ferre
2008-07-18 23:01 ` Pierre Ossman
2008-07-20 9:55 ` ian
2008-07-20 11:13 ` Pierre Ossman
2008-07-20 23:28 ` ian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=487F120F.2050305@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=drzeus@drzeus.cx \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@maxim.org.za \
--cc=syrjala@sci.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.