FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_core/armio/armio.c @ 610:0cbe7438f974
armio.c: GPIO config for GTM900 and long-standing GPIO 1 fix
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Mon, 17 Jun 2019 21:48:54 +0000 |
| parents | 92dbfa906f66 |
| children | 3231dd9b38c1 |
comparison
equal
deleted
inserted
replaced
| 609:238b67a785f2 | 610:0cbe7438f974 |
|---|---|
| 261 // set IOs 1 and 8 to 13 as high | 261 // set IOs 1 and 8 to 13 as high |
| 262 // set IOs 0 and 2 to 7 as low | 262 // set IOs 0 and 2 to 7 as low |
| 263 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier, | 263 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier, |
| 264 // but on Openmoko's modem it is the interrupt to the AP. | 264 // but on Openmoko's modem it is the interrupt to the AP. |
| 265 // On the FCDEV3B it also controls the audio amplifier. | 265 // On the FCDEV3B it also controls the audio amplifier. |
| 266 // For now we initialize it to low on all targets. | 266 // On the GTM900 GPIOs 0 and 1 are RI and DSR outputs, respectively. |
| 267 #if 1 | 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. | |
| 269 #ifdef CONFIG_TARGET_GTM900 | |
| 270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01; | |
| 271 #elif (MMI != 0) | |
| 272 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; | |
| 273 #else | |
| 268 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; | 274 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; |
| 269 #else | |
| 270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; | |
| 271 #endif | 275 #endif |
| 272 | 276 |
| 273 // ARMIO_CNTL_REG register configuration : | 277 // ARMIO_CNTL_REG register configuration : |
| 274 // set IOs 1,2,5,7,9,14 and 15 as ouputs. | 278 // set IOs 1,2,5,7,9,14 and 15 as ouputs. |
| 275 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCFAM | 279 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCFAM |
| 276 // are FreeCalypso additions | 280 // are FreeCalypso additions |
| 277 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) | 281 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) || \ |
| 282 defined(CONFIG_TARGET_GTM900) | |
| 278 AI_ConfigBitAsOutput(0); | 283 AI_ConfigBitAsOutput(0); |
| 279 #endif | 284 #endif |
| 280 AI_ConfigBitAsOutput(1); | 285 AI_ConfigBitAsOutput(1); |
| 281 AI_ConfigBitAsOutput(2); | 286 AI_ConfigBitAsOutput(2); |
| 282 #ifdef CONFIG_TARGET_GTAMODEM | 287 #ifdef CONFIG_TARGET_GTAMODEM |
