aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkatraman S <svenkatr@ti.com>2012-08-08 04:56:52 -0400
committerChris Ball <cjb@laptop.org>2012-09-04 13:58:23 -0400
commit6c31b2150ff96755d24e0ab6d6fea08a7bf5c44c (patch)
tree0548b0c8674b0cffdec2aa933a4af567ca164140
parent8986d31bf5bd3c2c06c1fe0dc18f8ea50e9f2a50 (diff)
mmc: omap_hsmmc: remove access to SYSCONFIG register
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> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/omap_hsmmc.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index da4f5a73a324..4bc55acc6f36 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -44,7 +44,6 @@
44#include <plat/cpu.h> 44#include <plat/cpu.h>
45 45
46/* OMAP HSMMC Host Controller Registers */ 46/* OMAP HSMMC Host Controller Registers */
47#define OMAP_HSMMC_SYSCONFIG 0x0010
48#define OMAP_HSMMC_SYSSTATUS 0x0014 47#define OMAP_HSMMC_SYSSTATUS 0x0014
49#define OMAP_HSMMC_CON 0x002C 48#define OMAP_HSMMC_CON 0x002C
50#define OMAP_HSMMC_BLK 0x0104 49#define OMAP_HSMMC_BLK 0x0104
@@ -576,21 +575,8 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
576 if (host->context_loss == context_loss) 575 if (host->context_loss == context_loss)
577 return 1; 576 return 1;
578 577
579 /* Wait for hardware reset */ 578 if (!OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE)
580 timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS); 579 return 1;
581 while ((OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE) != RESETDONE
582 && time_before(jiffies, timeout))
583 ;
584
585 /* Do software reset */
586 OMAP_HSMMC_WRITE(host->base, SYSCONFIG, SOFTRESET);
587 timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS);
588 while ((OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE) != RESETDONE
589 && time_before(jiffies, timeout))
590 ;
591
592 OMAP_HSMMC_WRITE(host->base, SYSCONFIG,
593 OMAP_HSMMC_READ(host->base, SYSCONFIG) | AUTOIDLE);
594 580
595 if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) { 581 if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
596 if (host->power_mode != MMC_POWER_OFF && 582 if (host->power_mode != MMC_POWER_OFF &&
@@ -1593,10 +1579,6 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host)
1593 value = OMAP_HSMMC_READ(host->base, CAPA); 1579 value = OMAP_HSMMC_READ(host->base, CAPA);
1594 OMAP_HSMMC_WRITE(host->base, CAPA, value | capa); 1580 OMAP_HSMMC_WRITE(host->base, CAPA, value | capa);
1595 1581
1596 /* Set the controller to AUTO IDLE mode */
1597 value = OMAP_HSMMC_READ(host->base, SYSCONFIG);
1598 OMAP_HSMMC_WRITE(host->base, SYSCONFIG, value | AUTOIDLE);
1599
1600 /* Set SD bus power bit */ 1582 /* Set SD bus power bit */
1601 set_sd_bus_power(host); 1583 set_sd_bus_power(host);
1602} 1584}
@@ -1654,8 +1636,6 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
1654 1636
1655 pm_runtime_get_sync(host->dev); 1637 pm_runtime_get_sync(host->dev);
1656 1638
1657 seq_printf(s, "SYSCONFIG:\t0x%08x\n",
1658 OMAP_HSMMC_READ(host->base, SYSCONFIG));
1659 seq_printf(s, "CON:\t\t0x%08x\n", 1639 seq_printf(s, "CON:\t\t0x%08x\n",
1660 OMAP_HSMMC_READ(host->base, CON)); 1640 OMAP_HSMMC_READ(host->base, CON));
1661 seq_printf(s, "HCTL:\t\t0x%08x\n", 1641 seq_printf(s, "HCTL:\t\t0x%08x\n",