* [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare [not found] <1340372890-10091-1-git-send-email-rnayak@ti.com> @ 2012-06-22 13:48 ` Rajendra Nayak 2012-06-22 18:23 ` S, Venkatraman 0 siblings, 1 reply; 7+ messages in thread From: Rajendra Nayak @ 2012-06-22 13:48 UTC (permalink / raw) To: paul, mturquette Cc: linux-omap, linux-arm-kernel, Rajendra Nayak, Chris Ball, Balaji T K, linux-mmc In preparation of OMAP moving to Common Clk Framework(CCF) add clk_prepare() and clk_unprepare() for the mmc and hsmmc clocks as part of the drivers probe() and remove() routines. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Cc: Chris Ball <cjb@laptop.org> Cc: Balaji T K <balajitk@ti.com> Cc: <linux-mmc@vger.kernel.org> --- drivers/mmc/host/omap.c | 9 ++++++--- drivers/mmc/host/omap_hsmmc.c | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 552196c..331fa89 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1466,13 +1466,14 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) ret = PTR_ERR(host->iclk); goto err_free_mmc_host; } - clk_enable(host->iclk); + clk_prepare_enable(host->iclk); host->fclk = clk_get(&pdev->dev, "fck"); if (IS_ERR(host->fclk)) { ret = PTR_ERR(host->fclk); goto err_free_iclk; } + clk_prepare(host->fclk); ret = request_irq(host->irq, mmc_omap_irq, 0, DRIVER_NAME, host); if (ret) @@ -1509,9 +1510,10 @@ err_plat_cleanup: err_free_irq: free_irq(host->irq, host); err_free_fclk: + clk_unprepare(host->fclk); clk_put(host->fclk); err_free_iclk: - clk_disable(host->iclk); + clk_disable_unprepare(host->iclk); clk_put(host->iclk); err_free_mmc_host: iounmap(host->virt_base); @@ -1539,8 +1541,9 @@ static int __devexit mmc_omap_remove(struct platform_device *pdev) mmc_omap_fclk_enable(host, 0); free_irq(host->irq, host); + clk_unprepare(host->fclk); clk_put(host->fclk); - clk_disable(host->iclk); + clk_disable_unprepare(host->iclk); clk_put(host->iclk); iounmap(host->virt_base); diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 9a7a60a..154baa5 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1908,7 +1908,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) if (IS_ERR(host->dbclk)) { dev_warn(mmc_dev(host->mmc), "Failed to get debounce clk\n"); host->dbclk = NULL; - } else if (clk_enable(host->dbclk) != 0) { + } else if (clk_prepare_enable(host->dbclk) != 0) { dev_warn(mmc_dev(host->mmc), "Failed to enable debounce clk\n"); clk_put(host->dbclk); host->dbclk = NULL; @@ -2032,7 +2032,7 @@ err_irq: pm_runtime_disable(host->dev); clk_put(host->fclk); if (host->dbclk) { - clk_disable(host->dbclk); + clk_disable_unprepare(host->dbclk); clk_put(host->dbclk); } err1: @@ -2067,7 +2067,7 @@ static int __devexit omap_hsmmc_remove(struct platform_device *pdev) pm_runtime_disable(host->dev); clk_put(host->fclk); if (host->dbclk) { - clk_disable(host->dbclk); + clk_disable_unprepare(host->dbclk); clk_put(host->dbclk); } -- 1.7.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare 2012-06-22 13:48 ` [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare Rajendra Nayak @ 2012-06-22 18:23 ` S, Venkatraman 2012-06-22 18:34 ` Paul Walmsley 2012-06-25 5:32 ` Rajendra Nayak 0 siblings, 2 replies; 7+ messages in thread From: S, Venkatraman @ 2012-06-22 18:23 UTC (permalink / raw) To: Rajendra Nayak Cc: paul, mturquette, linux-omap, linux-arm-kernel, Chris Ball, Balaji T K, linux-mmc On Fri, Jun 22, 2012 at 7:18 PM, Rajendra Nayak <rnayak@ti.com> wrote: > In preparation of OMAP moving to Common Clk Framework(CCF) add clk_prepare() > and clk_unprepare() for the mmc and hsmmc clocks as part of the drivers > probe() and remove() routines. > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> > Cc: Chris Ball <cjb@laptop.org> > Cc: Balaji T K <balajitk@ti.com> > Cc: <linux-mmc@vger.kernel.org> Rajendra, Can this be applied independently, or does this patch have a dependency on other patches in the series ? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare 2012-06-22 18:23 ` S, Venkatraman @ 2012-06-22 18:34 ` Paul Walmsley 2012-06-25 5:25 ` Rajendra Nayak 2012-06-25 5:32 ` Rajendra Nayak 1 sibling, 1 reply; 7+ messages in thread From: Paul Walmsley @ 2012-06-22 18:34 UTC (permalink / raw) To: S, Venkatraman Cc: Rajendra Nayak, mturquette, linux-omap, linux-arm-kernel, Chris Ball, Balaji T K, linux-mmc On Fri, 22 Jun 2012, S, Venkatraman wrote: > On Fri, Jun 22, 2012 at 7:18 PM, Rajendra Nayak <rnayak@ti.com> wrote: > > In preparation of OMAP moving to Common Clk Framework(CCF) add clk_prepare() > > and clk_unprepare() for the mmc and hsmmc clocks as part of the drivers > > probe() and remove() routines. > > > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> > > Cc: Chris Ball <cjb@laptop.org> > > Cc: Balaji T K <balajitk@ti.com> > > Cc: <linux-mmc@vger.kernel.org> > > Rajendra, > Can this be applied independently, or does this patch have a > dependency on other patches in the series ? A better way to handle this one would be to convert the driver to runtime PM. That needs to be done anyway. - Paul ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare 2012-06-22 18:34 ` Paul Walmsley @ 2012-06-25 5:25 ` Rajendra Nayak 2012-06-25 6:18 ` Paul Walmsley 0 siblings, 1 reply; 7+ messages in thread From: Rajendra Nayak @ 2012-06-25 5:25 UTC (permalink / raw) To: Paul Walmsley Cc: S, Venkatraman, mturquette, linux-omap, linux-arm-kernel, Chris Ball, Balaji T K, linux-mmc On Saturday 23 June 2012 12:04 AM, Paul Walmsley wrote: > On Fri, 22 Jun 2012, S, Venkatraman wrote: > >> On Fri, Jun 22, 2012 at 7:18 PM, Rajendra Nayak<rnayak@ti.com> wrote: >>> In preparation of OMAP moving to Common Clk Framework(CCF) add clk_prepare() >>> and clk_unprepare() for the mmc and hsmmc clocks as part of the drivers >>> probe() and remove() routines. >>> >>> Signed-off-by: Rajendra Nayak<rnayak@ti.com> >>> Cc: Chris Ball<cjb@laptop.org> >>> Cc: Balaji T K<balajitk@ti.com> >>> Cc:<linux-mmc@vger.kernel.org> >> >> Rajendra, >> Can this be applied independently, or does this patch have a >> dependency on other patches in the series ? > > A better way to handle this one would be to convert the driver to runtime > PM. That needs to be done anyway. Well, mmc driver is already using runtime PM. But it still using clock apis' to deal with some optional debounce clock needed only on 2430. > > > - Paul ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare 2012-06-25 5:25 ` Rajendra Nayak @ 2012-06-25 6:18 ` Paul Walmsley 2012-06-25 7:13 ` Rajendra Nayak 0 siblings, 1 reply; 7+ messages in thread From: Paul Walmsley @ 2012-06-25 6:18 UTC (permalink / raw) To: S, Venkatraman, Rajendra Nayak Cc: mturquette, linux-omap, linux-arm-kernel, Chris Ball, Balaji T K, linux-mmc On Mon, 25 Jun 2012, Rajendra Nayak wrote: > On Saturday 23 June 2012 12:04 AM, Paul Walmsley wrote: > > On Fri, 22 Jun 2012, S, Venkatraman wrote: > > > > > On Fri, Jun 22, 2012 at 7:18 PM, Rajendra Nayak<rnayak@ti.com> wrote: > > > > In preparation of OMAP moving to Common Clk Framework(CCF) add > > > > clk_prepare() > > > > and clk_unprepare() for the mmc and hsmmc clocks as part of the drivers > > > > probe() and remove() routines. > > > > > > > > Signed-off-by: Rajendra Nayak<rnayak@ti.com> > > > > Cc: Chris Ball<cjb@laptop.org> > > > > Cc: Balaji T K<balajitk@ti.com> > > > > Cc:<linux-mmc@vger.kernel.org> > > > > > > Rajendra, > > > Can this be applied independently, or does this patch have a > > > dependency on other patches in the series ? > > > > A better way to handle this one would be to convert the driver to runtime > > PM. That needs to be done anyway. > > Well, mmc driver is already using runtime PM. But it still using clock > apis' to deal with some optional debounce clock needed only on 2430. drivers/mmc/host/omap.c, which is what this patch changes, has not yet been converted to use runtime PM in mainline. This is a driver for the MSDI IP block which is not available on 2430. - Paul ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare 2012-06-25 6:18 ` Paul Walmsley @ 2012-06-25 7:13 ` Rajendra Nayak 0 siblings, 0 replies; 7+ messages in thread From: Rajendra Nayak @ 2012-06-25 7:13 UTC (permalink / raw) To: Paul Walmsley Cc: S, Venkatraman, mturquette, linux-omap, linux-arm-kernel, Chris Ball, Balaji T K, linux-mmc On Monday 25 June 2012 11:48 AM, Paul Walmsley wrote: > On Mon, 25 Jun 2012, Rajendra Nayak wrote: > >> On Saturday 23 June 2012 12:04 AM, Paul Walmsley wrote: >>> On Fri, 22 Jun 2012, S, Venkatraman wrote: >>> >>>> On Fri, Jun 22, 2012 at 7:18 PM, Rajendra Nayak<rnayak@ti.com> wrote: >>>>> In preparation of OMAP moving to Common Clk Framework(CCF) add >>>>> clk_prepare() >>>>> and clk_unprepare() for the mmc and hsmmc clocks as part of the drivers >>>>> probe() and remove() routines. >>>>> >>>>> Signed-off-by: Rajendra Nayak<rnayak@ti.com> >>>>> Cc: Chris Ball<cjb@laptop.org> >>>>> Cc: Balaji T K<balajitk@ti.com> >>>>> Cc:<linux-mmc@vger.kernel.org> >>>> >>>> Rajendra, >>>> Can this be applied independently, or does this patch have a >>>> dependency on other patches in the series ? >>> >>> A better way to handle this one would be to convert the driver to runtime >>> PM. That needs to be done anyway. >> >> Well, mmc driver is already using runtime PM. But it still using clock >> apis' to deal with some optional debounce clock needed only on 2430. > > drivers/mmc/host/omap.c, which is what this patch changes, has not yet > been converted to use runtime PM in mainline. Venkat/Balaji, Any plans of converting this driver to use runtime pm? > > This is a driver for the MSDI IP block which is not available on 2430. Sorry, I meant to say the debounce clock in omap_hsmmc.c was used only on 2430. I seemed to have overlooked the fclk/iclk in drivers/mmc /host/omap.c completely. That one seems to be for the controller in 2420 (atlest, and maybe some other older OMAPs). > > - Paul ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare 2012-06-22 18:23 ` S, Venkatraman 2012-06-22 18:34 ` Paul Walmsley @ 2012-06-25 5:32 ` Rajendra Nayak 1 sibling, 0 replies; 7+ messages in thread From: Rajendra Nayak @ 2012-06-25 5:32 UTC (permalink / raw) To: S, Venkatraman Cc: paul, mturquette, linux-omap, linux-arm-kernel, Chris Ball, Balaji T K, linux-mmc On Friday 22 June 2012 11:53 PM, S, Venkatraman wrote: > On Fri, Jun 22, 2012 at 7:18 PM, Rajendra Nayak<rnayak@ti.com> wrote: >> In preparation of OMAP moving to Common Clk Framework(CCF) add clk_prepare() >> and clk_unprepare() for the mmc and hsmmc clocks as part of the drivers >> probe() and remove() routines. >> >> Signed-off-by: Rajendra Nayak<rnayak@ti.com> >> Cc: Chris Ball<cjb@laptop.org> >> Cc: Balaji T K<balajitk@ti.com> >> Cc:<linux-mmc@vger.kernel.org> > > Rajendra, > Can this be applied independently, or does this patch have a > dependency on other patches in the series ? Yes, this can be applied independently. There is no other dependency. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-25 7:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1340372890-10091-1-git-send-email-rnayak@ti.com>
2012-06-22 13:48 ` [PATCH 02/11] mmc: omap: add clk_prepare and clk_unprepare Rajendra Nayak
2012-06-22 18:23 ` S, Venkatraman
2012-06-22 18:34 ` Paul Walmsley
2012-06-25 5:25 ` Rajendra Nayak
2012-06-25 6:18 ` Paul Walmsley
2012-06-25 7:13 ` Rajendra Nayak
2012-06-25 5:32 ` Rajendra Nayak
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox