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
Kirill Smelkov
linux
Commits
0235c1be
Commit
0235c1be
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] make powernow-k8 use batps from powernow data struct instead of static struct.
parent
7c3a930b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
29 deletions
+6
-29
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+6
-29
No files found.
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
View file @
0235c1be
...
@@ -39,29 +39,6 @@
...
@@ -39,29 +39,6 @@
static
struct
powernow_k8_data
*
powernow_data
[
NR_CPUS
];
static
struct
powernow_k8_data
*
powernow_data
[
NR_CPUS
];
/*
The PSB table supplied by BIOS allows for the definition of the number of
p-states that can be used when running on a/c, and the number of p-states
that can be used when running on battery. This allows laptop manufacturers
to force the system to save power when running from battery. The relationship
is :
1 <= number_of_battery_p_states <= maximum_number_of_p_states
This driver does NOT have the support in it to detect transitions from
a/c power to battery power, and thus trigger the transition to a lower
p-state if required. This is because I need ACPI and the 2.6 kernel to do
this, and this is a 2.4 kernel driver. Check back for a new improved driver
for the 2.6 kernel soon.
This code therefore assumes it is on battery at all times, and thus
restricts performance to number_of_battery_p_states. For desktops,
number_of_battery_p_states == maximum_number_of_pstates,
so this is not actually a restriction.
*/
static
u32
batps
;
/* limit on the number of p states when on battery */
/* - set by BIOS in the PSB/PST */
/* Return a frequency in MHz, given an input fid */
/* Return a frequency in MHz, given an input fid */
static
u32
find_freq_from_fid
(
u32
fid
)
static
u32
find_freq_from_fid
(
u32
fid
)
{
{
...
@@ -556,7 +533,7 @@ static int find_psb_table(struct powernow_k8_data *data)
...
@@ -556,7 +533,7 @@ static int find_psb_table(struct powernow_k8_data *data)
printk
(
KERN_INFO
PFX
"voltage stable in %d usec"
,
data
->
vstable
*
20
);
printk
(
KERN_INFO
PFX
"voltage stable in %d usec"
,
data
->
vstable
*
20
);
if
(
data
->
batps
)
if
(
data
->
batps
)
printk
(
", only %d lowest states on battery"
,
batps
);
printk
(
", only %d lowest states on battery"
,
data
->
batps
);
printk
(
", ramp voltage offset: %d"
,
data
->
rvo
);
printk
(
", ramp voltage offset: %d"
,
data
->
rvo
);
printk
(
", isochronous relief time: %d"
,
data
->
irt
);
printk
(
", isochronous relief time: %d"
,
data
->
irt
);
printk
(
", maximum voltage step: %d
\n
"
,
mvs
);
printk
(
", maximum voltage step: %d
\n
"
,
mvs
);
...
@@ -582,14 +559,14 @@ static int find_psb_table(struct powernow_k8_data *data)
...
@@ -582,14 +559,14 @@ static int find_psb_table(struct powernow_k8_data *data)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
batps
==
0
)
{
if
(
data
->
batps
==
0
)
{
batps
=
data
->
numps
;
data
->
batps
=
data
->
numps
;
}
else
if
(
batps
>
data
->
numps
)
{
}
else
if
(
data
->
batps
>
data
->
numps
)
{
printk
(
KERN_ERR
BFX
"batterypstates > numpstates
\n
"
);
printk
(
KERN_ERR
BFX
"batterypstates > numpstates
\n
"
);
batps
=
data
->
numps
;
data
->
batps
=
data
->
numps
;
}
else
{
}
else
{
printk
(
KERN_ERR
PFX
printk
(
KERN_ERR
PFX
"Restricting operation to %d p-states
\n
"
,
batps
);
"Restricting operation to %d p-states
\n
"
,
data
->
batps
);
printk
(
KERN_ERR
PFX
printk
(
KERN_ERR
PFX
"Check for an updated driver to access all "
"Check for an updated driver to access all "
"%d p-states
\n
"
,
data
->
numps
);
"%d p-states
\n
"
,
data
->
numps
);
...
...
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