FreeCalypso > hg > ffs-editor
changeset 16:9582c4e40607
armio.c: no board-specific GPIO config
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 15 May 2020 04:43:00 +0000 |
parents | 41e50f700ee2 |
children | 9a8a20d45be7 |
files | src/cs/drivers/drv_core/armio/armio.c |
diffstat | 1 files changed, 4 insertions(+), 140 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/armio/armio.c Fri May 15 04:32:48 2020 +0000 +++ b/src/cs/drivers/drv_core/armio/armio.c Fri May 15 04:43:00 2020 +0000 @@ -172,146 +172,10 @@ // reset the IOs config AI_ResetIoConfig(); - // CLKM_IO_CNTL register configuration : - // select IOs 6,8,9,10,11,12 and 13 on the pins instead of MCSI and MCUEN signals. - AI_EnableBit(0); /* FreeCalypso addition */ - AI_EnableBit(2); - AI_EnableBit(4); - - #ifdef CONFIG_TARGET_PIRELLI - AI_EnableBit(1); - AI_EnableBit(3); - #endif - - /* Bits 5,6,7,8 are used to output I/O 9,10,11,12 or MCSI pins */ - /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ - /* - * FreeCalypso change: we don't have BT, our new criterion is - * whether or not a given board is wired for MCSI. - */ - #if defined(CONFIG_MCSI_MODEM) || defined(CONFIG_TARGET_PIRELLI) - AI_DisableBit(5); - AI_DisableBit(6); - AI_DisableBit(7); - AI_DisableBit(8); - #else - AI_EnableBit(5); - AI_EnableBit(6); - AI_EnableBit(7); - AI_EnableBit(8); - #endif - - AI_EnableBit(9); - - // ARMIO_OUT register configuration : - // set IOs 8,9,10,11,12 and 13 as high - // set IOs 0 to 7 as low - - #ifdef CONFIG_TARGET_C11X - /* C11x GPIO configuration mimics what the original fw sets */ - - /* GPIO out all zeros */ - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; - - /* setting of GPIOs as outputs: register setting from the original fw */ - *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2209; - - #elif defined(CONFIG_TARGET_C139) - /* C139 GPIO configuration mimics what the original fw sets */ - - /* GPIO out all zeros - the LCD backlight is OFF */ - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; - - /* setting of GPIOs as outputs: register setting from the original fw */ - *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09; - - #elif defined(CONFIG_TARGET_C155) - /* C155 GPIO config based on the available schematics */ - - /* GPIO out all zeros - the LCD backlight is OFF */ - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; - - AI_ConfigBitAsOutput(1); /* LCD backlight control */ - AI_ConfigBitAsOutput(2); /* headset jack switch */ - AI_ConfigBitAsOutput(3); /* LCDA0 (?) */ - AI_ConfigBitAsOutput(8); /* MUSIC_A0 */ - AI_ConfigBitAsOutput(12); /* MUSIC_ON */ - - #elif defined(CONFIG_TARGET_J100) - /* - * GPIO config on this target is based on the disassembly of - * Init_Target() and AI_InitIOConfig() functions in the official fw. - */ - - /* GPIO out all zeros - the LCD backlight is OFF */ - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; - - /* setting of GPIOs as outputs: register setting from the original fw */ - *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A59; - - #elif defined(CONFIG_TARGET_PIRELLI) - - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; - - AI_ConfigBitAsOutput(1); - AI_ConfigBitAsOutput(4); - AI_ConfigBitAsOutput(7); - - #else /* classic TI/Openmoko/FreeCalypso targets */ - // set IOs 1 and 8 to 13 as high - // set IOs 0 and 2 to 7 as low - // 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. - // 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) || defined(CONFIG_GPIO1_HIGH) - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; -#else - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; -#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) || \ - defined(CONFIG_TARGET_GTM900) - AI_ConfigBitAsOutput(0); - #endif - AI_ConfigBitAsOutput(1); - #ifndef CONFIG_TARGET_LEONARDO /* GPIO 2 is an input on Leonardo! */ - AI_ConfigBitAsOutput(2); - #endif - #ifdef CONFIG_GPIO3_OUTPUT - AI_ConfigBitAsOutput(3); - #endif - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) - AI_ConfigBitAsOutput(4); - #endif - AI_ConfigBitAsOutput(5); - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) - AI_ConfigBitAsOutput(6); - #endif - AI_ConfigBitAsOutput(7); - #if 1 /* FreeCalypso addition for all targets */ - AI_ConfigBitAsOutput(8); - #endif - AI_ConfigBitAsOutput(9); - #ifdef CONFIG_MCSI_UNUSED - AI_ConfigBitAsOutput(10); - AI_ConfigBitAsOutput(11); - AI_ConfigBitAsOutput(12); - #endif - #if 1 /* FreeCalypso addition for all targets */ - AI_ConfigBitAsOutput(13); - #endif - AI_ConfigBitAsOutput(14); - AI_ConfigBitAsOutput(15); - #endif +/* + * In this special FFS editor run-from-RAM application + * we don't make any board-specific GPIO or pinmux configs. + */ } /*