summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSachin Nikam <snikam@nvidia.com>2011-07-06 13:57:31 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-07-18 19:05:02 -0700
commit52ee27d112691171bbf6bab00329701288944f1e (patch)
tree32d667c1f954556073cfc6319c5580aafe89b3c1 /drivers
parentea44e0325596c4e78fbd2bcf67648fb524b0c7bc (diff)
media: video: tegra: set_clk_rate for avp
set_clk_rate for sclk which is parent of avp clock. Bug 843725 Signed-off-by: Sachin Nikam <snikam@nvidia.com> Reviewed-on: http://git-master/r/39772 (cherry picked from commit 7ca01f6ae2071c5adac467552bdedb54d158d51b) Change-Id: I8549554b1515be39722fe5c0da5a2ad037e3d2f2 Reviewed-on: http://git-master/r/40598 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/tegra/avp/avp_svc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/video/tegra/avp/avp_svc.c b/drivers/media/video/tegra/avp/avp_svc.c
index b357c64a30e9..dcea7eaea410 100644
--- a/drivers/media/video/tegra/avp/avp_svc.c
+++ b/drivers/media/video/tegra/avp/avp_svc.c
@@ -458,9 +458,12 @@ static void do_svc_module_clock_set(struct avp_svc_info *avp_svc,
}
mutex_lock(&avp_svc->clk_lock);
-
- aclk = &avp_svc->clks[mod->clk_req];
- ret = clk_set_rate(aclk->clk, msg->clk_freq);
+ if (msg->module_id == AVP_MODULE_ID_AVP) {
+ ret = clk_set_rate(avp_svc->sclk, msg->clk_freq);
+ } else {
+ aclk = &avp_svc->clks[mod->clk_req];
+ ret = clk_set_rate(aclk->clk, msg->clk_freq);
+ }
if (ret) {
pr_err("avp_svc: Failed to set module (id = %d) frequency to %d Hz\n",
msg->module_id, msg->clk_freq);
@@ -470,7 +473,10 @@ static void do_svc_module_clock_set(struct avp_svc_info *avp_svc,
goto send_response;
}
- resp.act_freq = clk_get_rate(aclk->clk);
+ if (msg->module_id == AVP_MODULE_ID_AVP)
+ resp.act_freq = clk_get_rate(avp_svc->sclk);
+ else
+ resp.act_freq = clk_get_rate(aclk->clk);
mutex_unlock(&avp_svc->clk_lock);
resp.err = 0;