diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-07 10:51:43 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-07 10:51:43 +0000 |
commit | 213d34ed1d23dbc69570863f1587b96bc346a9f1 (patch) | |
tree | 9c6a5c04947903c3b418105351fc5d2a206b5784 /firmware | |
parent | 5152eca7d40a1dae57c51f4dfe635c683291ad34 (diff) | |
download | rockbox-213d34ed1d23dbc69570863f1587b96bc346a9f1.tar.gz rockbox-213d34ed1d23dbc69570863f1587b96bc346a9f1.zip |
Dedicated CPU frequency debug screen for CPU's with PLL
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6161 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/system.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/system.c b/firmware/system.c index 1cafc8f096..03414924ca 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -29,13 +29,13 @@ long cpu_frequency = CPU_FREQ; | |||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 31 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
32 | int boost_counter = 0; | ||
32 | void cpu_boost(bool on_off) | 33 | void cpu_boost(bool on_off) |
33 | { | 34 | { |
34 | static int counter = 0; | ||
35 | if(on_off) | 35 | if(on_off) |
36 | { | 36 | { |
37 | /* Boost the frequency if not already boosted */ | 37 | /* Boost the frequency if not already boosted */ |
38 | if(counter++ == 0) | 38 | if(boost_counter++ == 0) |
39 | { | 39 | { |
40 | set_cpu_frequency(CPUFREQ_MAX); | 40 | set_cpu_frequency(CPUFREQ_MAX); |
41 | } | 41 | } |
@@ -43,14 +43,14 @@ void cpu_boost(bool on_off) | |||
43 | else | 43 | else |
44 | { | 44 | { |
45 | /* Lower the frequency if the counter reaches 0 */ | 45 | /* Lower the frequency if the counter reaches 0 */ |
46 | if(--counter == 0) | 46 | if(--boost_counter == 0) |
47 | { | 47 | { |
48 | set_cpu_frequency(CPUFREQ_NORMAL); | 48 | set_cpu_frequency(CPUFREQ_NORMAL); |
49 | } | 49 | } |
50 | 50 | ||
51 | /* Safety measure */ | 51 | /* Safety measure */ |
52 | if(counter < 0) | 52 | if(boost_counter < 0) |
53 | counter = 0; | 53 | boost_counter = 0; |
54 | } | 54 | } |
55 | } | 55 | } |
56 | #endif | 56 | #endif |