From: Felipe Balbi <hidden> Date: 2012-10-22 12:59:28
prepare() is supposed to prevent new children from
being registered. On the MMC subsystem, children
(new cards) registration starts with the card
detect IRQ.
Move card detect IRQ disabling to prepare() so that
no new cards will be registered while we're trying
to suspend.
Likewise, move card detect IRQ enabling to complete()
so we only try to register new children after our MMC
IP is back up.
Signed-off-by: Felipe Balbi <redacted>
---
Venkat, do you think the patch below makes sense ?
cheers
drivers/mmc/host/omap_hsmmc.c | 45 ++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 20 deletions(-)
@@ -2035,23 +2055,10 @@ static int omap_hsmmc_suspend(struct device *dev)pm_runtime_get_sync(host->dev);host->suspended=1;-if(host->pdata->suspend){-ret=host->pdata->suspend(dev,host->slot_id);-if(ret){-dev_dbg(dev,"Unable to handle MMC board"-" level suspend\n");-host->suspended=0;-returnret;-}-}ret=mmc_suspend_host(host->mmc);if(ret){host->suspended=0;-if(host->pdata->resume){-if(host->pdata->resume(dev,host->slot_id))-dev_dbg(dev,"Unmask interrupt failed\n");-}gotoerr;}
@@ -2088,12 +2095,6 @@ static int omap_hsmmc_resume(struct device *dev)if(!(host->mmc->pm_flags&MMC_PM_KEEP_POWER))omap_hsmmc_conf_bus_power(host);-if(host->pdata->resume){-ret=host->pdata->resume(dev,host->slot_id);-if(ret)-dev_dbg(dev,"Unmask interrupt failed\n");-}-omap_hsmmc_protect_card(host);/* Notify the core to resume the host */
From: Felipe Balbi <hidden> Date: 2012-10-22 13:27:08
On Mon, Oct 22, 2012 at 03:59:28PM +0300, Felipe Balbi wrote:
prepare() is supposed to prevent new children from
being registered. On the MMC subsystem, children
(new cards) registration starts with the card
detect IRQ.
Move card detect IRQ disabling to prepare() so that
no new cards will be registered while we're trying
to suspend.
Likewise, move card detect IRQ enabling to complete()
so we only try to register new children after our MMC
IP is back up.
Signed-off-by: Felipe Balbi <redacted>
---
Venkat, do you think the patch below makes sense ?
@@ -2035,23 +2055,10 @@ static int omap_hsmmc_suspend(struct device *dev)pm_runtime_get_sync(host->dev);host->suspended=1;-if(host->pdata->suspend){-ret=host->pdata->suspend(dev,host->slot_id);-if(ret){-dev_dbg(dev,"Unable to handle MMC board"-" level suspend\n");-host->suspended=0;-returnret;-}-}ret=mmc_suspend_host(host->mmc);if(ret){host->suspended=0;-if(host->pdata->resume){-if(host->pdata->resume(dev,host->slot_id))-dev_dbg(dev,"Unmask interrupt failed\n");-}gotoerr;}
@@ -2088,12 +2095,6 @@ static int omap_hsmmc_resume(struct device *dev)if(!(host->mmc->pm_flags&MMC_PM_KEEP_POWER))omap_hsmmc_conf_bus_power(host);-if(host->pdata->resume){-ret=host->pdata->resume(dev,host->slot_id);-if(ret)-dev_dbg(dev,"Unmask interrupt failed\n");-}-omap_hsmmc_protect_card(host);/* Notify the core to resume the host */
From: Felipe Balbi <hidden> Date: 2012-10-25 18:04:18
Hi,
On Mon, Oct 22, 2012 at 04:27:08PM +0300, Felipe Balbi wrote:
On Mon, Oct 22, 2012 at 03:59:28PM +0300, Felipe Balbi wrote:
quoted
prepare() is supposed to prevent new children from
being registered. On the MMC subsystem, children
(new cards) registration starts with the card
detect IRQ.
Move card detect IRQ disabling to prepare() so that
no new cards will be registered while we're trying
to suspend.
Likewise, move card detect IRQ enabling to complete()
so we only try to register new children after our MMC
IP is back up.
Signed-off-by: Felipe Balbi <redacted>
---
Venkat, do you think the patch below makes sense ?
@@ -2035,23 +2055,10 @@ static int omap_hsmmc_suspend(struct device *dev)pm_runtime_get_sync(host->dev);host->suspended=1;-if(host->pdata->suspend){-ret=host->pdata->suspend(dev,host->slot_id);-if(ret){-dev_dbg(dev,"Unable to handle MMC board"-" level suspend\n");-host->suspended=0;-returnret;-}-}ret=mmc_suspend_host(host->mmc);if(ret){host->suspended=0;-if(host->pdata->resume){-if(host->pdata->resume(dev,host->slot_id))-dev_dbg(dev,"Unmask interrupt failed\n");-}gotoerr;}
@@ -2088,12 +2095,6 @@ static int omap_hsmmc_resume(struct device *dev)if(!(host->mmc->pm_flags&MMC_PM_KEEP_POWER))omap_hsmmc_conf_bus_power(host);-if(host->pdata->resume){-ret=host->pdata->resume(dev,host->slot_id);-if(ret)-dev_dbg(dev,"Unmask interrupt failed\n");-}-omap_hsmmc_protect_card(host);/* Notify the core to resume the host */
From: Venkatraman S <hidden> Date: 2012-10-26 11:15:17
On Thursday 25 October 2012 11:34 PM, Felipe Balbi wrote:
Hi,
On Mon, Oct 22, 2012 at 04:27:08PM +0300, Felipe Balbi wrote:
quoted
On Mon, Oct 22, 2012 at 03:59:28PM +0300, Felipe Balbi wrote:
quoted
prepare() is supposed to prevent new children from
being registered. On the MMC subsystem, children
(new cards) registration starts with the card
detect IRQ.
Move card detect IRQ disabling to prepare() so that
no new cards will be registered while we're trying
to suspend.
Likewise, move card detect IRQ enabling to complete()
so we only try to register new children after our MMC
IP is back up.
Signed-off-by: Felipe Balbi <redacted>
---
Venkat, do you think the patch below makes sense ?
From: Venkatraman S <hidden> Date: 2012-11-06 15:50:04
On Mon, Oct 22, 2012 at 6:29 PM, Felipe Balbi [off-list ref] wrote:
prepare() is supposed to prevent new children from
being registered. On the MMC subsystem, children
(new cards) registration starts with the card
detect IRQ.
Move card detect IRQ disabling to prepare() so that
no new cards will be registered while we're trying
to suspend.
Likewise, move card detect IRQ enabling to complete()
so we only try to register new children after our MMC
IP is back up.
Signed-off-by: Felipe Balbi <redacted>
---
Venkat, do you think the patch below makes sense ?
Except for the minor nit mentioned below, it works well.
I'll include it in my patch series.
From: Felipe Balbi <hidden> Date: 2012-11-06 16:34:09
prepare() is supposed to prevent new children from
being registered. On the MMC subsystem, children
(new cards) registration starts with the card
detect IRQ.
Move card detect IRQ disabling to prepare() so that
no new cards will be registered while we're trying
to suspend.
Likewise, move card detect IRQ enabling to complete()
so we only try to register new children after our MMC
IP is back up.
Signed-off-by: Felipe Balbi <redacted>
---
Fixed ->complete() prototype.
drivers/mmc/host/omap_hsmmc.c | 43 +++++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 20 deletions(-)
@@ -2035,23 +2053,10 @@ static int omap_hsmmc_suspend(struct device *dev)pm_runtime_get_sync(host->dev);host->suspended=1;-if(host->pdata->suspend){-ret=host->pdata->suspend(dev,host->slot_id);-if(ret){-dev_dbg(dev,"Unable to handle MMC board"-" level suspend\n");-host->suspended=0;-returnret;-}-}ret=mmc_suspend_host(host->mmc);if(ret){host->suspended=0;-if(host->pdata->resume){-if(host->pdata->resume(dev,host->slot_id))-dev_dbg(dev,"Unmask interrupt failed\n");-}gotoerr;}
@@ -2088,12 +2093,6 @@ static int omap_hsmmc_resume(struct device *dev)if(!(host->mmc->pm_flags&MMC_PM_KEEP_POWER))omap_hsmmc_conf_bus_power(host);-if(host->pdata->resume){-ret=host->pdata->resume(dev,host->slot_id);-if(ret)-dev_dbg(dev,"Unmask interrupt failed\n");-}-omap_hsmmc_protect_card(host);/* Notify the core to resume the host */