summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/mpio/hd200
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/mpio/hd200')
-rw-r--r--firmware/target/coldfire/mpio/hd200/adc-hd200.c8
-rw-r--r--firmware/target/coldfire/mpio/hd200/system-hd200.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/adc-hd200.c b/firmware/target/coldfire/mpio/hd200/adc-hd200.c
index 656d82e721..01b6f531e2 100644
--- a/firmware/target/coldfire/mpio/hd200/adc-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/adc-hd200.c
@@ -40,7 +40,7 @@ void ADC(void)
40{ 40{
41 static unsigned char channel IBSS_ATTR; 41 static unsigned char channel IBSS_ATTR;
42 /* read current value */ 42 /* read current value */
43 adc_data[((channel&0x01)+1)] = ADVALUE; 43 adc_data[(channel&0x03)] = ADVALUE;
44 44
45 /* switch channel 45 /* switch channel
46 * 46 *
@@ -51,10 +51,10 @@ void ADC(void)
51 51
52 channel++; 52 channel++;
53 53
54 and_l(~(3<<24),&ADCONFIG); 54 and_l(~(0x03<<24),&ADCONFIG);
55 or_l( ((((channel&0x01)+1) << 8 )|(1<<7))<<16, &ADCONFIG); 55 or_l( (((channel&0x03) << 8 )|(1<<7))<<16, &ADCONFIG);
56 56
57 if ( (channel & 0x01) == 0 ) 57 if ( (channel & 0x03) == 0 )
58 /* disable ADC interrupt */ 58 /* disable ADC interrupt */
59 and_l((~(1<<6))<<16,&ADCONFIG); 59 and_l((~(1<<6))<<16,&ADCONFIG);
60} 60}
diff --git a/firmware/target/coldfire/mpio/hd200/system-hd200.c b/firmware/target/coldfire/mpio/hd200/system-hd200.c
index 60699e46a9..a6277d0390 100644
--- a/firmware/target/coldfire/mpio/hd200/system-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/system-hd200.c
@@ -81,7 +81,7 @@ void cf_set_cpu_frequency(long frequency)
81 IDECONFIG2 = (1<<18)|(1<<16)|(1<<8)|(1<<0); /* TA /CS2 enable + CS2wait */ 81 IDECONFIG2 = (1<<18)|(1<<16)|(1<<8)|(1<<0); /* TA /CS2 enable + CS2wait */
82 82
83 and_l(~(0x07<<16), &ADCONFIG); 83 and_l(~(0x07<<16), &ADCONFIG);
84 or_l((0x06)<<16, &ADCONFIG); /* adclk = busclk/64 */ 84 or_l((0x05)<<16, &ADCONFIG); /* adclk = busclk/32 */
85 break; 85 break;
86 86
87 case CPUFREQ_NORMAL: 87 case CPUFREQ_NORMAL: