aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/powercap/intel_rapl.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-11-11 12:59:29 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-08 19:18:34 -0500
commit4077a387b79f41e262e9e7332a23b24860407b18 (patch)
tree0eddd69e9dba02a817c444a9387aca9eff8b8936 /drivers/powercap/intel_rapl.c
parent527e9316f8ec44bd53d90fb9f611fa7ffff52bb9 (diff)
x86/platform/iosf_mbi: Remove duplicate definitions
The read and write opcodes are global for all units on SoC and even across Intel SoCs. Remove duplication of corresponding constants. At the same time convert all current users. No functional change. Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Boon Leong Ong <boon.leong.ong@intel.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/powercap/intel_rapl.c')
-rw-r--r--drivers/powercap/intel_rapl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index cc97f0869791..fa07809eef45 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -988,16 +988,16 @@ static void set_floor_freq_atom(struct rapl_domain *rd, bool enable)
988 } 988 }
989 989
990 if (!power_ctrl_orig_val) 990 if (!power_ctrl_orig_val)
991 iosf_mbi_read(BT_MBI_UNIT_PMC, BT_MBI_PMC_READ, 991 iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_CR_READ,
992 rapl_defaults->floor_freq_reg_addr, 992 rapl_defaults->floor_freq_reg_addr,
993 &power_ctrl_orig_val); 993 &power_ctrl_orig_val);
994 mdata = power_ctrl_orig_val; 994 mdata = power_ctrl_orig_val;
995 if (enable) { 995 if (enable) {
996 mdata &= ~(0x7f << 8); 996 mdata &= ~(0x7f << 8);
997 mdata |= 1 << 8; 997 mdata |= 1 << 8;
998 } 998 }
999 iosf_mbi_write(BT_MBI_UNIT_PMC, BT_MBI_PMC_WRITE, 999 iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_CR_WRITE,
1000 rapl_defaults->floor_freq_reg_addr, mdata); 1000 rapl_defaults->floor_freq_reg_addr, mdata);
1001} 1001}
1002 1002
1003static u64 rapl_compute_time_window_core(struct rapl_package *rp, u64 value, 1003static u64 rapl_compute_time_window_core(struct rapl_package *rp, u64 value,