From 0100d7ce63693ce17bfce4d15514ffa53e09c660 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Thu, 28 Oct 2010 14:24:02 -0700 Subject: [PATCH] ARM: tegra: nvrm: enable/disable avp.sclk on remote clock requests Change-Id: Ib87fa7dd57b3742926f6d631de01ea99f57d0ce0 Signed-off-by: Dima Zavin --- .../arm/mach-tegra/nv/nvrm/core/common/nvrm_power.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/nv/nvrm/core/common/nvrm_power.c b/arch/arm/mach-tegra/nv/nvrm/core/common/nvrm_power.c index fd93eb66ea37..b085ccf130e2 100644 --- a/arch/arm/mach-tegra/nv/nvrm/core/common/nvrm_power.c +++ b/arch/arm/mach-tegra/nv/nvrm/core/common/nvrm_power.c @@ -78,6 +78,10 @@ NvError NvRmPowerModuleClockControl( const char *bsea_names[] = { "bsea", NULL }; const char *vde_names[] = { "vde", NULL }; const char **names = NULL; + static struct clk *sclk = NULL; + + if (!sclk) + sclk = clk_get_sys("tegra-avp", "sclk"); if (is_vcp(ModuleId)) names = vcp_names; @@ -101,10 +105,15 @@ NvError NvRmPowerModuleClockControl( continue; } - if (Enable) + if (Enable) { + if (sclk) + clk_enable(sclk); clk_enable(clk); - else + } else { + if (sclk) + clk_disable(sclk); clk_disable(clk); + } } return NvSuccess; -- 2.34.1