All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Lee Jones <lee@kernel.org>, Ray Jui <rjui@broadcom.com>,
	kernel@martin.sperl.org, Eric Anholt <eric@anholt.net>,
	Rob Herring <robh+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Stephen Warren <swarren@wwwdotorg.org>,
	linux-rpi-kernel@lists.infradead.org,
	Mark Rutland <mark.rutland@arm.com>,
	Jon Mason <jonmason@broadcom.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/5 RFC] mmc: sdhci-iproc: Actually enable the clock
Date: Wed, 27 Jan 2016 20:11:13 +0100 (CET)	[thread overview]
Message-ID: <885101040.21976.ad433530-d9a2-4a98-b048-302cf8550d48.open-xchange@email.1und1.de> (raw)
In-Reply-To: <CAPDyKFrCV_GCqCjymsKuOov9GT8gbmb9rBQoJfzmMbMtBnoqWQ@mail.gmail.com>

Hi,

> Ulf Hansson <ulf.hansson@linaro.org> hat am 27. Januar 2016 um 15:16
> geschrieben:
>
>
> On 17 January 2016 at 15:59, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> > The RPi firmware-based clocks driver can actually disable
> > unused clocks, so when switching to use it we ended up losing
> > our MMC clock once all devices were probed.
> >
> > This patch adopts the changes from 1e5a0a9a58e2 ("mmc: sdhci-bcm2835:
> > Actually enable the clock") to sdhci-iproc.
> >
> > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > ---
> > drivers/mmc/host/sdhci-iproc.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> > index e22060a..55bc348 100644
> > --- a/drivers/mmc/host/sdhci-iproc.c
> > +++ b/drivers/mmc/host/sdhci-iproc.c
> > @@ -207,6 +207,11 @@ static int sdhci_iproc_probe(struct platform_device
> > *pdev)
> > ret = PTR_ERR(pltfm_host->clk);
> > goto err;
> > }
> > + ret = clk_prepare_enable(pltfm_host->clk);
> > + if (ret) {
> > + dev_err(&pdev->dev, "failed to enable host clk\n");
> > + goto err;
> > + }
> >
> > if (iproc_host->data->pdata->quirks & SDHCI_QUIRK_MISSING_CAPS) {
> > host->caps = iproc_host->data->caps;
> > @@ -215,10 +220,12 @@ static int sdhci_iproc_probe(struct platform_device
> > *pdev)
> >
> > ret = sdhci_add_host(host);
> > if (ret)
> > - goto err;
> > + goto err_clk;
> >
> > return 0;
> >
> > +err_clk:
> > + clk_disable_unprepare(pltfm_host->clk);
> > err:
> > sdhci_pltfm_free(pdev);
> > return ret;
> > --
> > 1.7.9.5
> >
>
> There's a missing clk_disable_unprepare() from the ->remove()
> callback. Otherwise this looks good.

this shouldn't be necessary, because clk_disable_unprepare() is already called
by sdhci_pltfm_unregister().

Regards
Stefan

>
> Kind regards
> Uffe

  reply	other threads:[~2016-01-27 19:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17 14:58 [PATCH 0/5 RFC] mmc: sdhci-iproc: add bcm2835 support Stefan Wahren
     [not found] ` <1453042744-16196-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-17 14:59   ` [PATCH 1/5 RFC] mmc: sdhci-iproc: Clean up platform allocations if shdci init fails Stefan Wahren
2016-01-18 21:31     ` Scott Branden
2016-01-27 14:16     ` Ulf Hansson
2016-01-17 14:59   ` [PATCH 2/5 RFC] mmc: sdhci-iproc: Actually enable the clock Stefan Wahren
2016-01-18 21:35     ` Scott Branden
     [not found]     ` <1453042744-16196-3-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-27 14:16       ` Ulf Hansson
2016-01-27 19:11         ` Stefan Wahren [this message]
2016-01-27 21:11           ` Ulf Hansson
2016-01-17 14:59   ` [PATCH 3/5 RFC] ARM: bcm283x: specify sdhci quirks in dtsi file Stefan Wahren
2016-01-18 21:40     ` Scott Branden
     [not found]     ` <1453042744-16196-4-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-26  4:31       ` Stephen Warren
2016-01-17 14:59   ` [PATCH 4/5 RFC] mmc: sdhci-iproc: add bcm2835 support Stefan Wahren
2016-01-18 21:47     ` Scott Branden
2016-01-19 19:25       ` Stefan Wahren
2016-01-19 19:47         ` Scott Branden
2016-01-19  1:32     ` Jaehoon Chung
     [not found]       ` <569D923D.60306-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-01-20 21:23         ` Stefan Wahren
     [not found]     ` <1453042744-16196-5-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-26  4:34       ` Stephen Warren
2016-01-17 14:59 ` [PATCH 5/5 RFC] DT: sdhci-iproc: add bcm2835 compatible Stefan Wahren
2016-01-18 21:47   ` Scott Branden
2016-01-20 16:50   ` Rob Herring
2016-01-19 21:00 ` [PATCH 0/5 RFC] mmc: sdhci-iproc: add bcm2835 support Eric Anholt
2016-01-20 21:18   ` Stefan Wahren
2016-01-28 22:19     ` Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=885101040.21976.ad433530-d9a2-4a98-b048-302cf8550d48.open-xchange@email.1und1.de \
    --to=stefan.wahren@i2se.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=jonmason@broadcom.com \
    --cc=kernel@martin.sperl.org \
    --cc=lee@kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=swarren@wwwdotorg.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.