summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Frydrych <mfrydrych@nvidia.com>2010-09-17 21:15:38 +0300
committerVarun Colbert <vcolbert@nvidia.com>2010-10-12 22:36:22 -0700
commit98b1475bce96ad088e4105a73d34f1cf803f2ee0 (patch)
tree485a4a231e1eb4bc251f4c53afa1ac7e6822d1ff
parentbd56f15ff5f6cde67a23ee7b2acfa46c267d21f8 (diff)
[ARM/tegra] clock: added 2d busy hint for emc clk.
Bug 731173 (cherry picked from commit 8961b22287d3f7b6ea33744905675ebd2df236a2) Change-Id: Icc323fec5507991184b20fcb22e017d2acadd4e3 Reviewed-on: http://git-master/r/8127 Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rwxr-xr-x[-rw-r--r--]arch/arm/mach-tegra/clock_nvrm.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/clock_nvrm.c b/arch/arm/mach-tegra/clock_nvrm.c
index 925c8fb6ad18..365489b22ddc 100644..100755
--- a/arch/arm/mach-tegra/clock_nvrm.c
+++ b/arch/arm/mach-tegra/clock_nvrm.c
@@ -43,6 +43,8 @@
static LIST_HEAD(clocks);
static DEFINE_SPINLOCK(clock_lock);
static NvU32 clk_pwr_client;
+static NvU32 busy_pwr_client_2d;
+static NvU32 busy_pwr_client_3d;
struct clk *get_tegra_clock_by_name(const char *name)
{
@@ -100,11 +102,16 @@ static int tegra_periph_clk_enable(struct clk *c)
return -ENXIO;
}
- /* max out emc when 3d is on */
+ /* max out emc when 2d or 3d is on */
if (NVRM_MODULE_ID_MODULE(c->module) == NvRmModuleID_3D) {
NvRmDfsBusyHint hint =
{NvRmDfsClockId_Emc, 0xffffffff, NvRmFreqMaximum, true};
- NvRmPowerBusyHintMulti(s_hRmGlobal, clk_pwr_client, &hint, 1,
+ NvRmPowerBusyHintMulti(s_hRmGlobal, busy_pwr_client_3d, &hint, 1,
+ NvRmDfsBusyHintSyncMode_Async);
+ } else if (NVRM_MODULE_ID_MODULE(c->module) == NvRmModuleID_2D) {
+ NvRmDfsBusyHint hint =
+ {NvRmDfsClockId_Emc, 0xffffffff, NvRmFreqMaximum, true};
+ NvRmPowerBusyHintMulti(s_hRmGlobal, busy_pwr_client_2d, &hint, 1,
NvRmDfsBusyHintSyncMode_Async);
}
@@ -117,7 +124,11 @@ static void tegra_periph_clk_disable(struct clk *c)
if (NVRM_MODULE_ID_MODULE(c->module) == NvRmModuleID_3D) {
NvRmDfsBusyHint hint = {NvRmDfsClockId_Emc, 0, 0, true};
- NvRmPowerBusyHintMulti(s_hRmGlobal, clk_pwr_client, &hint, 1,
+ NvRmPowerBusyHintMulti(s_hRmGlobal, busy_pwr_client_3d, &hint, 1,
+ NvRmDfsBusyHintSyncMode_Async);
+ } else if (NVRM_MODULE_ID_MODULE(c->module) == NvRmModuleID_2D) {
+ NvRmDfsBusyHint hint = {NvRmDfsClockId_Emc, 0, 0, true};
+ NvRmPowerBusyHintMulti(s_hRmGlobal, busy_pwr_client_2d, &hint, 1,
NvRmDfsBusyHintSyncMode_Async);
}
@@ -443,6 +454,8 @@ void __init tegra_init_clock(void)
NvRmPrivPostRegulatorInit(s_hRmGlobal);
NvRmPowerRegister(s_hRmGlobal, 0, &clk_pwr_client);
+ NvRmPowerRegister(s_hRmGlobal, 0, &busy_pwr_client_2d);
+ NvRmPowerRegister(s_hRmGlobal, 0, &busy_pwr_client_3d);
tegra2_init_clocks();
#ifdef CONFIG_USE_ARM_TWD_PRESCALER