From: eric@anholt.net (Eric Anholt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] mmc: sdhci-bcm2835: Actually enable the clock
Date: Fri, 29 May 2015 14:06:12 -0700 [thread overview]
Message-ID: <1432933572-8695-2-git-send-email-eric@anholt.net> (raw)
In-Reply-To: <1432933572-8695-1-git-send-email-eric@anholt.net>
We're currently using a fixed frequency clock specified in the DT, so
enabling is a no-op. However, 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.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
v2: Re-disable our clock on sdhci_add_host() failure.
drivers/mmc/host/sdhci-bcm2835.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c
index 32f4046..1c65d46 100644
--- a/drivers/mmc/host/sdhci-bcm2835.c
+++ b/drivers/mmc/host/sdhci-bcm2835.c
@@ -172,12 +172,19 @@ static int bcm2835_sdhci_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;
+ }
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;
--
2.1.4
next prev parent reply other threads:[~2015-05-29 21:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 21:06 [PATCH v2 1/2] mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails Eric Anholt
2015-05-29 21:06 ` Eric Anholt [this message]
2015-06-01 8:05 ` [PATCH v2 2/2] mmc: sdhci-bcm2835: Actually enable the clock Ulf Hansson
2015-06-05 2:59 ` Stephen Warren
2015-06-05 8:48 ` Ulf Hansson
2015-06-01 8:05 ` [PATCH v2 1/2] mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails Ulf Hansson
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=1432933572-8695-2-git-send-email-eric@anholt.net \
--to=eric@anholt.net \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).