* [PATCH] mmc: dw_mmc: add missing codes for runtime resume @ 2016-11-23 9:33 ` Joonyoung Shim 2016-11-25 2:37 ` Jaehoon Chung 2016-11-25 2:37 ` Jaehoon Chung 0 siblings, 2 replies; 4+ messages in thread From: Joonyoung Shim @ 2016-11-23 9:33 UTC (permalink / raw) To: linux-mmc; +Cc: jh80.chung, ulf.hansson, shawn.lin, jy0922.shim The commit 64997de4fd17 ("mmc: dw_mmc: remove system PM callback") is missing to call dw_mci_ctrl_reset(). This adds to call dw_mci_ctrl_reset() and to handle error of clocks. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> --- drivers/mmc/host/dw_mmc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index d426fa41bcce..25e21a20ee04 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -3303,6 +3303,17 @@ int dw_mci_runtime_resume(struct device *dev) if (ret) return ret; + if (!dw_mci_ctrl_reset(host, SDMMC_CTRL_ALL_RESET_FLAGS)) { + clk_disable_unprepare(host->ciu_clk); + + if (host->cur_slot && + (mmc_can_gpio_cd(host->cur_slot->mmc) || + !mmc_card_is_removable(host->cur_slot->mmc))) + clk_disable_unprepare(host->biu_clk); + + return -ENODEV; + } + if (host->use_dma && host->dma_ops->init) host->dma_ops->init(host); -- 1.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: dw_mmc: add missing codes for runtime resume 2016-11-23 9:33 ` [PATCH] mmc: dw_mmc: add missing codes for runtime resume Joonyoung Shim @ 2016-11-25 2:37 ` Jaehoon Chung 2016-11-25 2:55 ` Joonyoung Shim 2016-11-25 2:37 ` Jaehoon Chung 1 sibling, 1 reply; 4+ messages in thread From: Jaehoon Chung @ 2016-11-25 2:37 UTC (permalink / raw) To: Joonyoung Shim, linux-mmc; +Cc: ulf.hansson, shawn.lin Hi Joonyoung, On 11/23/2016 06:33 PM, Joonyoung Shim wrote: > The commit 64997de4fd17 ("mmc: dw_mmc: remove system PM callback") is > missing to call dw_mci_ctrl_reset(). This adds to call > dw_mci_ctrl_reset() and to handle error of clocks. > > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Applied on my dwmmc repository. Thanks! Best Regards, Jaehoon Chung > --- > drivers/mmc/host/dw_mmc.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > index d426fa41bcce..25e21a20ee04 100644 > --- a/drivers/mmc/host/dw_mmc.c > +++ b/drivers/mmc/host/dw_mmc.c > @@ -3303,6 +3303,17 @@ int dw_mci_runtime_resume(struct device *dev) > if (ret) > return ret; > > + if (!dw_mci_ctrl_reset(host, SDMMC_CTRL_ALL_RESET_FLAGS)) { > + clk_disable_unprepare(host->ciu_clk); > + > + if (host->cur_slot && > + (mmc_can_gpio_cd(host->cur_slot->mmc) || > + !mmc_card_is_removable(host->cur_slot->mmc))) > + clk_disable_unprepare(host->biu_clk); > + > + return -ENODEV; > + } > + > if (host->use_dma && host->dma_ops->init) > host->dma_ops->init(host); > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: dw_mmc: add missing codes for runtime resume 2016-11-25 2:37 ` Jaehoon Chung @ 2016-11-25 2:55 ` Joonyoung Shim 0 siblings, 0 replies; 4+ messages in thread From: Joonyoung Shim @ 2016-11-25 2:55 UTC (permalink / raw) To: Jaehoon Chung, linux-mmc Cc: ulf.hansson, shawn.lin, jy0922.shim@samsung.com >> Joonyoung Shim Hi jaehoon, On 11/25/2016 11:37 AM, Jaehoon Chung wrote: > Hi Joonyoung, > > On 11/23/2016 06:33 PM, Joonyoung Shim wrote: >> The commit 64997de4fd17 ("mmc: dw_mmc: remove system PM callback") is >> missing to call dw_mci_ctrl_reset(). This adds to call >> dw_mci_ctrl_reset() and to handle error of clocks. >> >> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> > > Applied on my dwmmc repository. Thanks! > Thanks, but i found one more issue. > Best Regards, > Jaehoon Chung > >> --- >> drivers/mmc/host/dw_mmc.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c >> index d426fa41bcce..25e21a20ee04 100644 >> --- a/drivers/mmc/host/dw_mmc.c >> +++ b/drivers/mmc/host/dw_mmc.c >> @@ -3303,6 +3303,17 @@ int dw_mci_runtime_resume(struct device *dev) >> if (ret) >> return ret; Here, error handling about biu_clk should be consider. >> >> + if (!dw_mci_ctrl_reset(host, SDMMC_CTRL_ALL_RESET_FLAGS)) { >> + clk_disable_unprepare(host->ciu_clk); >> + >> + if (host->cur_slot && >> + (mmc_can_gpio_cd(host->cur_slot->mmc) || >> + !mmc_card_is_removable(host->cur_slot->mmc))) >> + clk_disable_unprepare(host->biu_clk); >> + >> + return -ENODEV; >> + } >> + >> if (host->use_dma && host->dma_ops->init) >> host->dma_ops->init(host); >> >> I will send patch v2, could you review and apply patch v2 instead of v1? Thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: dw_mmc: add missing codes for runtime resume 2016-11-23 9:33 ` [PATCH] mmc: dw_mmc: add missing codes for runtime resume Joonyoung Shim 2016-11-25 2:37 ` Jaehoon Chung @ 2016-11-25 2:37 ` Jaehoon Chung 1 sibling, 0 replies; 4+ messages in thread From: Jaehoon Chung @ 2016-11-25 2:37 UTC (permalink / raw) To: Joonyoung Shim, linux-mmc; +Cc: ulf.hansson, shawn.lin Hi Joonyoung, On 11/23/2016 06:33 PM, Joonyoung Shim wrote: > The commit 64997de4fd17 ("mmc: dw_mmc: remove system PM callback") is > missing to call dw_mci_ctrl_reset(). This adds to call > dw_mci_ctrl_reset() and to handle error of clocks. > > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Applied on my dwmmc repository. Thanks! Best Regards, Jaehoon Chung > --- > drivers/mmc/host/dw_mmc.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > index d426fa41bcce..25e21a20ee04 100644 > --- a/drivers/mmc/host/dw_mmc.c > +++ b/drivers/mmc/host/dw_mmc.c > @@ -3303,6 +3303,17 @@ int dw_mci_runtime_resume(struct device *dev) > if (ret) > return ret; > > + if (!dw_mci_ctrl_reset(host, SDMMC_CTRL_ALL_RESET_FLAGS)) { > + clk_disable_unprepare(host->ciu_clk); > + > + if (host->cur_slot && > + (mmc_can_gpio_cd(host->cur_slot->mmc) || > + !mmc_card_is_removable(host->cur_slot->mmc))) > + clk_disable_unprepare(host->biu_clk); > + > + return -ENODEV; > + } > + > if (host->use_dma && host->dma_ops->init) > host->dma_ops->init(host); > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-25 2:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20161123094435epcas1p358457576f3e08aa57b19012efc8c7ad1@epcas1p3.samsung.com>
2016-11-23 9:33 ` [PATCH] mmc: dw_mmc: add missing codes for runtime resume Joonyoung Shim
2016-11-25 2:37 ` Jaehoon Chung
2016-11-25 2:55 ` Joonyoung Shim
2016-11-25 2:37 ` Jaehoon Chung
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox