From: Dima Zavin Date: Thu, 28 Oct 2010 21:24:02 +0000 (-0700) Subject: ARM: tegra: nvrm: enable/disable avp.sclk on remote clock requests X-Git-Tag: firefly_0821_release~9834^2~368 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0100d7ce63693ce17bfce4d15514ffa53e09c660;p=firefly-linux-kernel-4.4.55.git ARM: tegra: nvrm: enable/disable avp.sclk on remote clock requests Change-Id: Ib87fa7dd57b3742926f6d631de01ea99f57d0ce0 Signed-off-by: Dima Zavin --- 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;