From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Branden Subject: Re: [PATCH 2/5 RFC] mmc: sdhci-iproc: Actually enable the clock Date: Mon, 18 Jan 2016 13:35:12 -0800 Message-ID: <569D5A90.1050705@broadcom.com> References: <1453042744-16196-1-git-send-email-stefan.wahren@i2se.com> <1453042744-16196-3-git-send-email-stefan.wahren@i2se.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1453042744-16196-3-git-send-email-stefan.wahren@i2se.com> Sender: linux-mmc-owner@vger.kernel.org To: Stefan Wahren , Ray Jui , Jon Mason , Stephen Warren , Lee Jones , Eric Anholt Cc: Rob Herring , Mark Rutland , Arnd Bergmann , Ulf Hansson , kernel@martin.sperl.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com List-Id: devicetree@vger.kernel.org This patch looks good as well. On 16-01-17 06:59 AM, Stefan Wahren 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 Acked-by: Scott Branden > --- > 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; >