summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/system-as3525.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 828ed2ef3e..3b24ac2f39 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -24,6 +24,7 @@
24#include "system.h" 24#include "system.h"
25#include "panic.h" 25#include "panic.h"
26#include "ascodec-target.h" 26#include "ascodec-target.h"
27#include "adc.h"
27#include "dma-target.h" 28#include "dma-target.h"
28#include "clock-target.h" 29#include "clock-target.h"
29#include "fmradio_i2c.h" 30#include "fmradio_i2c.h"
@@ -330,11 +331,11 @@ void set_cpu_frequency(long frequency)
330 { 331 {
331 /* Increasing frequency so boost voltage before change */ 332 /* Increasing frequency so boost voltage before change */
332 ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_20)); 333 ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_20));
334
333 /* Wait for voltage to be at least 1.20v before making fclk > 200 MHz */ 335 /* Wait for voltage to be at least 1.20v before making fclk > 200 MHz */
334 do 336 while(adc_read(ADC_CVDD) < 480) /* 480 * .0025 = 1.20V */
335 ascodec_write(AS3514_ADC_0, 4<<4); /* ADC Input = CVDD */ 337 ;
336 while (ascodec_read(AS3514_ADC_1) < 0xe0); /* 0x1e0 *.0025 = 1.20v */ 338
337 /* e0 = 8LSB's of 0x1e0 */
338 asm volatile( 339 asm volatile(
339 "mrc p15, 0, r0, c1, c0 \n" 340 "mrc p15, 0, r0, c1, c0 \n"
340 341