summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch
new file mode 100644
index 00000000..1c86b22d
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch
@@ -0,0 +1,51 @@
1From 75d9413d575f724e1f7c006fdef374fb1c200346 Mon Sep 17 00:00:00 2001
2From: David Vrabel <david.vrabel@csr.com>
3Date: Fri, 2 Apr 2010 08:41:47 -0700
4Subject: [PATCH 12/32] Don't turn SDIO cards off to save power. Doing so will lose all internal state in the card.
5
6Signed-off-by: David Vrabel <david.vrabel@csr.com>
7---
8 drivers/mmc/host/omap_hsmmc.c | 12 ++++++++----
9 1 files changed, 8 insertions(+), 4 deletions(-)
10
11diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
12index 15a023b..83f93ab 100644
13--- a/drivers/mmc/host/omap_hsmmc.c
14+++ b/drivers/mmc/host/omap_hsmmc.c
15@@ -29,6 +29,7 @@
16 #include <linux/mmc/host.h>
17 #include <linux/mmc/core.h>
18 #include <linux/mmc/mmc.h>
19+#include <linux/mmc/card.h>
20 #include <linux/io.h>
21 #include <linux/semaphore.h>
22 #include <linux/gpio.h>
23@@ -1760,8 +1761,12 @@ static int omap_hsmmc_sleep_to_off(struct omap_hsmmc_host *host)
24 mmc_slot(host).card_detect ||
25 (mmc_slot(host).get_cover_state &&
26 mmc_slot(host).get_cover_state(host->dev, host->slot_id)))) {
27- mmc_release_host(host->mmc);
28- return 0;
29+ goto out;
30+ }
31+
32+ /* Don't turn SDIO cards off. */
33+ if (host->mmc->card && mmc_card_sdio(host->mmc->card)) {
34+ goto out;
35 }
36
37 mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0);
38@@ -1772,9 +1777,8 @@ static int omap_hsmmc_sleep_to_off(struct omap_hsmmc_host *host)
39 host->dpm_state == CARDSLEEP ? "CARDSLEEP" : "REGSLEEP");
40
41 host->dpm_state = OFF;
42-
43+out:
44 mmc_release_host(host->mmc);
45-
46 return 0;
47 }
48
49--
501.6.6.1
51