public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Venkatraman S <svenkatr@ti.com>
To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org
Cc: cjb@laptop.org, balajitk@ti.com, vishp@ti.com,
	Venkatraman S <svenkatr@ti.com>
Subject: [PATCH 06/10] mmc: omap_hsmmc: remove access to SYSCONFIG register
Date: Sat, 18 Aug 2012 00:22:26 +0530	[thread overview]
Message-ID: <1345229550-8672-7-git-send-email-svenkatr@ti.com> (raw)
In-Reply-To: <1345229550-8672-1-git-send-email-svenkatr@ti.com>

SYSCONFIG register of HSMMC IP is managed by the omap hwmod
abstraction layer. Resetting the IP and configuring the correct
SYSCONFIG mode is centrally managed by hwmod.

Remove code which manipulates IP reset and SYSCONFIG directly in the
driver.

Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index da4f5a7..4bc55ac 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -44,7 +44,6 @@
 #include <plat/cpu.h>
 
 /* OMAP HSMMC Host Controller Registers */
-#define OMAP_HSMMC_SYSCONFIG	0x0010
 #define OMAP_HSMMC_SYSSTATUS	0x0014
 #define OMAP_HSMMC_CON		0x002C
 #define OMAP_HSMMC_BLK		0x0104
@@ -576,21 +575,8 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
 	if (host->context_loss == context_loss)
 		return 1;
 
-	/* Wait for hardware reset */
-	timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS);
-	while ((OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE) != RESETDONE
-		&& time_before(jiffies, timeout))
-		;
-
-	/* Do software reset */
-	OMAP_HSMMC_WRITE(host->base, SYSCONFIG, SOFTRESET);
-	timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS);
-	while ((OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE) != RESETDONE
-		&& time_before(jiffies, timeout))
-		;
-
-	OMAP_HSMMC_WRITE(host->base, SYSCONFIG,
-			OMAP_HSMMC_READ(host->base, SYSCONFIG) | AUTOIDLE);
+	if (!OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE)
+		return 1;
 
 	if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
 		if (host->power_mode != MMC_POWER_OFF &&
@@ -1593,10 +1579,6 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host)
 	value = OMAP_HSMMC_READ(host->base, CAPA);
 	OMAP_HSMMC_WRITE(host->base, CAPA, value | capa);
 
-	/* Set the controller to AUTO IDLE mode */
-	value = OMAP_HSMMC_READ(host->base, SYSCONFIG);
-	OMAP_HSMMC_WRITE(host->base, SYSCONFIG, value | AUTOIDLE);
-
 	/* Set SD bus power bit */
 	set_sd_bus_power(host);
 }
@@ -1654,8 +1636,6 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
 
 	pm_runtime_get_sync(host->dev);
 
-	seq_printf(s, "SYSCONFIG:\t0x%08x\n",
-			OMAP_HSMMC_READ(host->base, SYSCONFIG));
 	seq_printf(s, "CON:\t\t0x%08x\n",
 			OMAP_HSMMC_READ(host->base, CON));
 	seq_printf(s, "HCTL:\t\t0x%08x\n",
-- 
1.7.11.1.25.g0e18bef


  parent reply	other threads:[~2012-08-17 18:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 18:52 [PATCH 00/10] Assorted MMC / OMAP HSMMC patches Venkatraman S
2012-08-17 18:52 ` [PATCH 01/10] mmc: core: Add TRANsfer state to non-HPI state Venkatraman S
2012-08-17 18:52 ` [PATCH 02/10] mmc: debugfs: Print ext_csd in ascending order Venkatraman S
2012-08-17 18:52 ` [PATCH 03/10] mmc: omap: remove unused variables and includes Venkatraman S
2012-08-17 18:52 ` [PATCH 04/10] mmc: omap: fix mmc_omap_report_irq to use dev_dbg macros Venkatraman S
2012-08-17 18:52 ` [PATCH 05/10] mmc: omap_hsmmc: remove unused vars and includes Venkatraman S
2012-08-17 18:52 ` Venkatraman S [this message]
2012-08-21 15:38   ` [PATCH 06/10] mmc: omap_hsmmc: remove access to SYSCONFIG register Shubhrajyoti Datta
2012-08-27 11:04     ` S, Venkatraman
2012-08-17 18:52 ` [PATCH 07/10] mmc: omap_hsmmc: consolidate flush posted writes for HSMMC IRQs Venkatraman S
2012-08-21 15:21   ` T Krishnamoorthy, Balaji
2012-08-27 11:02     ` S, Venkatraman
2012-08-17 18:52 ` [PATCH 08/10] mmc: omap_hsmmc: consolidate error report handling of HSMMC IRQ Venkatraman S
2012-08-17 18:52 ` [PATCH 09/10] mmc: omap_hsmmc: convert from IP timer to hrtimer Venkatraman S
2012-08-21 10:42   ` Felipe Balbi
2012-08-22 10:38     ` S, Venkatraman
2012-08-22 11:28       ` Felipe Balbi
2012-08-17 18:52 ` [PATCH 10/10] mmc: omap_hsmmc: Move to Maintained state in MAINTAINERS Venkatraman S
2012-08-21 10:43 ` [PATCH 00/10] Assorted MMC / OMAP HSMMC patches Felipe Balbi
2012-08-27 23:02   ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345229550-8672-7-git-send-email-svenkatr@ti.com \
    --to=svenkatr@ti.com \
    --cc=balajitk@ti.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=vishp@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox