summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-05-19 09:29:20 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-05-19 09:29:20 +0000
commit38136345f6f045cd8993c7ed593e9e77fff51a90 (patch)
treeefe522438e4048da7dc4a6113290a6cc99e10187 /firmware
parentcc61f0391524ec6a71cf740b65c50f3d3ee934dd (diff)
downloadrockbox-38136345f6f045cd8993c7ed593e9e77fff51a90.tar.gz
rockbox-38136345f6f045cd8993c7ed593e9e77fff51a90.tar.bz2
rockbox-38136345f6f045cd8993c7ed593e9e77fff51a90.zip
HD200 - lm339 response time is at best 300 ns so adcclk can not be too high
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26158 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/coldfire/mpio/hd200/system-hd200.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/system-hd200.c b/firmware/target/coldfire/mpio/hd200/system-hd200.c
index 27ff0a1966..814cc718d4 100644
--- a/firmware/target/coldfire/mpio/hd200/system-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/system-hd200.c
@@ -77,6 +77,9 @@ void cf_set_cpu_frequency(long frequency)
IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(3<<10);
/* BUFEN2 enable on /CS2 | CS2Post 1 clock| CS2Pre 3 clocks*/
IDECONFIG2 = (1<<18)|(1<<16)|(1<<8)|(1<<0); /* TA /CS2 enable + CS2wait */
+
+ and_l(~(0x07<<16), &ADCONFIG);
+ or_l(((1<<7)|(1<<2)|(1<<0))<<16, &ADCONFIG); /* adclk = busclk/32 */
break;
case CPUFREQ_NORMAL:
@@ -94,6 +97,9 @@ void cf_set_cpu_frequency(long frequency)
cpu_frequency = CPUFREQ_NORMAL;
IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(1<<10);
IDECONFIG2 = (1<<18)|(1<<16);
+
+ and_l(~(0x07<<16), &ADCONFIG);
+ or_l(((1<<7)|(1<<1)|(1<<0))<<16, &ADCONFIG); /* adclk = busclk/8 */
break;
default:
@@ -109,6 +115,9 @@ void cf_set_cpu_frequency(long frequency)
cpu_frequency = CPUFREQ_DEFAULT;
IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(1<<10);
IDECONFIG2 = (1<<18)|(1<<16);
+
+ and_l(~(0x07<<16), &ADCONFIG);
+ or_l(((1<<7)|(1<<0))<<16, &ADCONFIG); /* adclk = busclk/2 */
break;
}
}