diff options
-rw-r--r-- | firmware/target/arm/philips/sa9200/adc-target.h | 22 | ||||
-rw-r--r-- | firmware/target/arm/philips/sa9200/power-sa9200.c | 68 |
2 files changed, 2 insertions, 88 deletions
diff --git a/firmware/target/arm/philips/sa9200/adc-target.h b/firmware/target/arm/philips/sa9200/adc-target.h index ab7d5d92ed..007a11af10 100644 --- a/firmware/target/arm/philips/sa9200/adc-target.h +++ b/firmware/target/arm/philips/sa9200/adc-target.h | |||
@@ -21,25 +21,7 @@ | |||
21 | #ifndef _ADC_TARGET_H_ | 21 | #ifndef _ADC_TARGET_H_ |
22 | #define _ADC_TARGET_H_ | 22 | #define _ADC_TARGET_H_ |
23 | 23 | ||
24 | /* ADC channels */ | 24 | /* The ADC sources and channels are common to all targets with AS3514 */ |
25 | #define NUM_ADC_CHANNELS 13 | 25 | #include "as3514.h" |
26 | |||
27 | #define ADC_BVDD 0 /* Battery voltage of 4V LiIo accumulator */ | ||
28 | #define ADC_RTCSUP 1 /* RTC backup battery voltage */ | ||
29 | #define ADC_UVDD 2 /* USB host voltage */ | ||
30 | #define ADC_CHG_IN 3 /* Charger input voltage */ | ||
31 | #define ADC_CVDD 4 /* Charger pump output voltage */ | ||
32 | #define ADC_BATTEMP 5 /* Battery charging temperature */ | ||
33 | #define ADC_MICSUP1 6 /* Voltage on MicSup1 for remote control | ||
34 | or external voltage measurement */ | ||
35 | #define ADC_MICSUP2 7 /* Voltage on MicSup1 for remote control | ||
36 | or external voltage measurement */ | ||
37 | #define ADC_VBE1 8 /* Measuring junction temperature @ 2uA */ | ||
38 | #define ADC_VBE2 9 /* Measuring junction temperature @ 1uA */ | ||
39 | #define ADC_I_MICSUP1 10 /* Current of MicSup1 for remote control detection */ | ||
40 | #define ADC_I_MICSUP2 11 /* Current of MicSup2 for remote control detection */ | ||
41 | #define ADC_VBAT 12 /* Single cell battery voltage */ | ||
42 | |||
43 | #define ADC_UNREG_POWER ADC_BVDD /* For compatibility */ | ||
44 | 26 | ||
45 | #endif | 27 | #endif |
diff --git a/firmware/target/arm/philips/sa9200/power-sa9200.c b/firmware/target/arm/philips/sa9200/power-sa9200.c index 654beee064..2b42379cae 100644 --- a/firmware/target/arm/philips/sa9200/power-sa9200.c +++ b/firmware/target/arm/philips/sa9200/power-sa9200.c | |||
@@ -63,71 +63,3 @@ void ide_power_enable(bool on) | |||
63 | { | 63 | { |
64 | (void)on; | 64 | (void)on; |
65 | } | 65 | } |
66 | |||
67 | #if CONFIG_TUNER | ||
68 | |||
69 | /** Tuner **/ | ||
70 | static bool powered = false; | ||
71 | |||
72 | bool tuner_power(bool status) | ||
73 | { | ||
74 | bool old_status; | ||
75 | lv24020lp_lock(); | ||
76 | |||
77 | old_status = powered; | ||
78 | |||
79 | if (status != old_status) | ||
80 | { | ||
81 | if (status) | ||
82 | { | ||
83 | /* init mystery amplification device */ | ||
84 | #if defined(SANSA_E200) | ||
85 | GPO32_ENABLE |= 0x1; | ||
86 | #else /* SANSA_C200 */ | ||
87 | DEV_INIT2 &= ~0x800; | ||
88 | #endif | ||
89 | udelay(5); | ||
90 | |||
91 | /* When power up, host should initialize the 3-wire bus | ||
92 | in host read mode: */ | ||
93 | |||
94 | /* 1. Set direction of the DATA-line to input-mode. */ | ||
95 | GPIOH_OUTPUT_EN &= ~(1 << 5); | ||
96 | GPIOH_ENABLE |= (1 << 5); | ||
97 | |||
98 | /* 2. Drive NR_W low */ | ||
99 | GPIOH_OUTPUT_VAL &= ~(1 << 3); | ||
100 | GPIOH_OUTPUT_EN |= (1 << 3); | ||
101 | GPIOH_ENABLE |= (1 << 3); | ||
102 | |||
103 | /* 3. Drive CLOCK high */ | ||
104 | GPIOH_OUTPUT_VAL |= (1 << 4); | ||
105 | GPIOH_OUTPUT_EN |= (1 << 4); | ||
106 | GPIOH_ENABLE |= (1 << 4); | ||
107 | |||
108 | lv24020lp_power(true); | ||
109 | } | ||
110 | else | ||
111 | { | ||
112 | lv24020lp_power(false); | ||
113 | |||
114 | /* set all as inputs */ | ||
115 | GPIOH_OUTPUT_EN &= ~((1 << 5) | (1 << 3) | (1 << 4)); | ||
116 | GPIOH_ENABLE &= ~((1 << 3) | (1 << 4)); | ||
117 | |||
118 | /* turn off mystery amplification device */ | ||
119 | #if defined (SANSA_E200) | ||
120 | GPO32_ENABLE &= ~0x1; | ||
121 | #else | ||
122 | DEV_INIT2 |= 0x800; | ||
123 | #endif | ||
124 | } | ||
125 | |||
126 | powered = status; | ||
127 | } | ||
128 | |||
129 | lv24020lp_unlock(); | ||
130 | return old_status; | ||
131 | } | ||
132 | |||
133 | #endif /* CONFIG_TUNER */ | ||