comparison src/cs/drivers/drv_core/armio/armio.c @ 409:6c3f68021c53

armio.c: GPIO directions restored to TI's original on the D-Sample
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 18 Jan 2018 05:59:41 +0000
parents db0874a11f57
children 5c780d080afc
comparison
equal deleted inserted replaced
408:336edc558a30 409:6c3f68021c53
222 AI_ConfigBitAsOutput(4); 222 AI_ConfigBitAsOutput(4);
223 AI_ConfigBitAsOutput(7); 223 AI_ConfigBitAsOutput(7);
224 #else /* classic TI/Openmoko/FreeCalypso targets */ 224 #else /* classic TI/Openmoko/FreeCalypso targets */
225 // set IOs 1 and 8 to 13 as high 225 // set IOs 1 and 8 to 13 as high
226 // set IOs 0 and 2 to 7 as low 226 // 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. 227 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier,
228 #if (OP_L1_STANDALONE == 0) 228 // but on Openmoko's modem it is the interrupt to the AP.
229 // CC test 229 // On the FCDEV3B it also controls the audio amplifier.
230 #if 1 // Dmitriy: GPIO 1 is the interrupt for the ext host, set it to 0 230 // For now we initialize it to low on all targets.
231 #if 1
231 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; 232 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00;
232 #else 233 #else
233 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; 234 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02;
234 #endif 235 #endif
235 //*((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01;
236 // end
237 #else
238 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01;
239 #endif
240 236
241 // ARMIO_CNTL_REG register configuration : 237 // ARMIO_CNTL_REG register configuration :
242 // set IOs 1,2,5,7,9,14 and 15 as ouputs. 238 // set IOs 1,2,5,7,9,14 and 15 as ouputs.
243 AI_ConfigBitAsOutput(0); /* FreeCalypso addition */ 239 #ifndef CONFIG_TARGET_DSAMPLE
244 // CC test 0316 240 AI_ConfigBitAsOutput(0); /* FreeCalypso addition */
241 #endif
245 AI_ConfigBitAsOutput(1); 242 AI_ConfigBitAsOutput(1);
246 // end
247 AI_ConfigBitAsOutput(2); 243 AI_ConfigBitAsOutput(2);
248 #ifdef CONFIG_TARGET_GTAMODEM 244 #ifdef CONFIG_TARGET_GTAMODEM
249 AI_ConfigBitAsOutput(3); 245 AI_ConfigBitAsOutput(3);
250 #endif 246 #endif
251 AI_ConfigBitAsOutput(4); /* FreeCalypso addition */ 247 #ifndef CONFIG_TARGET_DSAMPLE
248 AI_ConfigBitAsOutput(4); /* FreeCalypso addition */
249 #endif
252 AI_ConfigBitAsOutput(5); 250 AI_ConfigBitAsOutput(5);
253 AI_ConfigBitAsOutput(6); /* FreeCalypso addition */ 251 #ifndef CONFIG_TARGET_DSAMPLE
252 AI_ConfigBitAsOutput(6); /* FreeCalypso addition */
253 #endif
254 AI_ConfigBitAsOutput(7); 254 AI_ConfigBitAsOutput(7);
255 AI_ConfigBitAsOutput(8); /* FreeCalypso addition */ 255 #ifndef CONFIG_TARGET_DSAMPLE
256 AI_ConfigBitAsOutput(8); /* FreeCalypso addition */
257 #endif
256 AI_ConfigBitAsOutput(9); 258 AI_ConfigBitAsOutput(9);
257 #ifdef CONFIG_TARGET_GTAMODEM 259 #ifdef CONFIG_TARGET_GTAMODEM
258 AI_ConfigBitAsOutput(10); 260 AI_ConfigBitAsOutput(10);
259 AI_ConfigBitAsOutput(11); 261 AI_ConfigBitAsOutput(11);
260 AI_ConfigBitAsOutput(12); 262 AI_ConfigBitAsOutput(12);
261 #endif 263 #endif
262 AI_ConfigBitAsOutput(13); /* FreeCalypso addition */ 264 #ifndef CONFIG_TARGET_DSAMPLE
265 AI_ConfigBitAsOutput(13); /* FreeCalypso addition */
266 #endif
263 AI_ConfigBitAsOutput(14); 267 AI_ConfigBitAsOutput(14);
264 AI_ConfigBitAsOutput(15); 268 AI_ConfigBitAsOutput(15);
265 #endif 269 #endif
266 } 270 }
267 271