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