# HG changeset patch # User Mychaela Falconia # Date 1560808134 0 # Node ID 0cbe7438f9743d111a1b5b71a1f45f5205e459c8 # Parent 238b67a785f2aec16806f69580e52b4e59efe760 armio.c: GPIO config for GTM900 and long-standing GPIO 1 fix diff -r 238b67a785f2 -r 0cbe7438f974 components/drivers_flash --- a/components/drivers_flash Mon Jun 17 21:25:46 2019 +0000 +++ b/components/drivers_flash Mon Jun 17 21:48:54 2019 +0000 @@ -1,7 +1,7 @@ # Building drivers_flash.lib CFLAGS="-me -pw2 -mn -x -mt -o2 -mw" -CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470" +CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470 -DMMI=$MMI" # Includes diff -r 238b67a785f2 -r 0cbe7438f974 src/cs/drivers/drv_core/armio/armio.c --- a/src/cs/drivers/drv_core/armio/armio.c Mon Jun 17 21:25:46 2019 +0000 +++ b/src/cs/drivers/drv_core/armio/armio.c Mon Jun 17 21:48:54 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);