diff options
Diffstat (limited to 'firmware/target/arm/philips/sa9200/power-sa9200.c')
-rw-r--r-- | firmware/target/arm/philips/sa9200/power-sa9200.c | 68 |
1 files changed, 0 insertions, 68 deletions
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 */ | ||