diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 904839b9350..92d70a872ad 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -257,6 +257,7 @@ config ARCH_MSM9615 select MSM_RPM_REGULATOR select MULTI_IRQ_HANDLER select MSM_PM8X60 if PM + select MSM_XO config ARCH_MSM8625 bool "MSM8625" diff --git a/arch/arm/mach-msm/board-9615.c b/arch/arm/mach-msm/board-9615.c index 84a8a42e5df..1f19bf6bea4 100644 --- a/arch/arm/mach-msm/board-9615.c +++ b/arch/arm/mach-msm/board-9615.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "timer.h" #include "devices.h" #include "board-9615.h" @@ -568,6 +569,7 @@ static void __init msm9615_common_init(void) msm9615_i2c_init(); regulator_suppress_info_printing(); platform_device_register(&msm9615_device_rpm_regulator); + msm_xo_init(); msm_clock_init(&msm9615_clock_init_data); msm9615_init_buses(); msm9615_device_qup_spi_gsbi3.dev.platform_data = diff --git a/arch/arm/mach-msm/msm_xo.c b/arch/arm/mach-msm/msm_xo.c index af272afbd17..cd7581840d6 100644 --- a/arch/arm/mach-msm/msm_xo.c +++ b/arch/arm/mach-msm/msm_xo.c @@ -115,7 +115,7 @@ late_initcall(msm_xo_debugfs_init); static int msm_xo_update_vote(struct msm_xo *xo) { int ret; - unsigned vote, prev_vote = xo->mode; + unsigned vote, prev_vote = xo->mode, ctx_set; struct msm_rpm_iv_pair cmd; if (xo->votes[MSM_XO_MODE_ON]) @@ -141,7 +141,11 @@ static int msm_xo_update_vote(struct msm_xo *xo) } else if (xo == &msm_xo_sources[MSM_XO_CXO]) { cmd.id = MSM_RPM_ID_CXO_CLK; cmd.value = msm_xo_sources[MSM_XO_CXO].mode ? 1 : 0; - ret = msm_rpmrs_set_noirq(MSM_RPM_CTX_SET_0, &cmd, 1); + if (cpu_is_msm9615()) + ctx_set = MSM_RPM_CTX_SET_SLEEP; + else + ctx_set = MSM_RPM_CTX_SET_0; + ret = msm_rpmrs_set_noirq(ctx_set, &cmd, 1); } else { cmd.id = MSM_RPM_ID_CXO_BUFFERS; cmd.value = (msm_xo_sources[MSM_XO_TCXO_D0].mode << 0) | @@ -304,12 +308,25 @@ EXPORT_SYMBOL(msm_xo_put); int __init msm_xo_init(void) { int i; - int ret; + int ret = 0; struct msm_rpm_iv_pair cmd[2]; for (i = 0; i < ARRAY_SIZE(msm_xo_sources); i++) INIT_LIST_HEAD(&msm_xo_sources[i].voters); + if (cpu_is_msm9615()) { + cmd[0].id = MSM_RPM_ID_CXO_CLK; + cmd[0].value = 1; + ret = msm_rpmrs_set(MSM_RPM_CTX_SET_0, cmd, 1); + if (ret) + goto out; + + cmd[0].id = MSM_RPM_ID_CXO_CLK; + cmd[0].value = 0; + ret = msm_rpmrs_set(MSM_RPM_CTX_SET_SLEEP, cmd, 1); + goto out; + } + cmd[0].id = MSM_RPM_ID_PXO_CLK; cmd[0].value = 1; cmd[1].id = MSM_RPM_ID_CXO_BUFFERS;