FreeCalypso > hg > fc-selenite
changeset 171:3a8c90814d1a
armio.c: GTM900 support from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 19 Jun 2019 04:27:44 +0000 |
parents | 7290e92f71a9 |
children | a0f935d68377 |
files | src/cs/drivers/drv_core/armio/armio.c |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/armio/armio.c Wed Jun 19 04:23:24 2019 +0000 +++ b/src/cs/drivers/drv_core/armio/armio.c Wed Jun 19 04:27:44 2019 +0000 @@ -263,18 +263,23 @@ // On D-Sample GPIO 1 must be set to high to enable the audio amplifier, // but on Openmoko's modem it is the interrupt to the AP. // On the FCDEV3B it also controls the audio amplifier. - // For now we initialize it to low on all targets. -#if 1 + // On the GTM900 GPIOs 0 and 1 are RI and DSR outputs, respectively. + // For targets other than GTM900, we enable the audio amplifier + // if we are in an MMI!=0 build - for ACI builds use the AT@SPKR command. +#ifdef CONFIG_TARGET_GTM900 + *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01; +#elif (MMI != 0) + *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; +#else *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; -#else - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; #endif // ARMIO_CNTL_REG register configuration : // set IOs 1,2,5,7,9,14 and 15 as ouputs. // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCFAM // are FreeCalypso additions - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) + #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) || \ + defined(CONFIG_TARGET_GTM900) AI_ConfigBitAsOutput(0); #endif AI_ConfigBitAsOutput(1);