aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-06-27 17:04:27 -0700
committerOlof Johansson <olof@lixom.net>2013-06-27 17:04:27 -0700
commit8c3d913888cfb0066d62831969c3a992f7e4aba5 (patch)
tree0b52b0b71cb6b7c141ffa050b36245a13cff4f54 /drivers/mmc
parentMerge branch 'msm/fixes' into next/late (diff)
parentARM: msm: Migrate to common clock framework (diff)
downloadlinux-dev-8c3d913888cfb0066d62831969c3a992f7e4aba5.tar.xz
linux-dev-8c3d913888cfb0066d62831969c3a992f7e4aba5.zip
Merge tag 'msm-clock-for-3.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into next/late
From David Brown: MSM clock updates for 3.11. Per Stephen Boyd's coverletter: Resending to collect higher level maintainer acks per Olof's request. The plan is to push this patchset through MSM to the arm-soc tree. This patchset moves the existing MSM clock code and affected drivers to the common clock framework. A prerequisite of moving to the common clock framework is to use clk_prepare() and clk_enable() so the first few patches migrate drivers to that call (clk_prepare() is a no-op on MSM right now). It also removes some custom clock APIs that MSM provides and finally moves the proc_comm clock code to the common struct clk. This patch series will be used as the foundation of the MSM 8660/8960 clock code that I plan to send out after this series. * tag 'msm-clock-for-3.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm: ARM: msm: Migrate to common clock framework ARM: msm: Make proc_comm clock control into a platform driver ARM: msm: Prepare clk_get() users in mach-msm for clock-pcom driver ARM: msm: Remove clock-7x30.h include file ARM: msm: Remove custom clk_set_{max,min}_rate() API ARM: msm: Remove custom clk_set_flags() API msm: iommu: Use clk_set_rate() instead of clk_set_min_rate() msm: iommu: Convert to clk_prepare/unprepare msm_sdcc: Convert to clk_prepare/unprepare usb: otg: msm: Convert to clk_prepare/unprepare msm_serial: Use devm_clk_get() and properly return errors msm_serial: Convert to clk_prepare/unprepare Acked-by: Chris Ball <cjb@laptop.org> # for msm_sdcc.c Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/msm_sdcc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 0ee4a57fe6b2..b900de4e7e94 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1268,10 +1268,18 @@ msmsdcc_probe(struct platform_device *pdev)
goto clk_put;
}
+ ret = clk_prepare(host->pclk);
+ if (ret)
+ goto clk_put;
+
+ ret = clk_prepare(host->clk);
+ if (ret)
+ goto clk_unprepare_p;
+
/* Enable clocks */
ret = msmsdcc_enable_clocks(host);
if (ret)
- goto clk_put;
+ goto clk_unprepare;
host->pclk_rate = clk_get_rate(host->pclk);
host->clk_rate = clk_get_rate(host->clk);
@@ -1386,6 +1394,10 @@ msmsdcc_probe(struct platform_device *pdev)
free_irq(host->stat_irq, host);
clk_disable:
msmsdcc_disable_clocks(host, 0);
+ clk_unprepare:
+ clk_unprepare(host->clk);
+ clk_unprepare_p:
+ clk_unprepare(host->pclk);
clk_put:
clk_put(host->clk);
pclk_put: