diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config/fiiom3k.h | 9 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_x1000/kernel-x1000.c | 20 |
2 files changed, 1 insertions, 28 deletions
diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h index 99285728a2..115532dc39 100644 --- a/firmware/export/config/fiiom3k.h +++ b/firmware/export/config/fiiom3k.h | |||
@@ -10,19 +10,12 @@ | |||
10 | /* CPU defines */ | 10 | /* CPU defines */ |
11 | #define CONFIG_CPU X1000 | 11 | #define CONFIG_CPU X1000 |
12 | #define X1000_EXCLK_FREQ 24000000 | 12 | #define X1000_EXCLK_FREQ 24000000 |
13 | #define CPU_FREQ 1008000000 | ||
13 | 14 | ||
14 | #ifndef SIMULATOR | 15 | #ifndef SIMULATOR |
15 | #define TIMER_FREQ X1000_EXCLK_FREQ | 16 | #define TIMER_FREQ X1000_EXCLK_FREQ |
16 | #endif | 17 | #endif |
17 | 18 | ||
18 | #define CPU_FREQ 1008000000 | ||
19 | #define CPUFREQ_MAX CPU_FREQ | ||
20 | /* TODO: figure out if this does in fact affect power consumption. */ | ||
21 | #define CPUFREQ_DEFAULT (CPUFREQ_MAX/4) | ||
22 | #define CPUFREQ_NORMAL (CPUFREQ_MAX/4) | ||
23 | #define HAVE_ADJUSTABLE_CPU_FREQ | ||
24 | #define HAVE_GUI_BOOST | ||
25 | |||
26 | /* Kernel defines */ | 19 | /* Kernel defines */ |
27 | #define INCLUDE_TIMEOUT_API | 20 | #define INCLUDE_TIMEOUT_API |
28 | #define HAVE_SEMAPHORE_OBJECTS | 21 | #define HAVE_SEMAPHORE_OBJECTS |
diff --git a/firmware/target/mips/ingenic_x1000/kernel-x1000.c b/firmware/target/mips/ingenic_x1000/kernel-x1000.c index eb7c3d6124..8d272bdaa9 100644 --- a/firmware/target/mips/ingenic_x1000/kernel-x1000.c +++ b/firmware/target/mips/ingenic_x1000/kernel-x1000.c | |||
@@ -23,26 +23,6 @@ | |||
23 | #include "system.h" | 23 | #include "system.h" |
24 | #include "x1000/ost.h" | 24 | #include "x1000/ost.h" |
25 | 25 | ||
26 | /* TODO: implement a CPU frequency switching policy based on CPU utilization | ||
27 | * | ||
28 | * The basic assumption is that the workload consumes a fixed number of CPU | ||
29 | * cycles per second on average (= utilization), so we can set the frequency | ||
30 | * based on that value. Audio playback should fit this usage pattern well, so | ||
31 | * it's a good fit for Rockbox. | ||
32 | * | ||
33 | * It's easier to understand in terms of fluid flow -- we need to keep | ||
34 | * a reservoir of water topped up, CPU frequency is the inflow rate, and | ||
35 | * CPU utilization is the outflow rate. The goal is to avoid running dry | ||
36 | * and minimize the inflow rate. | ||
37 | * | ||
38 | * The only tricky part here is handing usage spikes -- CPU frequency has to | ||
39 | * increase faster than utilization or there's a risk of audio dropouts. | ||
40 | * | ||
41 | * Rockbox CPU boost could be used as a hint to scale up frequency faster. | ||
42 | * If that's not necessary to get good results, HAVE_ADJUSTABLE_CPU_FREQ can | ||
43 | * be disabled entirely. | ||
44 | */ | ||
45 | |||
46 | #define CPU_IDLE_SAMPLES 100 | 26 | #define CPU_IDLE_SAMPLES 100 |
47 | 27 | ||
48 | void tick_start(unsigned interval_in_ms) | 28 | void tick_start(unsigned interval_in_ms) |