diff options
author | Diwakar Tundlam <dtundlam@nvidia.com> | 2014-06-10 17:04:41 -0700 |
---|---|---|
committer | Mandar Padmawar <mpadmawar@nvidia.com> | 2014-06-13 02:19:13 -0700 |
commit | a7c53f819850fafc353fedfd9bf1d6b3be4c669a (patch) | |
tree | f8709f4e10fecb416cb8da70ccb6f13fd9fcdbf1 /arch/arm/mach-tegra/tegra11_soctherm.c | |
parent | 22f28a48d4270dcc6b932f1e6bd3cf78afa86833 (diff) |
arm: tegra: soctherm: fix throt level debug
This change fixes the show-regs output for OC5 throttle which
broke when "refactor throt level & vect" change was reverted.
Bug 200006274
Bug 200009441
Change-Id: I5a0843098baa7a6d041ceac86102d25d98dbae99
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/421891
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra11_soctherm.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra11_soctherm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/tegra11_soctherm.c b/arch/arm/mach-tegra/tegra11_soctherm.c index b6112b343d7f..8661f5f1b1a8 100644 --- a/arch/arm/mach-tegra/tegra11_soctherm.c +++ b/arch/arm/mach-tegra/tegra11_soctherm.c @@ -366,6 +366,7 @@ static const int precision; /* default 0 -> low precision */ #define THROT_LEVEL_LOW 0 #define THROT_LEVEL_MED 1 #define THROT_LEVEL_HVY 2 +#define THROT_LEVEL_NONE -1 /* invalid */ #define THROT_PRIORITY_LITE 0x444 #define THROT_PRIORITY_LITE_PRIO_SHIFT 0 @@ -3823,7 +3824,7 @@ static int regs_show(struct seq_file *s, void *data) continue; } - level = THROT_LEVEL_LOW; + level = THROT_LEVEL_NONE; /* invalid */ depth = ""; q = 0; if (IS_T13X && j == THROTTLE_DEV_CPU) { @@ -3841,6 +3842,7 @@ static int regs_show(struct seq_file *s, void *data) } if ((IS_T12X || IS_T13X) && j == THROTTLE_DEV_GPU) { state = REG_GET(r, THROT_PSKIP_CTRL_VECT_GPU); + /* Mapping is hard-coded in gk20a:nv_therm */ if (state == THROT_VECT_HVY) { q = 87; depth = "hi"; @@ -3853,7 +3855,9 @@ static int regs_show(struct seq_file *s, void *data) } } - if (IS_T13X && j == THROTTLE_DEV_CPU) + if (level == THROT_LEVEL_NONE) + r = 0; + else if (IS_T13X && j == THROTTLE_DEV_CPU) r = clk_reset13_readl( THROT13_PSKIP_CTRL_CPU(level)); else |