Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  sdhci: make sure to clear the error interrupt
  mmc: at91_mci: wakeup on card insertion (or removal)
  mmc: add maintainer for at91
  • Loading branch information
Linus Torvalds committed Jul 21, 2007
2 parents c2e6805 + 964f9ce commit 5c4c148
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
7 changes: 6 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,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
Expand Down
13 changes: 12 additions & 1 deletion drivers/mmc/host/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
Expand All @@ -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);

Expand All @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions drivers/mmc/host/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c4c148

Please sign in to comment.