diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-10-03 09:24:36 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-10-03 09:24:36 +0000 |
commit | cfb073c452c0218a82e23fb5f5f89043719f2c07 (patch) | |
tree | 5aff8555b218e10037c086aaad3aaec1b4d677c8 /firmware/export/system.h | |
parent | 7190cf2ed9cfa854d81e7bf9c0e8a1ef71935c1f (diff) | |
download | rockbox-cfb073c452c0218a82e23fb5f5f89043719f2c07.tar.gz rockbox-cfb073c452c0218a82e23fb5f5f89043719f2c07.zip |
Coldfire: New timer handling on CPU frequency change, adjusting the prescaler on the fly, for both tick and user timer. Precondition is that the higher frequencies are integer multiples of the base: now NORMAL is 45 MHz and MAX is 124 MHz. Removes the need for applications with longer timer periods (>= 10 ms) to boost the CPU all the time, e.g. the grayscale lib. Timer counts are now always based on the base frequency (CPU_FREQ). * Adjusted the RAM refresh timers to the new frequencies (all frequencies for H100) * All: Fixed the tick timer count being off by one.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7576 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r-- | firmware/export/system.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index 58e6570d3a..c2246e1e70 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -257,14 +257,17 @@ static inline unsigned long SWAB32(unsigned long value) | |||
257 | static inline void invalidate_icache(void) | 257 | static inline void invalidate_icache(void) |
258 | { | 258 | { |
259 | asm volatile ("move.l #0x01000000,%d0\n" | 259 | asm volatile ("move.l #0x01000000,%d0\n" |
260 | "movec.l %d0,%cacr\n" | 260 | "movec.l %d0,%cacr\n" |
261 | "move.l #0x80000000,%d0\n" | 261 | "move.l #0x80000000,%d0\n" |
262 | "movec.l %d0,%cacr"); | 262 | "movec.l %d0,%cacr"); |
263 | } | 263 | } |
264 | 264 | ||
265 | #define CPUFREQ_DEFAULT CPU_FREQ | 265 | #define CPUFREQ_DEFAULT_MULT 1 |
266 | #define CPUFREQ_NORMAL 47980800 | 266 | #define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ) |
267 | #define CPUFREQ_MAX 119952000 | 267 | #define CPUFREQ_NORMAL_MULT 4 |
268 | #define CPUFREQ_NORMAL (CPUFREQ_NORMAL_MULT * CPU_FREQ) | ||
269 | #define CPUFREQ_MAX_MULT 11 | ||
270 | #define CPUFREQ_MAX (CPUFREQ_MAX_MULT * CPU_FREQ) | ||
268 | 271 | ||
269 | #elif CONFIG_CPU == TCC730 | 272 | #elif CONFIG_CPU == TCC730 |
270 | 273 | ||