From c5d57f0aaec039de4a72a94d103ace64c0553b3d Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Tue, 5 Dec 2006 20:01:48 +0000 Subject: 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 --- firmware/system.c | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'firmware/system.c') 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) { -- cgit v1.1