From 7687e551e8fc3987ad3294484437bd67f00500c0 Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Wed, 20 Aug 2014 20:37:40 -0700 Subject: gpu: nvgpu: Add clock idle slowdown register Added clock idle slowdown register. Fixed duplicated/overlapping therm_peakpower_config8_r and therm_peakpower_config1_r definitions. Change-Id: I37dad714ce5a6730a2f0b7c1b31b509bb1823975 Signed-off-by: Alex Frid Reviewed-on: http://git-master/r/486323 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu Tested-by: Seshendra Gadagottu Reviewed-by: Krishna Reddy --- drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h | 34 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h index 3431116e..09bd5830 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h @@ -90,23 +90,23 @@ static inline u32 therm_peakpower_config1_window_en_enabled_f(void) { return 0x80000000; } -static inline u32 therm_peakpower_config1_r(u32 i) +static inline u32 therm_peakpower_config8_r(u32 i) { return 0x000202e8 + i*4; } -static inline u32 therm_peakpower_config1_ba_sum_shift_s(void) +static inline u32 therm_peakpower_config8_ba_sum_shift_s(void) { return 5; } -static inline u32 therm_peakpower_config1_ba_sum_shift_f(u32 v) +static inline u32 therm_peakpower_config8_ba_sum_shift_f(u32 v) { return (v & 0x1f) << 8; } -static inline u32 therm_peakpower_config1_ba_sum_shift_m(void) +static inline u32 therm_peakpower_config8_ba_sum_shift_m(void) { return 0x1f << 8; } -static inline u32 therm_peakpower_config1_ba_sum_shift_v(u32 r) +static inline u32 therm_peakpower_config8_ba_sum_shift_v(u32 r) { return (r >> 8) & 0x1f; } @@ -122,10 +122,6 @@ static inline u32 therm_peakpower_config6_r(u32 i) { return 0x00020270 + i*4; } -static inline u32 therm_peakpower_config8_r(u32 i) -{ - return 0x000202e8 + i*4; -} static inline u32 therm_peakpower_config9_r(u32 i) { return 0x000202f4 + i*4; @@ -222,4 +218,24 @@ static inline u32 therm_hubmmu_idle_filter_value_m(void) { return 0xffffffff << 0; } +static inline u32 therm_clk_slowdown_r(u32 i) +{ + return 0x00020160 + i*4; +} +static inline u32 therm_clk_slowdown_idle_factor_f(u32 v) +{ + return (v & 0x3f) << 16; +} +static inline u32 therm_clk_slowdown_idle_factor_m(void) +{ + return 0x3f << 16; +} +static inline u32 therm_clk_slowdown_idle_factor_v(u32 r) +{ + return (r >> 16) & 0x3f; +} +static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) +{ + return 0x0; +} #endif -- cgit v1.2.2