diff options
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 3b24ac2f39..60be7ddac0 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -329,13 +329,14 @@ void set_cpu_frequency(long frequency) | |||
329 | { | 329 | { |
330 | if(frequency == CPUFREQ_MAX) | 330 | if(frequency == CPUFREQ_MAX) |
331 | { | 331 | { |
332 | #ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE | ||
332 | /* Increasing frequency so boost voltage before change */ | 333 | /* Increasing frequency so boost voltage before change */ |
333 | ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_20)); | 334 | ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_20)); |
334 | 335 | ||
335 | /* Wait for voltage to be at least 1.20v before making fclk > 200 MHz */ | 336 | /* Wait for voltage to be at least 1.20v before making fclk > 200 MHz */ |
336 | while(adc_read(ADC_CVDD) < 480) /* 480 * .0025 = 1.20V */ | 337 | while(adc_read(ADC_CVDD) < 480) /* 480 * .0025 = 1.20V */ |
337 | ; | 338 | ; |
338 | 339 | #endif | |
339 | asm volatile( | 340 | asm volatile( |
340 | "mrc p15, 0, r0, c1, c0 \n" | 341 | "mrc p15, 0, r0, c1, c0 \n" |
341 | 342 | ||
@@ -358,10 +359,10 @@ void set_cpu_frequency(long frequency) | |||
358 | "bic r0, r0, #3<<30 \n" /* fastbus clocking */ | 359 | "bic r0, r0, #3<<30 \n" /* fastbus clocking */ |
359 | "mcr p15, 0, r0, c1, c0 \n" | 360 | "mcr p15, 0, r0, c1, c0 \n" |
360 | : : : "r0" ); | 361 | : : : "r0" ); |
361 | 362 | #ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE | |
362 | /* Decreasing frequency so reduce voltage after change */ | 363 | /* Decreasing frequency so reduce voltage after change */ |
363 | ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_10)); | 364 | ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_10)); |
364 | 365 | #endif | |
365 | cpu_frequency = CPUFREQ_NORMAL; | 366 | cpu_frequency = CPUFREQ_NORMAL; |
366 | } | 367 | } |
367 | } | 368 | } |