mmc: sdhci-bcm2835: Actually enable the clock
Subsystems (4)
PATCH 1/1 mmc: sdhci-bcm2835: Actually enable the clock
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.
--- drivers/mmc/host/sdhci-bcm2835.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mmc/host/sdhci-bcm2835.c +5 -0
@@ -172,6 +172,11 @@ 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; + }return sdhci_add_host (host);
Signature · 1 line
2.1.4
Quoted 15 lines · Eric Anholt
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 <[email protected]>--- drivers/mmc/host/sdhci-bcm2835.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mmc/host/sdhci-bcm2835.c +0
-0
drivers/mmc/host/sdhci-bcm2835.c static int bcm2835_sdhci_probe(struct platform_device *pdev) · line 181
Quoted 10 lines
drivers/mmc/host/sdhci-bcm2835.c +5
-0@@ -172,6 +172,11 @@ 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; + }return sdhci_add_host (host);
Where's the error clean-up path for a failed sdhci_add_host()?
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
Quoted 25 lines · Russell King - ARM Linux
Quoted 24 lines · Eric Anholt
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 <[email protected]>--- drivers/mmc/host/sdhci-bcm2835.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mmc/host/sdhci-bcm2835.c +5
-0@@ -172,6 +172,11 @@ 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; + }
Quoted 3 lines
drivers/mmc/host/sdhci-bcm2835.c static int bcm2835_sdhci_probe(struct platform_device *pdev) · line 181
Quoted 1 line
drivers/mmc/host/sdhci-bcm2835.c +0
-0return sdhci_add_host (host);Where's the error clean-up path for a failed
sdhci_add_host()?
We were already missing required cleanup in that path, so I didn't
notice. Sending a new version with a fix for that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150529/40b0dfcb/attachment-0001.sig>