Index: firmware/target/arm/system-target.h =================================================================== --- firmware/target/arm/system-target.h (revision 17347) +++ firmware/target/arm/system-target.h (working copy) @@ -29,13 +29,13 @@ #if CONFIG_CPU == PP5002 #define CPUFREQ_SLEEP 32768 #define CPUFREQ_DEFAULT 24000000 -#define CPUFREQ_NORMAL 30000000 +#define CPUFREQ_NORMAL 24000000 #define CPUFREQ_MAX 80000000 #else /* PP5022, PP5024 */ #define CPUFREQ_SLEEP 32768 #define CPUFREQ_DEFAULT 24000000 -#define CPUFREQ_NORMAL 30000000 +#define CPUFREQ_NORMAL 24000000 #define CPUFREQ_MAX 80000000 #endif Index: firmware/target/arm/system-pp502x.c =================================================================== --- firmware/target/arm/system-pp502x.c (revision 17347) +++ firmware/target/arm/system-pp502x.c (working copy) @@ -214,14 +214,16 @@ udelay(500); /* wait for relock */ #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) PLL_CONTROL = 0x8a121403; /* 80 MHz = (20/3 * 24MHz) / 2 */ + //PLL_CONTROL = 0x8a121e04; /* 90 MHz = (30/4 * 24MHz) / 2 */ while (!(PLL_STATUS & 0x80000000)); /* wait for relock */ #endif scale_suspend_core(true); DEV_TIMING1 = 0x00000808; + //DEV_TIMING1 = 0x00000909; CLOCK_SOURCE = 0x20007777; /* source #1, #2, #3, #4: PLL (#2 active) */ scale_suspend_core(false); break; -#if 0 /******** CPUFREQ_NORMAL = 24MHz without PLL ********/ +#if 1 /******** CPUFREQ_NORMAL = 24MHz without PLL ********/ case CPUFREQ_NORMAL: cpu_frequency = CPUFREQ_NORMAL; PLL_CONTROL |= 0x08000000; Index: firmware/drivers/button.c =================================================================== --- firmware/drivers/button.c (revision 17347) +++ firmware/drivers/button.c (working copy) @@ -93,6 +93,24 @@ } #endif +#ifdef HAVE_ADJUSTABLE_CPU_FREQ +static void gui_boost(bool state) +{ + static bool boosted = false; + + if (state && !boosted) + { + cpu_boost(true); + boosted = true; + } + else if (!state && boosted) + { + cpu_boost(false); + boosted = false; + } +} +#endif /* HAVE_ADJUSTABLE_CPU_FREQ */ + static void button_tick(void) { static int count = 0; @@ -106,6 +124,10 @@ static bool skip_remote_release = false; #endif #endif +#ifdef HAVE_ADJUSTABLE_CPU_FREQ + static unsigned long last_button_usec; + unsigned long usec = USEC_TIMER; +#endif int diff; int btn; #ifdef HAVE_BUTTON_DATA @@ -139,6 +161,19 @@ } #endif +#ifdef HAVE_ADJUSTABLE_CPU_FREQ + /* Boost gui on button activity, unboost gui after timeout. */ + if (BUTTON_NONE != btn) + { + last_button_usec = usec; + gui_boost(true); + } + else if (TIME_AFTER(usec, last_button_usec + 1000000)) + { + gui_boost(false); + } +#endif + /* Find out if a key has been released */ diff = btn ^ lastbtn; if(diff && (btn & diff) == 0)