diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-12-05 20:01:48 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-12-05 20:01:48 +0000 |
| commit | c5d57f0aaec039de4a72a94d103ace64c0553b3d (patch) | |
| tree | ae2f61a6deb7d65d174d175eef02b5be5c8c0cb6 /firmware/system.c | |
| parent | 5f15f8f021abc08db88e95371ceda194f5717893 (diff) | |
| download | rockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.zip rockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.tar.gz rockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.tar.bz2 rockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.tar.xz | |
Removed the cpu boost tracking debug feature for now because of
different kind of problems. Better implementation can be done later.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11665 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/system.c')
| -rw-r--r-- | firmware/system.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/firmware/system.c b/firmware/system.c index a5fae26..2ec9ff7 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -34,37 +34,19 @@ long cpu_frequency = CPU_FREQ; #ifdef HAVE_ADJUSTABLE_CPU_FREQ static int boost_counter = 0; static bool cpu_idle = false; -#ifdef CPU_BOOST_TRACKING -#define CPU_BOOST_TRACKER_MAX 15 -static char cpu_boost_tracker[CPU_BOOST_TRACKER_MAX+1] = ""; -#endif int get_cpu_boost_counter(void) { return boost_counter; } -#ifdef CPU_BOOST_TRACKING -const char *get_cpu_boost_tracker() -{ - return cpu_boost_tracker; -} - -void cpu_boost_id(bool on_off, char id) +void cpu_boost(bool on_off) { if(on_off) { /* Boost the frequency if not already boosted */ if(boost_counter++ == 0) set_cpu_frequency(CPUFREQ_MAX); - - /* Add to the boost tracker for debugging */ - int l = strlen(cpu_boost_tracker); - if (l < CPU_BOOST_TRACKER_MAX) - { - cpu_boost_tracker[l] = id; - cpu_boost_tracker[l+1] = '\0'; - } } else { @@ -80,26 +62,8 @@ void cpu_boost_id(bool on_off, char id) /* Safety measure */ if(boost_counter < 0) boost_counter = 0; - - /* Remove an entry from the boost tracker */ - int l = strlen(cpu_boost_tracker); - while (l >= 0 && cpu_boost_tracker[l] != id) - l--; - if (cpu_boost_tracker[l] != id) /* No match found? */ - l = strlen(cpu_boost_tracker)-1; /* Just remove last one */ - while (l < CPU_BOOST_TRACKER_MAX) - { - cpu_boost_tracker[l] = cpu_boost_tracker[l+1]; - l++; - } } } -#endif - -void cpu_boost(bool on_off) -{ - cpu_boost_id(on_off, '?'); -} void cpu_idle_mode(bool on_off) { @@ -115,8 +79,8 @@ void cpu_idle_mode(bool on_off) set_cpu_frequency(CPUFREQ_NORMAL); } } +#endif /* HAVE_ADJUSTABLE_CPU_FREQ */ -#endif #if CONFIG_CPU == S3C2440 void system_reboot(void) { |