From: dirk.brandewie@gmail.com
To: linux-pm@vger.kernel.org, rjw@rjwysocki.net
Cc: linux-kernel@vger.kernel.org,
Dirk Brandewie <dirk.j.brandewie@intel.com>
Subject: [PATCH 5/5] intel_pstate: Add support for Baytrail turbo P states
Date: Wed, 12 Feb 2014 10:01:07 -0800 [thread overview]
Message-ID: <1392228067-14817-6-git-send-email-dirk.j.brandewie@intel.com> (raw)
In-Reply-To: <1392228067-14817-1-git-send-email-dirk.j.brandewie@intel.com>
From: Dirk Brandewie <dirk.j.brandewie@intel.com>
A documentation update exposed the existance of the turbo ratio
register. Update baytrail support to use the turbo range.
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
---
drivers/cpufreq/intel_pstate.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index ff45ce1..ea58eb6 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -34,8 +34,10 @@
#define SAMPLE_COUNT 3
-#define BYT_RATIOS 0x66a
-#define BYT_VIDS 0x66b
+#define BYT_RATIOS 0x66a
+#define BYT_VIDS 0x66b
+#define BYT_TURBO_RATIOS 0x66c
+
#define FRAC_BITS 8
#define int_tofp(X) ((int64_t)(X) << FRAC_BITS)
@@ -366,6 +368,13 @@ static int byt_get_max_pstate(void)
return (value >> 16) & 0xFF;
}
+static int byt_get_turbo_pstate(void)
+{
+ u64 value;
+ rdmsrl(BYT_TURBO_RATIOS, value);
+ return value & 0x3F;
+}
+
static void byt_set_pstate(struct cpudata *cpudata, int pstate)
{
u64 val;
@@ -468,7 +477,7 @@ static struct cpu_defaults byt_params = {
.funcs = {
.get_max = byt_get_max_pstate,
.get_min = byt_get_min_pstate,
- .get_turbo = byt_get_max_pstate,
+ .get_turbo = byt_get_turbo_pstate,
.set = byt_set_pstate,
.get_vid = byt_get_vid,
},
--
1.8.3.1
next prev parent reply other threads:[~2014-02-12 18:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 18:01 [PATCH 0/5] intel_pstate updates for v3.14-rcX dirk.brandewie
2014-02-12 18:01 ` [PATCH 1/5] intel_pstate: Remove energy reporting from pstate_sample tracepoint dirk.brandewie
2014-02-12 18:01 ` [PATCH 2/5] intel_pstate: remove unneeded sample buffers dirk.brandewie
2014-02-13 0:42 ` Li, Aubrey
2014-02-12 18:01 ` [PATCH 3/5] intel_pstate: fix pid_reset to use fixed point values dirk.brandewie
2014-02-12 18:01 ` [PATCH 4/5] intel_pstate: Use LFM bus ratio as min ratio/P state dirk.brandewie
2014-02-19 0:58 ` Rafael J. Wysocki
2014-02-19 18:35 ` [PATCH v2] " dirk.brandewie
2014-02-20 0:44 ` Rafael J. Wysocki
2014-02-12 18:01 ` dirk.brandewie [this message]
2014-02-13 0:47 ` [PATCH 0/5] intel_pstate updates for v3.14-rcX Rafael J. Wysocki
2014-02-13 1:00 ` Rafael J. Wysocki
2014-02-13 1:23 ` Rafael J. Wysocki
2014-02-18 20:29 ` Dirk Brandewie
2014-02-18 22:27 ` Rafael J. Wysocki
2014-02-18 23:53 ` Dirk Brandewie
2014-02-19 0:34 ` Rafael J. Wysocki
[not found] ` <CANOOhLToR8ajjiM1x7m_4Pbak3sUkjfq0h4EX6dz1U23D3X3EA@mail.gmail.com>
2014-02-19 0:43 ` Rafael J. Wysocki
2014-02-19 0:35 ` Dirk Brandewie
2014-02-19 0:53 ` Rafael J. Wysocki
2014-02-19 18:26 ` Dirk Brandewie
2014-02-20 0:43 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392228067-14817-6-git-send-email-dirk.j.brandewie@intel.com \
--to=dirk.brandewie@gmail.com \
--cc=dirk.j.brandewie@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).