* [PATCH 01/12] mmc: tmio: Keep host active while SDIO IRQ is enabled
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
@ 2014-08-25 12:25 ` Ulf Hansson
2014-08-25 12:25 ` [PATCH 02/12] mmc: tmio: Keep host active while serving requests Ulf Hansson
` (11 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:25 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
The host must be kept active to be able to serve SDIO IRQs, thus let's
prevent it from going inactive while SDIO IRQ is enabled.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc.h | 1 +
drivers/mmc/host/tmio_mmc_pio.c | 19 +++++++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 100ffe0..d6ceb1a 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -101,6 +101,7 @@ struct tmio_mmc_host {
struct mutex ios_lock; /* protect set_ios() context */
bool native_hotplug;
bool resuming;
+ bool sdio_irq_enabled;
};
int tmio_mmc_host_probe(struct tmio_mmc_host **host,
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index faf0924..5c2e5a3 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -129,15 +129,22 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
{
struct tmio_mmc_host *host = mmc_priv(mmc);
- if (enable) {
+ if (enable && !host->sdio_irq_enabled) {
+ /* Keep device active while SDIO irq is enabled */
+ pm_runtime_get_sync(mmc_dev(mmc));
+ host->sdio_irq_enabled = true;
+
host->sdio_irq_mask = TMIO_SDIO_MASK_ALL &
~TMIO_SDIO_STAT_IOIRQ;
sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
- } else {
+ } else if (!enable && host->sdio_irq_enabled) {
host->sdio_irq_mask = TMIO_SDIO_MASK_ALL;
sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0000);
+
+ host->sdio_irq_enabled = false;
+ pm_runtime_put(mmc_dev(mmc));
}
}
@@ -1074,8 +1081,12 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
_host->sdcard_irq_mask &= ~irq_mask;
- if (pdata->flags & TMIO_MMC_SDIO_IRQ)
- tmio_mmc_enable_sdio_irq(mmc, 0);
+ _host->sdio_irq_enabled = false;
+ if (pdata->flags & TMIO_MMC_SDIO_IRQ) {
+ _host->sdio_irq_mask = TMIO_SDIO_MASK_ALL;
+ sd_ctrl_write16(_host, CTL_SDIO_IRQ_MASK, _host->sdio_irq_mask);
+ sd_ctrl_write16(_host, CTL_TRANSACTION_CTL, 0x0000);
+ }
spin_lock_init(&_host->lock);
mutex_init(&_host->ios_lock);
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 02/12] mmc: tmio: Keep host active while serving requests
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
2014-08-25 12:25 ` [PATCH 01/12] mmc: tmio: Keep host active while SDIO IRQ is enabled Ulf Hansson
@ 2014-08-25 12:25 ` Ulf Hansson
2014-08-25 12:25 ` [PATCH 03/12] mmc: tmio: Extract bus_width modifications to a separate function Ulf Hansson
` (10 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:25 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
Use runtime PM to keep the host active during I/O operations and other
requests which requires the tmio hardware to be powered.
Additionally make use of the runtime PM autosuspend feature with a
default timeout of 50 ms.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc_pio.c | 55 ++++++++++++++++++++++++-----------------
1 file changed, 32 insertions(+), 23 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 5c2e5a3..d63d292 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -144,7 +144,8 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0000);
host->sdio_irq_enabled = false;
- pm_runtime_put(mmc_dev(mmc));
+ pm_runtime_mark_last_busy(mmc_dev(mmc));
+ pm_runtime_put_autosuspend(mmc_dev(mmc));
}
}
@@ -252,6 +253,9 @@ static void tmio_mmc_reset_work(struct work_struct *work)
tmio_mmc_abort_dma(host);
mmc_request_done(host->mmc, mrq);
+
+ pm_runtime_mark_last_busy(mmc_dev(host->mmc));
+ pm_runtime_put_autosuspend(mmc_dev(host->mmc));
}
/* called with host->lock held, interrupts disabled */
@@ -281,6 +285,9 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
tmio_mmc_abort_dma(host);
mmc_request_done(host->mmc, mrq);
+
+ pm_runtime_mark_last_busy(mmc_dev(host->mmc));
+ pm_runtime_put_autosuspend(mmc_dev(host->mmc));
}
static void tmio_mmc_done_work(struct work_struct *work)
@@ -735,6 +742,8 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
spin_unlock_irqrestore(&host->lock, flags);
+ pm_runtime_get_sync(mmc_dev(mmc));
+
if (mrq->data) {
ret = tmio_mmc_start_data(host, mrq->data);
if (ret)
@@ -753,6 +762,9 @@ fail:
host->mrq = NULL;
mrq->cmd->error = ret;
mmc_request_done(mmc, mrq);
+
+ pm_runtime_mark_last_busy(mmc_dev(mmc));
+ pm_runtime_put_autosuspend(mmc_dev(mmc));
}
static int tmio_mmc_clk_update(struct mmc_host *mmc)
@@ -831,6 +843,8 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
struct device *dev = &host->pdev->dev;
unsigned long flags;
+ pm_runtime_get_sync(mmc_dev(mmc));
+
mutex_lock(&host->ios_lock);
spin_lock_irqsave(&host->lock, flags);
@@ -866,7 +880,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (ios->power_mode == MMC_POWER_ON && ios->clock) {
if (host->power != TMIO_MMC_ON_RUN) {
tmio_mmc_clk_update(mmc);
- pm_runtime_get_sync(dev);
if (host->resuming) {
tmio_mmc_reset(host);
host->resuming = false;
@@ -896,7 +909,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (old_power == TMIO_MMC_ON_RUN) {
tmio_mmc_clk_stop(host);
- pm_runtime_put(dev);
if (pdata->clk_disable)
pdata->clk_disable(host->pdev);
}
@@ -923,6 +935,9 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
host->mrq = NULL;
mutex_unlock(&host->ios_lock);
+
+ pm_runtime_mark_last_busy(mmc_dev(mmc));
+ pm_runtime_put_autosuspend(mmc_dev(mmc));
}
static int tmio_mmc_get_ro(struct mmc_host *mmc)
@@ -933,8 +948,13 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
if (ret >= 0)
return ret;
- return !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
- (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
+ pm_runtime_get_sync(mmc_dev(mmc));
+ ret = !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
+ (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
+ pm_runtime_mark_last_busy(mmc_dev(mmc));
+ pm_runtime_put_autosuspend(mmc_dev(mmc));
+
+ return ret;
}
static const struct mmc_host_ops tmio_mmc_ops = {
@@ -1040,27 +1060,14 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
mmc->slot.cd_irq >= 0);
_host->power = TMIO_MMC_OFF_STOP;
- pm_runtime_enable(&pdev->dev);
- ret = pm_runtime_resume(&pdev->dev);
- if (ret < 0)
- goto pm_disable;
-
if (tmio_mmc_clk_update(mmc) < 0) {
mmc->f_max = pdata->hclk;
mmc->f_min = mmc->f_max / 512;
}
/*
- * There are 4 different scenarios for the card detection:
- * 1) an external gpio irq handles the cd (best for power savings)
- * 2) internal sdhi irq handles the cd
- * 3) a worker thread polls the sdhi - indicated by MMC_CAP_NEEDS_POLL
- * 4) the medium is non-removable - indicated by MMC_CAP_NONREMOVABLE
- *
- * While we increment the runtime PM counter for all scenarios when
- * the mmc core activates us by calling an appropriate set_ios(), we
- * must additionally ensure that in case 2) the tmio mmc hardware stays
- * powered on during runtime for the card detection to work.
+ * While using internal tmio hardware logic for card detection, we need
+ * to ensure it stays powered for it to work.
*/
if (_host->native_hotplug)
pm_runtime_get_noresume(&pdev->dev);
@@ -1098,6 +1105,11 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
/* See if we also get DMA */
tmio_mmc_request_dma(_host, pdata);
+ pm_runtime_set_active(&pdev->dev);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+
ret = mmc_add_host(mmc);
if (pdata->clk_disable)
pdata->clk_disable(pdev);
@@ -1120,9 +1132,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
return 0;
-pm_disable:
- pm_runtime_disable(&pdev->dev);
- iounmap(_host->ctl);
host_free:
mmc_free_host(mmc);
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 03/12] mmc: tmio: Extract bus_width modifications to a separate function
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
2014-08-25 12:25 ` [PATCH 01/12] mmc: tmio: Keep host active while SDIO IRQ is enabled Ulf Hansson
2014-08-25 12:25 ` [PATCH 02/12] mmc: tmio: Keep host active while serving requests Ulf Hansson
@ 2014-08-25 12:25 ` Ulf Hansson
2014-08-25 12:25 ` [PATCH 04/12] mmc: tmio: Restructure ->set_ios() and adapt ->probe() to it Ulf Hansson
` (9 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:25 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
Move code for bus_width modification, out of the ->set_ios() callback
and into a separate function, to simplify code.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc_pio.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index d63d292..8f5b5cc 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -831,6 +831,19 @@ static void tmio_mmc_power_off(struct tmio_mmc_host *host)
host->set_pwr(host->pdev, 0);
}
+static void tmio_mmc_set_bus_width(struct tmio_mmc_host *host,
+ unsigned char bus_width)
+{
+ switch (bus_width) {
+ case MMC_BUS_WIDTH_1:
+ sd_ctrl_write16(host, CTL_SD_MEM_CARD_OPT, 0x80e0);
+ break;
+ case MMC_BUS_WIDTH_4:
+ sd_ctrl_write16(host, CTL_SD_MEM_CARD_OPT, 0x00e0);
+ break;
+ }
+}
+
/* Set MMC clock / power.
* Note: This controller uses a simple divider scheme therefore it cannot
* run a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as
@@ -914,16 +927,8 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
}
}
- if (host->power != TMIO_MMC_OFF_STOP) {
- switch (ios->bus_width) {
- case MMC_BUS_WIDTH_1:
- sd_ctrl_write16(host, CTL_SD_MEM_CARD_OPT, 0x80e0);
- break;
- case MMC_BUS_WIDTH_4:
- sd_ctrl_write16(host, CTL_SD_MEM_CARD_OPT, 0x00e0);
- break;
- }
- }
+ if (host->power != TMIO_MMC_OFF_STOP)
+ tmio_mmc_set_bus_width(host, ios->bus_width);
/* Let things settle. delay taken from winCE driver */
udelay(140);
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 04/12] mmc: tmio: Restructure ->set_ios() and adapt ->probe() to it
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (2 preceding siblings ...)
2014-08-25 12:25 ` [PATCH 03/12] mmc: tmio: Extract bus_width modifications to a separate function Ulf Hansson
@ 2014-08-25 12:25 ` Ulf Hansson
2014-08-25 12:25 ` [PATCH 05/12] mmc: tmio: Handle clock gating from runtime PM functions Ulf Hansson
` (8 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:25 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
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>
---
drivers/mmc/host/tmio_mmc.h | 20 --------------
drivers/mmc/host/tmio_mmc_pio.c | 61 ++++++++++-------------------------------
2 files changed, 14 insertions(+), 67 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index d6ceb1a..f837723 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;
};
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 8f5b5cc..e573a15 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -884,51 +884,23 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
spin_unlock_irqrestore(&host->lock, flags);
- /*
- * host->power toggles between false and true in both cases - either
- * or not the controller can be runtime-suspended during inactivity.
- * But if the controller has to be kept on, the runtime-pm usage_count
- * is kept positive, so no suspending actually takes place.
- */
- if (ios->power_mode == MMC_POWER_ON && ios->clock) {
- if (host->power != TMIO_MMC_ON_RUN) {
- tmio_mmc_clk_update(mmc);
- if (host->resuming) {
- tmio_mmc_reset(host);
- host->resuming = false;
- }
- }
- if (host->power == TMIO_MMC_OFF_STOP)
- tmio_mmc_reset(host);
+ switch (ios->power_mode) {
+ case MMC_POWER_OFF:
+ tmio_mmc_power_off(host);
+ tmio_mmc_clk_stop(host);
+ break;
+ case MMC_POWER_UP:
tmio_mmc_set_clock(host, ios->clock);
- if (host->power == TMIO_MMC_OFF_STOP)
- /* power up SD card and the bus */
- tmio_mmc_power_on(host, ios->vdd);
- host->power = TMIO_MMC_ON_RUN;
- /* start bus clock */
+ tmio_mmc_power_on(host, ios->vdd);
tmio_mmc_clk_start(host);
- } else if (ios->power_mode != MMC_POWER_UP) {
- struct tmio_mmc_data *pdata = host->pdata;
- unsigned int old_power = host->power;
-
- if (old_power != TMIO_MMC_OFF_STOP) {
- if (ios->power_mode == MMC_POWER_OFF) {
- tmio_mmc_power_off(host);
- host->power = TMIO_MMC_OFF_STOP;
- } else {
- host->power = TMIO_MMC_ON_STOP;
- }
- }
-
- if (old_power == TMIO_MMC_ON_RUN) {
- tmio_mmc_clk_stop(host);
- if (pdata->clk_disable)
- pdata->clk_disable(host->pdev);
- }
- }
-
- if (host->power != TMIO_MMC_OFF_STOP)
tmio_mmc_set_bus_width(host, ios->bus_width);
+ break;
+ case MMC_POWER_ON:
+ tmio_mmc_set_clock(host, ios->clock);
+ tmio_mmc_clk_start(host);
+ tmio_mmc_set_bus_width(host, ios->bus_width);
+ break;
+ }
/* Let things settle. delay taken from winCE driver */
udelay(140);
@@ -1064,7 +1036,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
mmc->caps & MMC_CAP_NONREMOVABLE ||
mmc->slot.cd_irq >= 0);
- _host->power = TMIO_MMC_OFF_STOP;
if (tmio_mmc_clk_update(mmc) < 0) {
mmc->f_max = pdata->hclk;
mmc->f_min = mmc->f_max / 512;
@@ -1116,8 +1087,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
pm_runtime_enable(&pdev->dev);
ret = mmc_add_host(mmc);
- if (pdata->clk_disable)
- pdata->clk_disable(pdev);
if (ret < 0) {
tmio_mmc_host_remove(_host);
return ret;
@@ -1185,8 +1154,6 @@ int tmio_mmc_host_resume(struct device *dev)
tmio_mmc_enable_dma(host, true);
- /* The MMC core will perform the complete set up */
- host->resuming = true;
return 0;
}
EXPORT_SYMBOL(tmio_mmc_host_resume);
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 05/12] mmc: tmio: Handle clock gating from runtime PM functions
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (3 preceding siblings ...)
2014-08-25 12:25 ` [PATCH 04/12] mmc: tmio: Restructure ->set_ios() and adapt ->probe() to it Ulf Hansson
@ 2014-08-25 12:25 ` Ulf Hansson
2014-08-25 12:25 ` [PATCH 06/12] mmc: tmio: Mask all IRQs when inactive Ulf Hansson
` (7 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:25 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
Add clock gating control as a part of the tmio library functions for
runtime PM.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc.h | 3 ++-
drivers/mmc/host/tmio_mmc_pio.c | 28 ++++++++++++++++++++++++----
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index f837723..f1ee3e4 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -73,9 +73,10 @@ struct tmio_mmc_host {
struct delayed_work delayed_reset_work;
struct work_struct done;
- /* Cache IRQ mask */
+ /* Cache */
u32 sdcard_irq_mask;
u32 sdio_irq_mask;
+ unsigned int clk_cache;
spinlock_t lock; /* protect host private data */
unsigned long last_req_ts;
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index e573a15..2345177 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -149,7 +149,8 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
}
}
-static void tmio_mmc_set_clock(struct tmio_mmc_host *host, int new_clock)
+static void tmio_mmc_set_clock(struct tmio_mmc_host *host,
+ unsigned int new_clock)
{
u32 clk = 0, clock;
@@ -767,9 +768,9 @@ fail:
pm_runtime_put_autosuspend(mmc_dev(mmc));
}
-static int tmio_mmc_clk_update(struct mmc_host *mmc)
+static int tmio_mmc_clk_update(struct tmio_mmc_host *host)
{
- struct tmio_mmc_host *host = mmc_priv(mmc);
+ struct mmc_host *mmc = host->mmc;
struct tmio_mmc_data *pdata = host->pdata;
int ret;
@@ -911,6 +912,8 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
ios->clock, ios->power_mode);
host->mrq = NULL;
+ host->clk_cache = ios->clock;
+
mutex_unlock(&host->ios_lock);
pm_runtime_mark_last_busy(mmc_dev(mmc));
@@ -1036,7 +1039,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
mmc->caps & MMC_CAP_NONREMOVABLE ||
mmc->slot.cd_irq >= 0);
- if (tmio_mmc_clk_update(mmc) < 0) {
+ if (tmio_mmc_clk_update(_host) < 0) {
mmc->f_max = pdata->hclk;
mmc->f_min = mmc->f_max / 512;
}
@@ -1162,6 +1165,15 @@ EXPORT_SYMBOL(tmio_mmc_host_resume);
#ifdef CONFIG_PM_RUNTIME
int tmio_mmc_host_runtime_suspend(struct device *dev)
{
+ struct mmc_host *mmc = dev_get_drvdata(dev);
+ struct tmio_mmc_host *host = mmc_priv(mmc);
+
+ if (host->clk_cache)
+ tmio_mmc_clk_stop(host);
+
+ if (host->pdata->clk_disable)
+ host->pdata->clk_disable(host->pdev);
+
return 0;
}
EXPORT_SYMBOL(tmio_mmc_host_runtime_suspend);
@@ -1171,6 +1183,14 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
struct mmc_host *mmc = dev_get_drvdata(dev);
struct tmio_mmc_host *host = mmc_priv(mmc);
+ tmio_mmc_reset(host);
+ tmio_mmc_clk_update(host);
+
+ if (host->clk_cache) {
+ tmio_mmc_set_clock(host, host->clk_cache);
+ tmio_mmc_clk_start(host);
+ }
+
tmio_mmc_enable_dma(host, true);
return 0;
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 06/12] mmc: tmio: Mask all IRQs when inactive
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (4 preceding siblings ...)
2014-08-25 12:25 ` [PATCH 05/12] mmc: tmio: Handle clock gating from runtime PM functions Ulf Hansson
@ 2014-08-25 12:25 ` Ulf Hansson
2014-08-25 12:25 ` [PATCH 07/12] mmc: tmio: Make runtime PM callbacks available for CONFIG_PM Ulf Hansson
` (6 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:25 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
To make sure we don't receive any spurious IRQs while we are inactive,
mask the IRQs from within the ->runtime_suspend() callback.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc_pio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 2345177..d52280d 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -1168,6 +1168,8 @@ int tmio_mmc_host_runtime_suspend(struct device *dev)
struct mmc_host *mmc = dev_get_drvdata(dev);
struct tmio_mmc_host *host = mmc_priv(mmc);
+ tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
+
if (host->clk_cache)
tmio_mmc_clk_stop(host);
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 07/12] mmc: tmio: Make runtime PM callbacks available for CONFIG_PM
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (5 preceding siblings ...)
2014-08-25 12:25 ` [PATCH 06/12] mmc: tmio: Mask all IRQs when inactive Ulf Hansson
@ 2014-08-25 12:25 ` Ulf Hansson
2014-08-25 12:26 ` [PATCH 08/12] mmc: sdhi: " Ulf Hansson
` (5 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:25 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
To give the option for tmio hosts to use the runtime PM callbacks for
CONFIG_PM_SLEEP as well as CONFIG_PM_RUNTIME, move them to CONFIG_PM.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc.h | 2 +-
drivers/mmc/host/tmio_mmc_pio.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index f1ee3e4..2ad52d6 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -149,7 +149,7 @@ int tmio_mmc_host_suspend(struct device *dev);
int tmio_mmc_host_resume(struct device *dev);
#endif
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
int tmio_mmc_host_runtime_suspend(struct device *dev);
int tmio_mmc_host_runtime_resume(struct device *dev);
#endif
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index d52280d..494ecc5 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -1162,7 +1162,7 @@ int tmio_mmc_host_resume(struct device *dev)
EXPORT_SYMBOL(tmio_mmc_host_resume);
#endif
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
int tmio_mmc_host_runtime_suspend(struct device *dev)
{
struct mmc_host *mmc = dev_get_drvdata(dev);
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 08/12] mmc: sdhi: Make runtime PM callbacks available for CONFIG_PM
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (6 preceding siblings ...)
2014-08-25 12:25 ` [PATCH 07/12] mmc: tmio: Make runtime PM callbacks available for CONFIG_PM Ulf Hansson
@ 2014-08-25 12:26 ` Ulf Hansson
2014-08-25 12:26 ` [PATCH 09/12] mmc: tmio_mmc: Enable runtime PM support Ulf Hansson
` (4 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:26 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
To be able to simplify system PM, let's re-use the runtime PM callbacks
by converting to the SET_PM_RUNTIME_PM_OPS macro.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index be5e25d..4cd0f09 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -333,7 +333,7 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev)
static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_host_suspend, tmio_mmc_host_resume)
- SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
+ SET_PM_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
tmio_mmc_host_runtime_resume,
NULL)
};
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 09/12] mmc: tmio_mmc: Enable runtime PM support
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (7 preceding siblings ...)
2014-08-25 12:26 ` [PATCH 08/12] mmc: sdhi: " Ulf Hansson
@ 2014-08-25 12:26 ` Ulf Hansson
2014-08-25 12:26 ` [PATCH 10/12] mmc: sdhi: Fixup system PM suspend lock-up Ulf Hansson
` (3 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:26 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
To take advantage of the clock gating support, use the runtime PM
callbacks provided by the tmio core.
Additionally, we make use of the SET_PM_RUNTIME_PM_OPS, which is a
preparation needed to simplify system PM.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index cfad844..58f50ef 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -135,6 +135,9 @@ static int tmio_mmc_remove(struct platform_device *pdev)
static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_suspend, tmio_mmc_resume)
+ SET_PM_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
+ tmio_mmc_host_runtime_resume,
+ NULL)
};
static struct platform_driver tmio_mmc_driver = {
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 10/12] mmc: sdhi: Fixup system PM suspend lock-up
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (8 preceding siblings ...)
2014-08-25 12:26 ` [PATCH 09/12] mmc: tmio_mmc: Enable runtime PM support Ulf Hansson
@ 2014-08-25 12:26 ` Ulf Hansson
2014-08-26 7:43 ` Geert Uytterhoeven
2014-08-25 12:26 ` [PATCH 11/12] mmc: tmio_mmc: " Ulf Hansson
` (2 subsequent siblings)
12 siblings, 1 reply; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:26 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
At system PM suspend, the tmio core accessed the internal registers of
the controller without first moving the device into active state. This
caused a lock-up in system PM suspend phase.
The reason for the register access were masking of IRQs. Since that is
managed via the runtime PM suspend path, let's just re-use that path
for system PM suspend.
In other words force the device into runtime PM suspend state at system
PM suspend and restore it to active state at system PM resume.
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/sh_mobile_sdhi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 4cd0f09..2dafe28 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -332,7 +332,8 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev)
}
static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_host_suspend, tmio_mmc_host_resume)
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
SET_PM_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
tmio_mmc_host_runtime_resume,
NULL)
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 10/12] mmc: sdhi: Fixup system PM suspend lock-up
2014-08-25 12:26 ` [PATCH 10/12] mmc: sdhi: Fixup system PM suspend lock-up Ulf Hansson
@ 2014-08-26 7:43 ` Geert Uytterhoeven
0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2014-08-26 7:43 UTC (permalink / raw)
To: Ulf Hansson
Cc: Linux MMC List, Ian Molton, Chris Ball, Linux-sh list,
linux-kernel@vger.kernel.org
On Mon, Aug 25, 2014 at 2:26 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> At system PM suspend, the tmio core accessed the internal registers of
> the controller without first moving the device into active state. This
> caused a lock-up in system PM suspend phase.
>
> The reason for the register access were masking of IRQs. Since that is
> managed via the runtime PM suspend path, let's just re-use that path
> for system PM suspend.
>
> In other words force the device into runtime PM suspend state at system
> PM suspend and restore it to active state at system PM resume.
>
> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 11/12] mmc: tmio_mmc: Fixup system PM suspend lock-up
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (9 preceding siblings ...)
2014-08-25 12:26 ` [PATCH 10/12] mmc: sdhi: Fixup system PM suspend lock-up Ulf Hansson
@ 2014-08-25 12:26 ` Ulf Hansson
2014-08-25 12:26 ` [PATCH 12/12] mmc: tmio: Remove library functions for system PM Ulf Hansson
2014-08-26 7:46 ` [PATCH 00/12] mmc: tmio: Fixup PM support Geert Uytterhoeven
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:26 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
At system PM suspend, the tmio core accessed the internal registers of
the controller without first moving the device into active state. This
caused a lock-up in system PM suspend phase.
The reason for the register access were masking of IRQs. Since that is
managed via the runtime PM suspend path, let's just re-use that path
for system PM suspend.
In other words force the device into runtime PM suspend state at system
PM suspend and restore it to active state at system PM resume.
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 58f50ef..659028d 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -30,7 +30,7 @@ static int tmio_mmc_suspend(struct device *dev)
const struct mfd_cell *cell = mfd_get_cell(pdev);
int ret;
- ret = tmio_mmc_host_suspend(dev);
+ ret = pm_runtime_force_suspend(dev);
/* Tell MFD core it can disable us now.*/
if (!ret && cell->disable)
@@ -50,7 +50,7 @@ static int tmio_mmc_resume(struct device *dev)
ret = cell->resume(pdev);
if (!ret)
- ret = tmio_mmc_host_resume(dev);
+ ret = pm_runtime_force_resume(dev);
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 12/12] mmc: tmio: Remove library functions for system PM
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (10 preceding siblings ...)
2014-08-25 12:26 ` [PATCH 11/12] mmc: tmio_mmc: " Ulf Hansson
@ 2014-08-25 12:26 ` Ulf Hansson
2014-08-26 7:46 ` [PATCH 00/12] mmc: tmio: Fixup PM support Geert Uytterhoeven
12 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-25 12:26 UTC (permalink / raw)
To: linux-mmc, Ian Molton, Chris Ball
Cc: Geert Uytterhoeven, Linux-sh list, linux-kernel, Ulf Hansson
These library functions aren't used and nor needed, let's remove them.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/tmio_mmc.h | 5 -----
drivers/mmc/host/tmio_mmc_pio.c | 23 -----------------------
2 files changed, 28 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 2ad52d6..a34ecbe 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -144,11 +144,6 @@ static inline void tmio_mmc_abort_dma(struct tmio_mmc_host *host)
}
#endif
-#ifdef CONFIG_PM_SLEEP
-int tmio_mmc_host_suspend(struct device *dev);
-int tmio_mmc_host_resume(struct device *dev);
-#endif
-
#ifdef CONFIG_PM
int tmio_mmc_host_runtime_suspend(struct device *dev);
int tmio_mmc_host_runtime_resume(struct device *dev);
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 494ecc5..a993208 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -1139,29 +1139,6 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
}
EXPORT_SYMBOL(tmio_mmc_host_remove);
-#ifdef CONFIG_PM_SLEEP
-int tmio_mmc_host_suspend(struct device *dev)
-{
- struct mmc_host *mmc = dev_get_drvdata(dev);
- struct tmio_mmc_host *host = mmc_priv(mmc);
-
- tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
- return 0;
-}
-EXPORT_SYMBOL(tmio_mmc_host_suspend);
-
-int tmio_mmc_host_resume(struct device *dev)
-{
- struct mmc_host *mmc = dev_get_drvdata(dev);
- struct tmio_mmc_host *host = mmc_priv(mmc);
-
- tmio_mmc_enable_dma(host, true);
-
- return 0;
-}
-EXPORT_SYMBOL(tmio_mmc_host_resume);
-#endif
-
#ifdef CONFIG_PM
int tmio_mmc_host_runtime_suspend(struct device *dev)
{
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 00/12] mmc: tmio: Fixup PM support
2014-08-25 12:25 [PATCH 00/12] mmc: tmio: Fixup PM support Ulf Hansson
` (11 preceding siblings ...)
2014-08-25 12:26 ` [PATCH 12/12] mmc: tmio: Remove library functions for system PM Ulf Hansson
@ 2014-08-26 7:46 ` Geert Uytterhoeven
2014-08-27 12:59 ` Ulf Hansson
12 siblings, 1 reply; 16+ messages in thread
From: Geert Uytterhoeven @ 2014-08-26 7:46 UTC (permalink / raw)
To: Ulf Hansson
Cc: Linux MMC List, Ian Molton, Chris Ball, Linux-sh list,
linux-kernel@vger.kernel.org
Hi Ulf,
On Mon, Aug 25, 2014 at 2:25 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> This patchset fixup the PM support for tmio and the tmio hosts.
> Some re-structuring of the code was also necessary to accomplish the above.
>
> A few of these patches has been posted earlier, but at that time I couldn't get
> help in testing them on hardware. Let's give this a second try now.
>
> http://www.spinics.net/lists/linux-mmc/msg23177.html
>
> Ulf Hansson (12):
> mmc: tmio: Keep host active while SDIO IRQ is enabled
> mmc: tmio: Keep host active while serving requests
> mmc: tmio: Extract bus_width modifications to a separate function
> mmc: tmio: Restructure ->set_ios() and adapt ->probe() to it
> mmc: tmio: Handle clock gating from runtime PM functions
> mmc: tmio: Mask all IRQs when inactive
> mmc: tmio: Make runtime PM callbacks available for CONFIG_PM
> mmc: sdhi: Make runtime PM callbacks available for CONFIG_PM
> mmc: tmio_mmc: Enable runtime PM support
> mmc: sdhi: Fixup system PM suspend lock-up
> mmc: tmio_mmc: Fixup system PM suspend lock-up
> mmc: tmio: Remove library functions for system PM
I gave this series a test run on r8a7791/Koelsch, everything seems to
work fine.
Even more important, s2ram was fixed by "mmc: sdhi: Fixup system PM
suspend lock-up".
For the whole series:
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 00/12] mmc: tmio: Fixup PM support
2014-08-26 7:46 ` [PATCH 00/12] mmc: tmio: Fixup PM support Geert Uytterhoeven
@ 2014-08-27 12:59 ` Ulf Hansson
0 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2014-08-27 12:59 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux MMC List, Ian Molton, Chris Ball, Linux-sh list,
linux-kernel@vger.kernel.org
On 26 August 2014 09:46, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Ulf,
>
> On Mon, Aug 25, 2014 at 2:25 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> This patchset fixup the PM support for tmio and the tmio hosts.
>> Some re-structuring of the code was also necessary to accomplish the above.
>>
>> A few of these patches has been posted earlier, but at that time I couldn't get
>> help in testing them on hardware. Let's give this a second try now.
>>
>> http://www.spinics.net/lists/linux-mmc/msg23177.html
>>
>> Ulf Hansson (12):
>> mmc: tmio: Keep host active while SDIO IRQ is enabled
>> mmc: tmio: Keep host active while serving requests
>> mmc: tmio: Extract bus_width modifications to a separate function
>> mmc: tmio: Restructure ->set_ios() and adapt ->probe() to it
>> mmc: tmio: Handle clock gating from runtime PM functions
>> mmc: tmio: Mask all IRQs when inactive
>> mmc: tmio: Make runtime PM callbacks available for CONFIG_PM
>> mmc: sdhi: Make runtime PM callbacks available for CONFIG_PM
>> mmc: tmio_mmc: Enable runtime PM support
>> mmc: sdhi: Fixup system PM suspend lock-up
>> mmc: tmio_mmc: Fixup system PM suspend lock-up
>> mmc: tmio: Remove library functions for system PM
>
> I gave this series a test run on r8a7791/Koelsch, everything seems to
> work fine.
> Even more important, s2ram was fixed by "mmc: sdhi: Fixup system PM
> suspend lock-up".
>
> For the whole series:
> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Thanks!
>
> Gr{oetje,eeting}s,
>
> Geert
Geert, thanks helping out testing etc.
I have applied this series with your ack/tested by tag.
Kind regards
Uffe
^ permalink raw reply [flat|nested] 16+ messages in thread