Index: firmware/target/arm/system-target.h =================================================================== --- firmware/target/arm/system-target.h (revision 17472) +++ 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/ipod/button-target.h =================================================================== --- firmware/target/arm/ipod/button-target.h (revision 17472) +++ firmware/target/arm/ipod/button-target.h (working copy) @@ -40,12 +40,13 @@ #define BUTTON_RIGHT 0x00000008 #define BUTTON_SCROLL_FWD 0x00000010 #define BUTTON_SCROLL_BACK 0x00000020 +#define BUTTON_SCROLL 0x00000040 -#define BUTTON_PLAY 0x00000040 +#define BUTTON_PLAY 0x00000080 #define BUTTON_MAIN (BUTTON_SELECT|BUTTON_MENU\ |BUTTON_LEFT|BUTTON_RIGHT|BUTTON_SCROLL_FWD\ - |BUTTON_SCROLL_BACK|BUTTON_PLAY) + |BUTTON_SCROLL_BACK|BUTTON_SCROLL|BUTTON_PLAY) #define BUTTON_REMOTE 0 Index: firmware/target/arm/ipod/button-clickwheel.c =================================================================== --- firmware/target/arm/ipod/button-clickwheel.c (revision 17472) +++ firmware/target/arm/ipod/button-clickwheel.c (working copy) @@ -223,6 +223,9 @@ } last_wheel_usec = usec; old_wheel_value = new_wheel_value; + + /* be able to read wheel action via button_read_device() */ + btn |= BUTTON_SCROLL; } } else Index: firmware/target/arm/sandisk/sansa-e200/button-e200.c =================================================================== --- firmware/target/arm/sandisk/sansa-e200/button-e200.c (revision 17472) +++ firmware/target/arm/sandisk/sansa-e200/button-e200.c (working copy) @@ -226,6 +226,9 @@ } last_wheel_usec = usec; + + /* be able to read wheel action via button_read_device() */ + int_btn |= BUTTON_SCROLL; } } Index: firmware/target/arm/sandisk/sansa-e200/button-target.h =================================================================== --- firmware/target/arm/sandisk/sansa-e200/button-target.h (revision 17472) +++ firmware/target/arm/sandisk/sansa-e200/button-target.h (working copy) @@ -42,6 +42,7 @@ #define BUTTON_SCROLL_BACK 0x00000080 #define BUTTON_SCROLL_FWD 0x00000100 +#define BUTTON_SCROLL 0x00000200 #define BUTTON_MAIN 0x00000fff Index: firmware/target/arm/system-pp502x.c =================================================================== --- firmware/target/arm/system-pp502x.c (revision 17472) +++ firmware/target/arm/system-pp502x.c (working copy) @@ -214,14 +214,18 @@ 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 */ + //PLL_CONTROL = 0x8a021906; /* 100 MHz = (25/6 * 24MHz) / 1 */ while (!(PLL_STATUS & 0x80000000)); /* wait for relock */ #endif scale_suspend_core(true); DEV_TIMING1 = 0x00000808; + //DEV_TIMING1 = 0x00000909; + //DEV_TIMING1 = 0x00000a0a; 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 17472) +++ 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)