linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] mmc : omap_hsmmc : Save and restore the sysc across reset
@ 2012-01-16 11:33 Shubhrajyoti D
  2012-01-16 13:11 ` ext-denis.2.karpov
  0 siblings, 1 reply; 5+ messages in thread
From: Shubhrajyoti D @ 2012-01-16 11:33 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-kernel, Shubhrajyoti D, Denis Karpov

The commit 11dd62:[omap_hsmmc: context save/restore support]

does a reset and restores AUTOIDLE settings.
This patch saves the register does a reset and restores
the same configuration.

Cc: Denis Karpov <ext-denis.2.karpov@nokia.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
Untested
 drivers/mmc/host/omap_hsmmc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index fd0c661..175029d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -680,7 +680,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
 	struct mmc_ios *ios = &host->mmc->ios;
 	struct omap_mmc_platform_data *pdata = host->pdata;
 	int context_loss = 0;
-	u32 hctl, capa;
+	u32 hctl, capa, sysc;
 	unsigned long timeout;
 
 	if (pdata->get_context_loss_count) {
@@ -700,6 +700,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
 		&& time_before(jiffies, timeout))
 		;
 
+	sysc = OMAP_HSMMC_READ(host->base, SYSCONFIG);
 	/* Do software reset */
 	OMAP_HSMMC_WRITE(host->base, SYSCONFIG, SOFTRESET);
 	timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS);
@@ -707,8 +708,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
 		&& time_before(jiffies, timeout))
 		;
 
-	OMAP_HSMMC_WRITE(host->base, SYSCONFIG,
-			OMAP_HSMMC_READ(host->base, SYSCONFIG) | AUTOIDLE);
+	OMAP_HSMMC_WRITE(host->base, SYSCONFIG, sysc);
 
 	if (host->id == OMAP_MMC1_DEVID) {
 		if (host->power_mode != MMC_POWER_OFF &&
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-16 16:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 11:33 [PATCH RFC] mmc : omap_hsmmc : Save and restore the sysc across reset Shubhrajyoti D
2012-01-16 13:11 ` ext-denis.2.karpov
2012-01-16 14:22   ` Shubhrajyoti
2012-01-16 14:53     ` ext-denis.2.karpov
2012-01-16 16:49       ` Shubhrajyoti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).