summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.h
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-10-24 17:53:15 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 13:59:09 +0200
commit3b292bb0e99018c448e0f5a26c29c68113a1b7bf (patch)
tree844ec57428babaabd682421f042c2c4054b94dcf /drivers/mmc/host/tmio_mmc.h
parent9ae4ed7d30f433873351d5ba14ae000d10e10430 (diff)
downloadblackbird-op-linux-3b292bb0e99018c448e0f5a26c29c68113a1b7bf.tar.gz
blackbird-op-linux-3b292bb0e99018c448e0f5a26c29c68113a1b7bf.zip
mmc: tmio: Restructure ->set_ios() and adapt ->probe() to it
An internal power state machine were beeing used to keep ->probe() and ->set_ios() in sync. Especially for handling specific scenarios while using CONFIG_MMC_CLKGATE. Moreover dependency to CONFIG_MMC_CLKGATE existed to handle runtime PM properly, which we moves away from here. By removing the state machine and instead make ->set_ios() rely on the information provided through the function's in-parameters, the code becomes significantly simplier. Additonally as a part of this rework we prepares for making the runtime PM callbacks responsible of clock gating. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.h')
-rw-r--r--drivers/mmc/host/tmio_mmc.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index d6ceb1a5e56f..f837723c30b9 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -40,22 +40,6 @@
struct tmio_mmc_data;
-/*
- * We differentiate between the following 3 power states:
- * 1. card slot powered off, controller stopped. This is used, when either there
- * is no card in the slot, or the card really has to be powered down.
- * 2. card slot powered on, controller stopped. This is used, when a card is in
- * the slot, but no activity is currently taking place. This is a power-
- * saving mode with card-state preserved. This state can be entered, e.g.
- * when MMC clock-gating is used.
- * 3. card slot powered on, controller running. This is the actual active state.
- */
-enum tmio_mmc_power {
- TMIO_MMC_OFF_STOP, /* card power off, controller stopped */
- TMIO_MMC_ON_STOP, /* card power on, controller stopped */
- TMIO_MMC_ON_RUN, /* card power on, controller running */
-};
-
struct tmio_mmc_host {
void __iomem *ctl;
struct mmc_command *cmd;
@@ -63,9 +47,6 @@ struct tmio_mmc_host {
struct mmc_data *data;
struct mmc_host *mmc;
- /* Controller and card power state */
- enum tmio_mmc_power power;
-
/* Callbacks for clock / power control */
void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state);
@@ -100,7 +81,6 @@ struct tmio_mmc_host {
unsigned long last_req_ts;
struct mutex ios_lock; /* protect set_ios() context */
bool native_hotplug;
- bool resuming;
bool sdio_irq_enabled;
};
OpenPOWER on IntegriCloud