From 81764fa9a472dd72b93385f30f718ed4f98ec129 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Sun, 15 Jul 2007 18:47:38 +0200 Subject: mmc: add maintainer for at91 Nicolas Ferre has taken it upon himself to look after the AT91 MMC host driver. Signed-off-by: Pierre Ossman --- MAINTAINERS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index fbe0dca1c0e..c9fab2be2c2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -645,7 +645,12 @@ W: http://linux-atm.sourceforge.net S: Maintained ATMEL AT91 MCI DRIVER -S: Orphan +P: Nicolas Ferre +M: nicolas.ferre@rfo.atmel.com +L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) +W: http://www.atmel.com/products/AT91/ +W: http://www.at91.com/ +S: Maintained ATMEL MACB ETHERNET DRIVER P: Haavard Skinnemoen -- cgit v1.2.3 From 63b66438860f246f25f5563cde4978cf255cb810 Mon Sep 17 00:00:00 2001 From: Marc Pignat Date: Mon, 16 Jul 2007 11:07:02 +0200 Subject: mmc: at91_mci: wakeup on card insertion (or removal) This piece of code enable the system to be wake-up by a card insertion or removal. Signed-off-by: Marc Pignat Signed-off-by: Nicolas Ferre Signed-off-by: Pierre Ossman --- drivers/mmc/host/at91_mci.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 28c881895ab..15aab374127 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -903,8 +903,10 @@ static int __init at91_mci_probe(struct platform_device *pdev) /* * Add host to MMC layer */ - if (host->board->det_pin) + if (host->board->det_pin) { host->present = !at91_get_gpio_value(host->board->det_pin); + device_init_wakeup(&pdev->dev, 1); + } else host->present = -1; @@ -940,6 +942,7 @@ static int __exit at91_mci_remove(struct platform_device *pdev) host = mmc_priv(mmc); if (host->present != -1) { + device_init_wakeup(&pdev->dev, 0); free_irq(host->board->det_pin, host); cancel_delayed_work(&host->mmc->detect); } @@ -966,8 +969,12 @@ static int __exit at91_mci_remove(struct platform_device *pdev) static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) { struct mmc_host *mmc = platform_get_drvdata(pdev); + struct at91mci_host *host = mmc_priv(mmc); int ret = 0; + if (device_may_wakeup(&pdev->dev)) + enable_irq_wake(host->board->det_pin); + if (mmc) ret = mmc_suspend_host(mmc, state); @@ -977,8 +984,12 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) static int at91_mci_resume(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); + struct at91mci_host *host = mmc_priv(mmc); int ret = 0; + if (device_may_wakeup(&pdev->dev)) + disable_irq_wake(host->board->det_pin); + if (mmc) ret = mmc_resume_host(mmc); -- cgit v1.2.3 From 964f9ce2ff42dc47cf40fbd2f5c81cd60689e384 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 20 Jul 2007 18:20:36 +0200 Subject: sdhci: make sure to clear the error interrupt The controller has a bit indicating that one of the higher bits (the error bits) are set. A previous bug caused this bit to be masked, but since that bug has been fixed we have to clear it explicictly. Signed-off-by: Pierre Ossman --- drivers/mmc/host/sdhci.c | 2 ++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 10d15c39d00..4a24db028d8 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1024,6 +1024,8 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); + intmask &= ~SDHCI_INT_ERROR; + if (intmask & SDHCI_INT_BUS_POWER) { printk(KERN_ERR "%s: Card is consuming too much power!\n", mmc_hostname(host->mmc)); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 7400f4bc114..a6c870480b8 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -107,6 +107,7 @@ #define SDHCI_INT_CARD_INSERT 0x00000040 #define SDHCI_INT_CARD_REMOVE 0x00000080 #define SDHCI_INT_CARD_INT 0x00000100 +#define SDHCI_INT_ERROR 0x00008000 #define SDHCI_INT_TIMEOUT 0x00010000 #define SDHCI_INT_CRC 0x00020000 #define SDHCI_INT_END_BIT 0x00040000 -- cgit v1.2.3