Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
8f9e244f
Commit
8f9e244f
authored
Apr 06, 2004
by
Dave Jones
Committed by
Dave Jones
Apr 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] powernow-k8 header cleanups
remove unused defines, introduce some new ones, and generally cleanup.
parent
36c2ba6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
26 deletions
+36
-26
arch/i386/kernel/cpu/cpufreq/powernow-k8.h
arch/i386/kernel/cpu/cpufreq/powernow-k8.h
+36
-26
No files found.
arch/i386/kernel/cpu/cpufreq/powernow-k8.h
View file @
8f9e244f
/*
/*
*
(c) 2003
Advanced Micro Devices, Inc.
*
(c) 2003, 2004
Advanced Micro Devices, Inc.
* Your use of this code is subject to the terms and conditions of the
* Your use of this code is subject to the terms and conditions of the
* GNU general public license version 2. See "
../../../
COPYING" or
* GNU general public license version 2. See "COPYING" or
* http://www.gnu.org/licenses/gpl.html
* http://www.gnu.org/licenses/gpl.html
*/
*/
struct
powernow_k8_data
{
struct
powernow_k8_data
{
unsigned
int
cpu
;
unsigned
int
cpu
;
u32
numps
;
/* number of p-states */
u32
numps
;
/* number of p-states */
u32
batps
;
/* number of p-states supported on battery */
u32
batps
;
/* number of p-states supported on battery */
...
@@ -18,7 +18,7 @@ struct powernow_k8_data {
...
@@ -18,7 +18,7 @@ struct powernow_k8_data {
u32
irt
;
/* isochronous relief time */
u32
irt
;
/* isochronous relief time */
u32
vidmvs
;
/* usable value calculated from mvs */
u32
vidmvs
;
/* usable value calculated from mvs */
u32
vstable
;
/* voltage stabilization time, units 20 us */
u32
vstable
;
/* voltage stabilization time, units 20 us */
u32
plllock
;
/* pll lock time, units 1 us */
u32
plllock
;
/* pll lock time, units 1 us */
/* keep track of the current fid / vid */
/* keep track of the current fid / vid */
u32
currvid
;
u32
currvid
;
...
@@ -32,15 +32,10 @@ struct powernow_k8_data {
...
@@ -32,15 +32,10 @@ struct powernow_k8_data {
/* processor's cpuid instruction support */
/* processor's cpuid instruction support */
#define CPUID_PROCESSOR_SIGNATURE 1
/* function 1 */
#define CPUID_PROCESSOR_SIGNATURE 1
/* function 1 */
#define CPUID_F1_FAM 0x00000f00
/* family mask */
#define CPUID_XFAM_MOD 0x0ff00ff0
/* extended fam, fam + model */
#define CPUID_F1_XFAM 0x0ff00000
/* extended family mask */
#define ATHLON64_XFAM_MOD 0x00000f40
/* extended fam, fam + model */
#define CPUID_F1_MOD 0x000000f0
/* model mask */
#define OPTERON_XFAM_MOD 0x00000f50
/* extended fam, fam + model */
#define CPUID_F1_STEP 0x0000000f
/* stepping level mask */
#define CPUID_XFAM_MOD 0x0ff00ff0
/* xtended fam, fam + model */
#define ATHLON64_XFAM_MOD 0x00000f40
/* xtended fam, fam + model */
#define OPTERON_XFAM_MOD 0x00000f50
/* xtended fam, fam + model */
#define ATHLON64_REV_C0 8
#define CPUID_GET_MAX_CAPABILITIES 0x80000000
#define CPUID_GET_MAX_CAPABILITIES 0x80000000
#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
#define P_STATE_TRANSITION_CAPABLE 6
#define P_STATE_TRANSITION_CAPABLE 6
...
@@ -88,8 +83,8 @@ struct powernow_k8_data {
...
@@ -88,8 +83,8 @@ struct powernow_k8_data {
*/
*/
/* fids (frequency identifiers) are arranged in 2 tables - lo and hi */
/* fids (frequency identifiers) are arranged in 2 tables - lo and hi */
#define LO_FID_TABLE_TOP 6
#define LO_FID_TABLE_TOP 6
/* fid values marking the boundary */
#define HI_FID_TABLE_BOTTOM 8
#define HI_FID_TABLE_BOTTOM 8
/* between the low and high tables */
#define LO_VCOFREQ_TABLE_TOP 1400
/* corresponding vco frequency values */
#define LO_VCOFREQ_TABLE_TOP 1400
/* corresponding vco frequency values */
#define HI_VCOFREQ_TABLE_BOTTOM 1600
#define HI_VCOFREQ_TABLE_BOTTOM 1600
...
@@ -97,14 +92,12 @@ struct powernow_k8_data {
...
@@ -97,14 +92,12 @@ struct powernow_k8_data {
#define MIN_FREQ_RESOLUTION 200
/* fids jump by 2 matching freq jumps by 200 */
#define MIN_FREQ_RESOLUTION 200
/* fids jump by 2 matching freq jumps by 200 */
#define MAX_FID 0x2a
/* Spec only gives FID values as far as 5 GHz */
#define MAX_FID 0x2a
/* Spec only gives FID values as far as 5 GHz */
#define LEAST_VID 0x1e
/* Lowest (numerically highest) useful vid value */
#define LEAST_VID 0x1e
/* Lowest (numerically highest) useful vid value */
#define MIN_FREQ 800
/* Min and max freqs, per spec */
#define MIN_FREQ 800
/* Min and max freqs, per spec */
#define MAX_FREQ 5000
#define MAX_FREQ 5000
#define INVALID_FID_MASK 0xffffffc1
/* not a valid fid if these bits are set */
#define INVALID_FID_MASK 0xffffffc1
/* not a valid fid if these bits are set */
#define INVALID_VID_MASK 0xffffffe0
/* not a valid vid if these bits are set */
#define INVALID_VID_MASK 0xffffffe0
/* not a valid vid if these bits are set */
#define STOP_GRANT_5NS 1
/* min poss memory access latency for voltage change */
#define STOP_GRANT_5NS 1
/* min poss memory access latency for voltage change */
...
@@ -112,18 +105,35 @@ struct powernow_k8_data {
...
@@ -112,18 +105,35 @@ struct powernow_k8_data {
#define PLL_LOCK_CONVERSION (1000/5)
/* ms to ns, then divide by clock period */
#define PLL_LOCK_CONVERSION (1000/5)
/* ms to ns, then divide by clock period */
#define MAXIMUM_VID_STEPS 1
/* Current cpus only allow a single step of 25mV */
#define MAXIMUM_VID_STEPS 1
/* Current cpus only allow a single step of 25mV */
#define VST_UNITS_20US 20
/* Voltage Stabalization Time is in units of 20us */
#define VST_UNITS_20US 20
/* Voltage Stabalization Time is in units of 20us */
/*
/*
Version 1.4 of the PSB table. This table is constructed by BIOS and is
* Most values of interest are enocoded in a single field of the _PSS
to tell the OS's power management driver which VIDs and FIDs are
* entries: the "control" value.
supported by this particular processor. This information is obtained from
*/
the data sheets for each processor model by the system vendor and
incorporated into the BIOS.
#define IRT_SHIFT 30
If the data in the PSB / PST is wrong, then this driver will program the
#define RVO_SHIFT 28
wrong values into hardware, which is very likely to lead to a crash.
#define PLL_L_SHIFT 20
*/
#define MVS_SHIFT 18
#define VST_SHIFT 11
#define VID_SHIFT 6
#define IRT_MASK 3
#define RVO_MASK 3
#define PLL_L_MASK 0x7f
#define MVS_MASK 3
#define VST_MASK 0x7f
#define VID_MASK 0x1f
#define FID_MASK 0x3f
/*
* Version 1.4 of the PSB table. This table is constructed by BIOS and is
* to tell the OS's power management driver which VIDs and FIDs are
* supported by this particular processor.
* If the data in the PSB / PST is wrong, then this driver will program the
* wrong values into hardware, which is very likely to lead to a crash.
*/
#define PSB_ID_STRING "AMDK7PNOW!"
#define PSB_ID_STRING "AMDK7PNOW!"
#define PSB_ID_STRING_LEN 10
#define PSB_ID_STRING_LEN 10
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment