]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86 driver: fix typo in TDP override enabling
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 22 Jul 2011 16:21:36 +0000 (09:21 -0700)
committerMatthew Garrett <mjg@redhat.com>
Fri, 5 Aug 2011 19:21:49 +0000 (15:21 -0400)
When enabling turbo, we need to set both the TDC and TDP bits.  IIRC
only the TDC one actually matters, but fix it up anyway since the
current code is confusing.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/intel_ips.c

index 5ffe7c3981482f7076ea95172cd0e960a04e465f..809a3ae943c6997f65a20328f8fe2fb02690cd6c 100644 (file)
@@ -403,7 +403,7 @@ static void ips_cpu_raise(struct ips_driver *ips)
 
        thm_writew(THM_MPCPC, (new_tdp_limit * 10) / 8);
 
-       turbo_override |= TURBO_TDC_OVR_EN | TURBO_TDC_OVR_EN;
+       turbo_override |= TURBO_TDC_OVR_EN | TURBO_TDP_OVR_EN;
        wrmsrl(TURBO_POWER_CURRENT_LIMIT, turbo_override);
 
        turbo_override &= ~TURBO_TDP_MASK;
@@ -438,7 +438,7 @@ static void ips_cpu_lower(struct ips_driver *ips)
 
        thm_writew(THM_MPCPC, (new_limit * 10) / 8);
 
-       turbo_override |= TURBO_TDC_OVR_EN | TURBO_TDC_OVR_EN;
+       turbo_override |= TURBO_TDC_OVR_EN | TURBO_TDP_OVR_EN;
        wrmsrl(TURBO_POWER_CURRENT_LIMIT, turbo_override);
 
        turbo_override &= ~TURBO_TDP_MASK;