# HG changeset patch # User Mychaela Falconia # Date 1560918464 0 # Node ID 3a8c90814d1a7a27e87c64d1783dc9732501f664 # Parent 7290e92f71a9f6482caa3ce1517729d71d1622fc armio.c: GTM900 support from Magnetite diff -r 7290e92f71a9 -r 3a8c90814d1a src/cs/drivers/drv_core/armio/armio.c --- 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);