diff options
author | Fred Bauer <fred.w.bauer@gmail.com> | 2010-12-29 16:07:15 +0000 |
---|---|---|
committer | Fred Bauer <fred.w.bauer@gmail.com> | 2010-12-29 16:07:15 +0000 |
commit | e541c98a7e19f22ab62a0adb370ea9f4c922e666 (patch) | |
tree | 74aa302fcc9e3c1ea05c9f45ad1724da8badd71e /firmware/target/arm/as3525/system-as3525.c | |
parent | 7f31e38ac12884db251734482e0d37174c62e40b (diff) |
revert r28834 because it causes problems with uSD
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28925 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/system-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 2c4543fa33..d8059715d0 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -33,12 +33,6 @@ #include "backlight-target.h" #include "lcd.h" -/* FIXME */ -#define I2C2_CPSR0 *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x1C)) -#define I2C2_CPSR1 *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x20)) -extern void sd_set_boosted_divider(void); -extern void sd_set_unboosted_divider(void); - #define default_interrupt(name) \ extern __attribute__((weak,alias("UIRQ"))) void name (void) @@ -292,12 +286,7 @@ void system_init(void) #endif /* Initialize power management settings */ -#if CONFIG_CPU == AS3525 - ascodec_write(AS3514_CVDD_DCDC3, AS314_CP_DCDC3_SETTING|CVDD_1_10); -#else ascodec_write(AS3514_CVDD_DCDC3, AS314_CP_DCDC3_SETTING); -#endif - #if CONFIG_TUNER fmradio_i2c_init(); #endif @@ -365,9 +354,7 @@ void set_cpu_frequency(long frequency) { if(frequency == CPUFREQ_MAX) { -#if defined(HAVE_ADJUSTABLE_CPU_VOLTAGE) && (CPUFREQ_MAX > 200000000) - /* This doesn't work anymore. It was written before ascodec - was switched to use interrupts */ +#ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE /* Increasing frequency so boost voltage before change */ ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_20)); @@ -387,35 +374,10 @@ void set_cpu_frequency(long frequency) "mcr p15, 0, r0, c1, c0 \n" : : : "r0" ); -#ifdef HAVE_MULTIDRIVE - /* Set uSD frequency */ - sd_set_boosted_divider(); -#endif - /* Set I2C frequency */ - I2C2_CPSR0 = AS3525_I2C_PRESCALER_BOOSTED & 0xFF; /* 8 lsb */ - I2C2_CPSR1 = (AS3525_I2C_PRESCALER_BOOSTED >> 8) & 0x3; /* 2 msb */ - /* Set PCLK frequency */ - CGU_PERI = ((CGU_PERI & ~0x7F) | /* reset divider & clksel bits */ - (AS3525_PCLK_DIV0_BOOSTED << 2) | - (AS3525_PCLK_DIV1_BOOSTED << 6) | - AS3525_PCLK_SEL); cpu_frequency = CPUFREQ_MAX; } else { - /* Set I2C frequency */ - I2C2_CPSR0 = AS3525_I2C_PRESCALER & 0xFF; /* 8 lsb */ - I2C2_CPSR1 = (AS3525_I2C_PRESCALER >> 8) & 0x3; /* 2 msb */ - /* Set PCLK frequency */ - CGU_PERI = ((CGU_PERI & ~0x7F) | /* reset divider & clksel bits */ - (AS3525_PCLK_DIV0 << 2) | - (AS3525_PCLK_DIV1 << 6) | - AS3525_PCLK_SEL); - -#ifdef HAVE_MULTIDRIVE - /* Set uSD frequency */ - sd_set_unboosted_divider(); -#endif asm volatile( "mrc p15, 0, r0, c1, c0 \n" "bic r0, r0, #3<<30 \n" /* fastbus clocking */ @@ -425,7 +387,7 @@ void set_cpu_frequency(long frequency) /* FCLK is unused so put it to the lowest freq we can */ CGU_PROC = ((0xf << 4) | (0x3 << 2) | AS3525_CLK_MAIN); -#if defined(HAVE_ADJUSTABLE_CPU_VOLTAGE) && (CPUFREQ_MAX > 200000000) +#ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE /* Decreasing frequency so reduce voltage after change */ ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_10)); #endif /* HAVE_ADJUSTABLE_CPU_VOLTAGE */ |