diff options
-rw-r--r-- | firmware/target/coldfire/iaudio/system-iaudio.c | 9 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/system-iriver.c | 9 | ||||
-rw-r--r-- | firmware/target/coldfire/system-coldfire.c | 4 | ||||
-rw-r--r-- | firmware/target/coldfire/system-target.h | 4 |
4 files changed, 18 insertions, 8 deletions
diff --git a/firmware/target/coldfire/iaudio/system-iaudio.c b/firmware/target/coldfire/iaudio/system-iaudio.c index d934577911..4e32d360fa 100644 --- a/firmware/target/coldfire/iaudio/system-iaudio.c +++ b/firmware/target/coldfire/iaudio/system-iaudio.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include "timer.h" | 24 | #include "timer.h" |
25 | #include "pcf50606.h" | 25 | #include "pcf50606.h" |
26 | 26 | ||
27 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
28 | |||
29 | /* Settings for all possible clock frequencies (with properly working timers) | 27 | /* Settings for all possible clock frequencies (with properly working timers) |
30 | * | 28 | * |
31 | * xxx_REFRESH_TIMER below | 29 | * xxx_REFRESH_TIMER below |
@@ -55,8 +53,13 @@ | |||
55 | #define RECALC_DELAYS(f) \ | 53 | #define RECALC_DELAYS(f) \ |
56 | pcf50606_i2c_recalc_delay(f) | 54 | pcf50606_i2c_recalc_delay(f) |
57 | 55 | ||
56 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
58 | void set_cpu_frequency (long) __attribute__ ((section (".icode"))); | 57 | void set_cpu_frequency (long) __attribute__ ((section (".icode"))); |
59 | void set_cpu_frequency(long frequency) | 58 | void set_cpu_frequency(long frequency) |
59 | #else | ||
60 | void cf_set_cpu_frequency (long) __attribute__ ((section (".icode"))); | ||
61 | void cf_set_cpu_frequency(long frequency) | ||
62 | #endif | ||
60 | { | 63 | { |
61 | switch(frequency) | 64 | switch(frequency) |
62 | { | 65 | { |
@@ -115,5 +118,3 @@ void set_cpu_frequency(long frequency) | |||
115 | break; | 118 | break; |
116 | } | 119 | } |
117 | } | 120 | } |
118 | |||
119 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ | ||
diff --git a/firmware/target/coldfire/iriver/system-iriver.c b/firmware/target/coldfire/iriver/system-iriver.c index 184f76cdad..e5abe27bc0 100644 --- a/firmware/target/coldfire/iriver/system-iriver.c +++ b/firmware/target/coldfire/iriver/system-iriver.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include "timer.h" | 24 | #include "timer.h" |
25 | #include "pcf50606.h" | 25 | #include "pcf50606.h" |
26 | 26 | ||
27 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
28 | |||
29 | /* Settings for all possible clock frequencies (with properly working timers) | 27 | /* Settings for all possible clock frequencies (with properly working timers) |
30 | * NOTE: Some 5249 chips don't like having PLLDIV set to 0. We must avoid that! | 28 | * NOTE: Some 5249 chips don't like having PLLDIV set to 0. We must avoid that! |
31 | * | 29 | * |
@@ -73,8 +71,13 @@ | |||
73 | #define BAUDRATE_DIV_MAX (CPUFREQ_MAX/(BAUD_RATE*32*2)) | 71 | #define BAUDRATE_DIV_MAX (CPUFREQ_MAX/(BAUD_RATE*32*2)) |
74 | #endif | 72 | #endif |
75 | 73 | ||
74 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
76 | void set_cpu_frequency (long) __attribute__ ((section (".icode"))); | 75 | void set_cpu_frequency (long) __attribute__ ((section (".icode"))); |
77 | void set_cpu_frequency(long frequency) | 76 | void set_cpu_frequency(long frequency) |
77 | #else | ||
78 | void cf_set_cpu_frequency (long) __attribute__ ((section (".icode"))); | ||
79 | void cf_set_cpu_frequency(long frequency) | ||
80 | #endif | ||
78 | { | 81 | { |
79 | switch(frequency) | 82 | switch(frequency) |
80 | { | 83 | { |
@@ -157,5 +160,3 @@ void set_cpu_frequency(long frequency) | |||
157 | break; | 160 | break; |
158 | } | 161 | } |
159 | } | 162 | } |
160 | |||
161 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ | ||
diff --git a/firmware/target/coldfire/system-coldfire.c b/firmware/target/coldfire/system-coldfire.c index f33a44c3b4..8b20360b46 100644 --- a/firmware/target/coldfire/system-coldfire.c +++ b/firmware/target/coldfire/system-coldfire.c | |||
@@ -252,6 +252,10 @@ void system_init(void) | |||
252 | SPURVEC = 24; | 252 | SPURVEC = 24; |
253 | 253 | ||
254 | MPARK = 0x81; /* PARK[1,0]=10 + BCR24BIT */ | 254 | MPARK = 0x81; /* PARK[1,0]=10 + BCR24BIT */ |
255 | |||
256 | #ifndef HAVE_ADJUSTABLE_CPU_FREQ | ||
257 | cf_set_cpu_frequency(CPUFREQ_DEFAULT); | ||
258 | #endif | ||
255 | } | 259 | } |
256 | 260 | ||
257 | void system_reboot (void) | 261 | void system_reboot (void) |
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h index 6f1b2eb4ae..8e3a2a3d5a 100644 --- a/firmware/target/coldfire/system-target.h +++ b/firmware/target/coldfire/system-target.h | |||
@@ -165,6 +165,10 @@ void coldfire_set_pllcr_audio_bits(long bits); | |||
165 | /* Set DATAINCONTROL without disturbing FIFO reset state */ | 165 | /* Set DATAINCONTROL without disturbing FIFO reset state */ |
166 | void coldfire_set_dataincontrol(unsigned long value); | 166 | void coldfire_set_dataincontrol(unsigned long value); |
167 | 167 | ||
168 | #ifndef HAVE_ADJUSTABLE_CPU_FREQ | ||
169 | extern void cf_set_cpu_frequency(long frequency); | ||
170 | #endif | ||
171 | |||
168 | /* 11.2896 MHz */ | 172 | /* 11.2896 MHz */ |
169 | #define CPUFREQ_DEFAULT_MULT 1 | 173 | #define CPUFREQ_DEFAULT_MULT 1 |
170 | #define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ) | 174 | #define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ) |