FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_core/armio/armio.c @ 533:09afc37e8069
armio.c: added support for C155 target
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 05 Nov 2018 09:54:16 +0000 |
parents | 5c780d080afc |
children | 6c96725718c3 |
comparison
equal
deleted
inserted
replaced
532:5c780d080afc | 533:09afc37e8069 |
---|---|
213 /* GPIO out all zeros - the LCD backlight is OFF */ | 213 /* GPIO out all zeros - the LCD backlight is OFF */ |
214 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; | 214 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; |
215 | 215 |
216 /* setting of GPIOs as outputs also mimics what the original fw sets */ | 216 /* setting of GPIOs as outputs also mimics what the original fw sets */ |
217 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09; | 217 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09; |
218 | |
219 #elif defined(CONFIG_TARGET_C155) | |
220 /* C155 GPIO config based on the available schematics */ | |
221 | |
222 /* GPIO out all zeros - the LCD backlight is OFF */ | |
223 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; | |
224 | |
225 AI_ConfigBitAsOutput(1); /* LCD backlight control */ | |
226 AI_ConfigBitAsOutput(2); /* headset jack switch */ | |
227 AI_ConfigBitAsOutput(3); /* LCDA0 (?) */ | |
228 AI_ConfigBitAsOutput(8); /* MUSIC_A0 */ | |
229 AI_ConfigBitAsOutput(12); /* MUSIC_ON */ | |
230 | |
218 #elif defined(CONFIG_TARGET_PIRELLI) | 231 #elif defined(CONFIG_TARGET_PIRELLI) |
232 | |
219 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; | 233 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; |
220 | 234 |
221 AI_ConfigBitAsOutput(1); | 235 AI_ConfigBitAsOutput(1); |
222 AI_ConfigBitAsOutput(4); | 236 AI_ConfigBitAsOutput(4); |
223 AI_ConfigBitAsOutput(7); | 237 AI_ConfigBitAsOutput(7); |
238 | |
224 #else /* classic TI/Openmoko/FreeCalypso targets */ | 239 #else /* classic TI/Openmoko/FreeCalypso targets */ |
225 // set IOs 1 and 8 to 13 as high | 240 // set IOs 1 and 8 to 13 as high |
226 // set IOs 0 and 2 to 7 as low | 241 // set IOs 0 and 2 to 7 as low |
227 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier, | 242 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier, |
228 // but on Openmoko's modem it is the interrupt to the AP. | 243 // but on Openmoko's modem it is the interrupt to the AP. |
239 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCDEV3B | 254 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCDEV3B |
240 // are FreeCalypso additions | 255 // are FreeCalypso additions |
241 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) | 256 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) |
242 AI_ConfigBitAsOutput(0); | 257 AI_ConfigBitAsOutput(0); |
243 #endif | 258 #endif |
244 AI_ConfigBitAsOutput(1); | 259 AI_ConfigBitAsOutput(1); |
245 AI_ConfigBitAsOutput(2); | 260 AI_ConfigBitAsOutput(2); |
246 #ifdef CONFIG_TARGET_GTAMODEM | 261 #ifdef CONFIG_TARGET_GTAMODEM |
247 AI_ConfigBitAsOutput(3); | 262 AI_ConfigBitAsOutput(3); |
248 #endif | 263 #endif |
249 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) | 264 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) |