diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-05-19 09:29:20 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-05-19 09:29:20 +0000 |
commit | 38136345f6f045cd8993c7ed593e9e77fff51a90 (patch) | |
tree | efe522438e4048da7dc4a6113290a6cc99e10187 /firmware/target/coldfire/mpio/hd200/system-hd200.c | |
parent | cc61f0391524ec6a71cf740b65c50f3d3ee934dd (diff) | |
download | rockbox-38136345f6f045cd8993c7ed593e9e77fff51a90.tar.gz 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/target/coldfire/mpio/hd200/system-hd200.c')
-rw-r--r-- | firmware/target/coldfire/mpio/hd200/system-hd200.c | 9 |
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) | |||
77 | IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(3<<10); | 77 | IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(3<<10); |
78 | /* BUFEN2 enable on /CS2 | CS2Post 1 clock| CS2Pre 3 clocks*/ | 78 | /* BUFEN2 enable on /CS2 | CS2Post 1 clock| CS2Pre 3 clocks*/ |
79 | IDECONFIG2 = (1<<18)|(1<<16)|(1<<8)|(1<<0); /* TA /CS2 enable + CS2wait */ | 79 | IDECONFIG2 = (1<<18)|(1<<16)|(1<<8)|(1<<0); /* TA /CS2 enable + CS2wait */ |
80 | |||
81 | and_l(~(0x07<<16), &ADCONFIG); | ||
82 | or_l(((1<<7)|(1<<2)|(1<<0))<<16, &ADCONFIG); /* adclk = busclk/32 */ | ||
80 | break; | 83 | break; |
81 | 84 | ||
82 | case CPUFREQ_NORMAL: | 85 | case CPUFREQ_NORMAL: |
@@ -94,6 +97,9 @@ void cf_set_cpu_frequency(long frequency) | |||
94 | cpu_frequency = CPUFREQ_NORMAL; | 97 | cpu_frequency = CPUFREQ_NORMAL; |
95 | IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(1<<10); | 98 | IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(1<<10); |
96 | IDECONFIG2 = (1<<18)|(1<<16); | 99 | IDECONFIG2 = (1<<18)|(1<<16); |
100 | |||
101 | and_l(~(0x07<<16), &ADCONFIG); | ||
102 | or_l(((1<<7)|(1<<1)|(1<<0))<<16, &ADCONFIG); /* adclk = busclk/8 */ | ||
97 | break; | 103 | break; |
98 | 104 | ||
99 | default: | 105 | default: |
@@ -109,6 +115,9 @@ void cf_set_cpu_frequency(long frequency) | |||
109 | cpu_frequency = CPUFREQ_DEFAULT; | 115 | cpu_frequency = CPUFREQ_DEFAULT; |
110 | IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(1<<10); | 116 | IDECONFIG1 = (1<<28)|(1<<20)|(1<<18)|(1<<13)|(1<<10); |
111 | IDECONFIG2 = (1<<18)|(1<<16); | 117 | IDECONFIG2 = (1<<18)|(1<<16); |
118 | |||
119 | and_l(~(0x07<<16), &ADCONFIG); | ||
120 | or_l(((1<<7)|(1<<0))<<16, &ADCONFIG); /* adclk = busclk/2 */ | ||
112 | break; | 121 | break; |
113 | } | 122 | } |
114 | } | 123 | } |