FreeCalypso > hg > fc-magnetite
changeset 600:8f50b202e81f
board preprocessor conditionals: prep for more FC hw in the future
This change eliminates the CONFIG_TARGET_FCDEV3B preprocessor symbol and
all preprocessor conditionals throughout the code base that tested for it,
replacing them with CONFIG_TARGET_FCFAM or CONFIG_TARGET_FCMODEM. These
new symbols are specified as follows:
CONFIG_TARGET_FCFAM is intended to cover all hardware designs created by
Mother Mychaela under the FreeCalypso trademark. This family will include
modem products (repackagings of the FCDEV3B, possibly with RFFE or even
RF transceiver changes), and also my desired FreeCalypso handset product.
CONFIG_TARGET_FCMODEM is intended to cover all FreeCalypso modem products
(which will be firmware-compatible with the FCDEV3B if they use TI Rita
transceiver, or will require a different fw build if we switch to one of
Silabs Aero transceivers), but not the handset product. Right now this
CONFIG_TARGET_FCMODEM preprocessor symbol is used to conditionalize
everything dealing with MCSI.
At the present moment the future of FC hardware evolution is still unknown:
it is not known whether we will ever have any beyond-FCDEV3B hardware at all
(contingent on uncertain funding), and if we do produce further FC hardware
designs, it is not known whether they will retain the same FIC modem core
(triband), if we are going to have a quadband design that still retains the
classic Rita transceiver, or if we are going to switch to Silabs Aero II
or some other transceiver. If we produce a quadband modem that still uses
Rita, it will run exactly the same fw as the FCDEV3B thanks to the way we
define TSPACT signals for the RF_FAM=12 && CONFIG_TARGET_FCFAM combination,
and the current fcdev3b build target will be renamed to fcmodem. OTOH, if
that putative quadband modem will be Aero-based, then it will require a
different fw build target, the fcdev3b target will stay as it is, and the
two targets will both define CONFIG_TARGET_FCFAM and CONFIG_TARGET_FCMODEM,
but will have different RF_FAM numbers. But no matter which way we are
going to evolve, it is not right to have conditionals on CONFIG_TARGET_FCDEV3B
in places like ACI, and the present change clears the way for future
evolution.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 01 Apr 2019 01:05:24 +0000 |
parents | 4626d7a955de |
children | 3e5689c0ca4e |
files | src/aci2/aci/ati_audio.c src/aci2/aci/ati_cmd.c src/aci2/aci/hl_audio_drv.c src/cs/drivers/drv_core/armio/armio.c src/cs/layer1/tpu_drivers/source0/tpudrv12.h src/g23m-aci/aci/ati_audio.c src/g23m-aci/aci/ati_cmd.c src/g23m-aci/aci/hl_audio_drv.c targets/fcdev3b.h |
diffstat | 9 files changed, 32 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aci2/aci/ati_audio.c Thu Mar 28 00:01:11 2019 +0000 +++ b/src/aci2/aci/ati_audio.c Mon Apr 01 01:05:24 2019 +0000 @@ -69,7 +69,7 @@ #include "fc-target.cfg" #include "armio.h" -#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCDEV3B) +#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCFAM) /* AT@SPKR - turn loudspeaker amplifier on or off */ GLOBAL T_ATI_RSLT atAtSPKR ( char *cl, UBYTE srcId ) { @@ -167,7 +167,7 @@ return (ATI_CMPL); } -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM extern UBYTE aci_digital_voice_autoswitch; /* AT@VPATH - configure digital voice path */
--- a/src/aci2/aci/ati_cmd.c Thu Mar 28 00:01:11 2019 +0000 +++ b/src/aci2/aci/ati_cmd.c Mon Apr 01 01:05:24 2019 +0000 @@ -675,11 +675,11 @@ EXTERN T_ATI_RSLT atAtBAND (CHAR *cl, UBYTE srcId); /* FreeCalypso additions */ -#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCDEV3B) +#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCFAM) EXTERN T_ATI_RSLT atAtSPKR (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT queatAtSPKR (char *cl, UBYTE srcId); #endif -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM EXTERN T_ATI_RSLT atAtVPATH (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT queatAtVPATH (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT atAtVSEL (char *cl, UBYTE srcId); @@ -1090,10 +1090,10 @@ {"@RST", AT_CMD_P_RST, atAtRST, 0, 0, 0}, {"@BAND", AT_CMD_P_BAND, atAtBAND, 0, 0, 0}, /* FreeCalypso additions */ -#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCDEV3B) +#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCFAM) {"@SPKR", AT_CMD_AT_SPKR, atAtSPKR, test_gen, queatAtSPKR, "%s: (0,1)"}, #endif -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM {"@VPATH", AT_CMD_AT_VPATH, atAtVPATH,test_gen, queatAtVPATH,"%s: (0-2)"}, {"@VSEL", AT_CMD_AT_VSEL, atAtVSEL, test_gen, queatAtVSEL, "%s: (0,1)"}, #endif
--- a/src/aci2/aci/hl_audio_drv.c Thu Mar 28 00:01:11 2019 +0000 +++ b/src/aci2/aci/hl_audio_drv.c Mon Apr 01 01:05:24 2019 +0000 @@ -39,7 +39,7 @@ LOCAL T_HL_VOCODER_STATE currVocoderState; -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM GLOBAL UBYTE aci_digital_voice_autoswitch; #endif @@ -95,7 +95,7 @@ */ GLOBAL T_HL_VOICE_DRV_RSLT hl_drv_enable_vocoder ( void ) { -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_BLUETOOTH_HEADSET; T_AUDIO_FULL_ACCESS_WRITE audio_param; T_RV_RETURN return_path = { NULL, 0 }; @@ -134,7 +134,7 @@ enable_tch_vocoder(TRUE); vocoder_mute_dl (FALSE); /* un-mute speaker */ vocoder_mute_ul (FALSE); /* un-mute microphone */ - #ifdef CONFIG_TARGET_FCDEV3B + #ifdef CONFIG_TARGET_FCMODEM if (aci_digital_voice_autoswitch) { audio_param.variable_indentifier = AUDIO_PATH_USED; @@ -160,7 +160,7 @@ */ GLOBAL void hl_drv_disable_vocoder ( void ) { -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_GSM_VOICE_PATH; T_AUDIO_FULL_ACCESS_WRITE audio_param; T_RV_RETURN return_path = { NULL, 0 }; @@ -177,7 +177,7 @@ vocoder_mute_dl (TRUE); /* mute speaker */ vocoder_mute_ul (TRUE); /* mute microphone */ enable_tch_vocoder (FALSE); /* disable vocoder */ -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM if (aci_digital_voice_autoswitch) { audio_param.variable_indentifier = AUDIO_PATH_USED;
--- a/src/cs/drivers/drv_core/armio/armio.c Thu Mar 28 00:01:11 2019 +0000 +++ b/src/cs/drivers/drv_core/armio/armio.c Mon Apr 01 01:05:24 2019 +0000 @@ -189,7 +189,7 @@ * FreeCalypso change: we don't have BT, our new criterion is * whether or not a given board is wired for MCSI. */ - #if defined(CONFIG_TARGET_FCDEV3B) || defined(CONFIG_TARGET_PIRELLI) + #if defined(CONFIG_TARGET_FCMODEM) || defined(CONFIG_TARGET_PIRELLI) AI_DisableBit(5); AI_DisableBit(6); AI_DisableBit(7); @@ -272,9 +272,9 @@ // 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_FCDEV3B + // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCFAM // are FreeCalypso additions - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) + #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) AI_ConfigBitAsOutput(0); #endif AI_ConfigBitAsOutput(1); @@ -282,15 +282,15 @@ #ifdef CONFIG_TARGET_GTAMODEM AI_ConfigBitAsOutput(3); #endif - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) + #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) AI_ConfigBitAsOutput(4); #endif AI_ConfigBitAsOutput(5); - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) + #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) AI_ConfigBitAsOutput(6); #endif AI_ConfigBitAsOutput(7); - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) + #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) AI_ConfigBitAsOutput(8); #endif AI_ConfigBitAsOutput(9); @@ -299,7 +299,7 @@ AI_ConfigBitAsOutput(11); AI_ConfigBitAsOutput(12); #endif - #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) + #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) AI_ConfigBitAsOutput(13); #endif AI_ConfigBitAsOutput(14);
--- a/src/cs/layer1/tpu_drivers/source0/tpudrv12.h Thu Mar 28 00:01:11 2019 +0000 +++ b/src/cs/layer1/tpu_drivers/source0/tpudrv12.h Mon Apr 01 01:05:24 2019 +0000 @@ -274,7 +274,7 @@ #define TU_1900 ( PA_HI_BAND | FEM_PINS ^ FEM_8 ) #define TD_1900 ( PA_OFF | FEM_PINS ^ 0 ) -#elif defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) +#elif defined(CONFIG_TARGET_GTAMODEM) // Openmoko's triband configuration is a bastardized version // of TI's quadband one from Leonardo/E-Sample @@ -322,7 +322,7 @@ * In our FreeCalypso hw family, we would like to be able to use * both triband and quadband RFFEs. Our current FCDEV3B is triband, * copied from Openmoko, and the same is expected to be the case for - * future low-cost designs, but if someone pays for a new RF layout, + * future low-budget designs, but if someone pays for a new RF layout, * we can use a quadband RFFE instead. If we ever have two different * hw platforms or variants that differ in the RFFE but are otherwise * firmware-compatible, we would like to have the same fw build
--- a/src/g23m-aci/aci/ati_audio.c Thu Mar 28 00:01:11 2019 +0000 +++ b/src/g23m-aci/aci/ati_audio.c Mon Apr 01 01:05:24 2019 +0000 @@ -69,7 +69,7 @@ #include "fc-target.cfg" #include "armio.h" -#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCDEV3B) +#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCFAM) /* AT@SPKR - turn loudspeaker amplifier on or off */ GLOBAL T_ATI_RSLT atAtSPKR ( char *cl, UBYTE srcId ) { @@ -167,7 +167,7 @@ return (ATI_CMPL); } -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM extern UBYTE aci_digital_voice_autoswitch; /* AT@VPATH - configure digital voice path */
--- a/src/g23m-aci/aci/ati_cmd.c Thu Mar 28 00:01:11 2019 +0000 +++ b/src/g23m-aci/aci/ati_cmd.c Mon Apr 01 01:05:24 2019 +0000 @@ -743,11 +743,11 @@ EXTERN T_ATI_RSLT atAtBAND (CHAR *cl, UBYTE srcId); /* FreeCalypso additions */ -#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCDEV3B) +#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCFAM) EXTERN T_ATI_RSLT atAtSPKR (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT queatAtSPKR (char *cl, UBYTE srcId); #endif -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM EXTERN T_ATI_RSLT atAtVPATH (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT queatAtVPATH (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT atAtVSEL (char *cl, UBYTE srcId); @@ -1209,10 +1209,10 @@ {"@RST", AT_CMD_P_RST, atAtRST, 0, 0, 0}, {"@BAND", AT_CMD_P_BAND, atAtBAND, 0, 0, 0}, /* FreeCalypso additions */ -#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCDEV3B) +#if defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_FCFAM) {"@SPKR", AT_CMD_AT_SPKR, atAtSPKR, test_gen, queatAtSPKR, "%s: (0,1)"}, #endif -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM {"@VPATH", AT_CMD_AT_VPATH, atAtVPATH,test_gen, queatAtVPATH,"%s: (0-2)"}, {"@VSEL", AT_CMD_AT_VSEL, atAtVSEL, test_gen, queatAtVSEL, "%s: (0,1)"}, #endif
--- a/src/g23m-aci/aci/hl_audio_drv.c Thu Mar 28 00:01:11 2019 +0000 +++ b/src/g23m-aci/aci/hl_audio_drv.c Mon Apr 01 01:05:24 2019 +0000 @@ -38,7 +38,7 @@ LOCAL T_HL_VOCODER_STATE currVocoderState; -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM GLOBAL UBYTE aci_digital_voice_autoswitch; #endif @@ -69,7 +69,7 @@ currVocoderState = HL_VOCODER_DISABLED; } -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM static void audio_mode_callback(void *event_from_audio) { /* do nothing at this time */ @@ -89,7 +89,7 @@ */ GLOBAL void hl_drv_set_vocoder_state(BOOL user_attach) { -#ifdef CONFIG_TARGET_FCDEV3B +#ifdef CONFIG_TARGET_FCMODEM T_AUDIO_VOICE_PATH_SETTING vpath; T_AUDIO_FULL_ACCESS_WRITE audio_param; T_RV_RETURN return_path; @@ -106,7 +106,7 @@ enable_tch_vocoder(TRUE); vocoder_mute_dl (FALSE); /* un-mute speaker */ vocoder_mute_ul (FALSE); /* un-mute microphone */ - #ifdef CONFIG_TARGET_FCDEV3B + #ifdef CONFIG_TARGET_FCMODEM if (aci_digital_voice_autoswitch) { vpath = AUDIO_BLUETOOTH_HEADSET; @@ -124,7 +124,7 @@ vocoder_mute_dl (TRUE); /* mute speaker */ vocoder_mute_ul (TRUE); /* mute microphone */ enable_tch_vocoder (FALSE); /* disable vocoder */ - #ifdef CONFIG_TARGET_FCDEV3B + #ifdef CONFIG_TARGET_FCMODEM if (aci_digital_voice_autoswitch) { vpath = AUDIO_GSM_VOICE_PATH;