comparison src/cs/drivers/drv_core/armio/armio.c @ 179:2a9935250c95

src/cs: sync with Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 04 Jan 2020 21:38:55 +0000
parents 3a8c90814d1a
children d05fb947b50d
comparison
equal deleted inserted replaced
178:42edfb87ae0f 179:2a9935250c95
187 /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ 187 /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */
188 /* 188 /*
189 * FreeCalypso change: we don't have BT, our new criterion is 189 * FreeCalypso change: we don't have BT, our new criterion is
190 * whether or not a given board is wired for MCSI. 190 * whether or not a given board is wired for MCSI.
191 */ 191 */
192 #if defined(CONFIG_TARGET_FCMODEM) || defined(CONFIG_TARGET_PIRELLI) 192 #if defined(CONFIG_MCSI_MODEM) || defined(CONFIG_TARGET_PIRELLI)
193 AI_DisableBit(5); 193 AI_DisableBit(5);
194 AI_DisableBit(6); 194 AI_DisableBit(6);
195 AI_DisableBit(7); 195 AI_DisableBit(7);
196 AI_DisableBit(8); 196 AI_DisableBit(8);
197 #else 197 #else
266 // On the GTM900 GPIOs 0 and 1 are RI and DSR outputs, respectively. 266 // On the GTM900 GPIOs 0 and 1 are RI and DSR outputs, respectively.
267 // For targets other than GTM900, we enable the audio amplifier 267 // For targets other than GTM900, we enable the audio amplifier
268 // if we are in an MMI!=0 build - for ACI builds use the AT@SPKR command. 268 // if we are in an MMI!=0 build - for ACI builds use the AT@SPKR command.
269 #ifdef CONFIG_TARGET_GTM900 269 #ifdef CONFIG_TARGET_GTM900
270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01; 270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01;
271 #elif (MMI != 0) 271 #elif (MMI != 0) || defined(CONFIG_GPIO1_HIGH)
272 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; 272 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02;
273 #else 273 #else
274 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; 274 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00;
275 #endif 275 #endif
276 276
281 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) || \ 281 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) || \
282 defined(CONFIG_TARGET_GTM900) 282 defined(CONFIG_TARGET_GTM900)
283 AI_ConfigBitAsOutput(0); 283 AI_ConfigBitAsOutput(0);
284 #endif 284 #endif
285 AI_ConfigBitAsOutput(1); 285 AI_ConfigBitAsOutput(1);
286 AI_ConfigBitAsOutput(2); 286 #ifndef CONFIG_TARGET_LEONARDO /* GPIO 2 is an input on Leonardo! */
287 AI_ConfigBitAsOutput(2);
288 #endif
287 #ifdef CONFIG_TARGET_GTAMODEM 289 #ifdef CONFIG_TARGET_GTAMODEM
288 AI_ConfigBitAsOutput(3); 290 AI_ConfigBitAsOutput(3);
289 #endif 291 #endif
290 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) 292 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM)
291 AI_ConfigBitAsOutput(4); 293 AI_ConfigBitAsOutput(4);
293 AI_ConfigBitAsOutput(5); 295 AI_ConfigBitAsOutput(5);
294 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) 296 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM)
295 AI_ConfigBitAsOutput(6); 297 AI_ConfigBitAsOutput(6);
296 #endif 298 #endif
297 AI_ConfigBitAsOutput(7); 299 AI_ConfigBitAsOutput(7);
298 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) 300 #if 1 /* FreeCalypso addition for all targets */
299 AI_ConfigBitAsOutput(8); 301 AI_ConfigBitAsOutput(8);
300 #endif 302 #endif
301 AI_ConfigBitAsOutput(9); 303 AI_ConfigBitAsOutput(9);
302 #ifdef CONFIG_TARGET_GTAMODEM 304 #ifdef CONFIG_TARGET_GTAMODEM
303 AI_ConfigBitAsOutput(10); 305 AI_ConfigBitAsOutput(10);
304 AI_ConfigBitAsOutput(11); 306 AI_ConfigBitAsOutput(11);
305 AI_ConfigBitAsOutput(12); 307 AI_ConfigBitAsOutput(12);
306 #endif 308 #endif
307 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) 309 #if 1 /* FreeCalypso addition for all targets */
308 AI_ConfigBitAsOutput(13); 310 AI_ConfigBitAsOutput(13);
309 #endif 311 #endif
310 AI_ConfigBitAsOutput(14); 312 AI_ConfigBitAsOutput(14);
311 AI_ConfigBitAsOutput(15); 313 AI_ConfigBitAsOutput(15);
312 #endif 314 #endif