diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-20 21:10:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-20 21:10:03 -0400 |
commit | 5c4c1489b93c9dc51cc6e97fd73e325ce94983c0 (patch) | |
tree | 16dc1628d614b882bb36fa57bdc88b1d30a83711 | |
parent | c2e68052429fdf87702fccd272951282bef1c60a (diff) | |
parent | 964f9ce2ff42dc47cf40fbd2f5c81cd60689e384 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
-rw-r--r-- | MAINTAINERS | 7 | ||||
-rw-r--r-- | drivers/mmc/host/at91_mci.c | 13 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 1 |
4 files changed, 21 insertions, 2 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index f49c5563f060..773c732b4177 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -651,7 +651,12 @@ W: http://linux-atm.sourceforge.net | |||
651 | S: Maintained | 651 | S: Maintained |
652 | 652 | ||
653 | ATMEL AT91 MCI DRIVER | 653 | ATMEL AT91 MCI DRIVER |
654 | S: Orphan | 654 | P: Nicolas Ferre |
655 | M: nicolas.ferre@rfo.atmel.com | ||
656 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | ||
657 | W: http://www.atmel.com/products/AT91/ | ||
658 | W: http://www.at91.com/ | ||
659 | S: Maintained | ||
655 | 660 | ||
656 | ATMEL MACB ETHERNET DRIVER | 661 | ATMEL MACB ETHERNET DRIVER |
657 | P: Haavard Skinnemoen | 662 | P: Haavard Skinnemoen |
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 28c881895ab7..15aab374127e 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) | |||
903 | /* | 903 | /* |
904 | * Add host to MMC layer | 904 | * Add host to MMC layer |
905 | */ | 905 | */ |
906 | if (host->board->det_pin) | 906 | if (host->board->det_pin) { |
907 | host->present = !at91_get_gpio_value(host->board->det_pin); | 907 | host->present = !at91_get_gpio_value(host->board->det_pin); |
908 | device_init_wakeup(&pdev->dev, 1); | ||
909 | } | ||
908 | else | 910 | else |
909 | host->present = -1; | 911 | host->present = -1; |
910 | 912 | ||
@@ -940,6 +942,7 @@ static int __exit at91_mci_remove(struct platform_device *pdev) | |||
940 | host = mmc_priv(mmc); | 942 | host = mmc_priv(mmc); |
941 | 943 | ||
942 | if (host->present != -1) { | 944 | if (host->present != -1) { |
945 | device_init_wakeup(&pdev->dev, 0); | ||
943 | free_irq(host->board->det_pin, host); | 946 | free_irq(host->board->det_pin, host); |
944 | cancel_delayed_work(&host->mmc->detect); | 947 | cancel_delayed_work(&host->mmc->detect); |
945 | } | 948 | } |
@@ -966,8 +969,12 @@ static int __exit at91_mci_remove(struct platform_device *pdev) | |||
966 | static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) | 969 | static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) |
967 | { | 970 | { |
968 | struct mmc_host *mmc = platform_get_drvdata(pdev); | 971 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
972 | struct at91mci_host *host = mmc_priv(mmc); | ||
969 | int ret = 0; | 973 | int ret = 0; |
970 | 974 | ||
975 | if (device_may_wakeup(&pdev->dev)) | ||
976 | enable_irq_wake(host->board->det_pin); | ||
977 | |||
971 | if (mmc) | 978 | if (mmc) |
972 | ret = mmc_suspend_host(mmc, state); | 979 | ret = mmc_suspend_host(mmc, state); |
973 | 980 | ||
@@ -977,8 +984,12 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) | |||
977 | static int at91_mci_resume(struct platform_device *pdev) | 984 | static int at91_mci_resume(struct platform_device *pdev) |
978 | { | 985 | { |
979 | struct mmc_host *mmc = platform_get_drvdata(pdev); | 986 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
987 | struct at91mci_host *host = mmc_priv(mmc); | ||
980 | int ret = 0; | 988 | int ret = 0; |
981 | 989 | ||
990 | if (device_may_wakeup(&pdev->dev)) | ||
991 | disable_irq_wake(host->board->det_pin); | ||
992 | |||
982 | if (mmc) | 993 | if (mmc) |
983 | ret = mmc_resume_host(mmc); | 994 | ret = mmc_resume_host(mmc); |
984 | 995 | ||
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 10d15c39d003..4a24db028d87 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) | |||
1024 | 1024 | ||
1025 | intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); | 1025 | intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); |
1026 | 1026 | ||
1027 | intmask &= ~SDHCI_INT_ERROR; | ||
1028 | |||
1027 | if (intmask & SDHCI_INT_BUS_POWER) { | 1029 | if (intmask & SDHCI_INT_BUS_POWER) { |
1028 | printk(KERN_ERR "%s: Card is consuming too much power!\n", | 1030 | printk(KERN_ERR "%s: Card is consuming too much power!\n", |
1029 | mmc_hostname(host->mmc)); | 1031 | mmc_hostname(host->mmc)); |
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 7400f4bc114f..a6c870480b8a 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -107,6 +107,7 @@ | |||
107 | #define SDHCI_INT_CARD_INSERT 0x00000040 | 107 | #define SDHCI_INT_CARD_INSERT 0x00000040 |
108 | #define SDHCI_INT_CARD_REMOVE 0x00000080 | 108 | #define SDHCI_INT_CARD_REMOVE 0x00000080 |
109 | #define SDHCI_INT_CARD_INT 0x00000100 | 109 | #define SDHCI_INT_CARD_INT 0x00000100 |
110 | #define SDHCI_INT_ERROR 0x00008000 | ||
110 | #define SDHCI_INT_TIMEOUT 0x00010000 | 111 | #define SDHCI_INT_TIMEOUT 0x00010000 |
111 | #define SDHCI_INT_CRC 0x00020000 | 112 | #define SDHCI_INT_CRC 0x00020000 |
112 | #define SDHCI_INT_END_BIT 0x00040000 | 113 | #define SDHCI_INT_END_BIT 0x00040000 |