FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_core/armio/armio.c @ 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 | 9b81b68e8e64 |
children | 92dbfa906f66 |
comparison
equal
deleted
inserted
replaced
599:4626d7a955de | 600:8f50b202e81f |
---|---|
187 /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ | 187 /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ |
188 /* | 188 /* |
189 * FreeCalypso change: we don't have BT, our new criterion is | 189 * FreeCalypso change: we don't have BT, our new criterion is |
190 * whether or not a given board is wired for MCSI. | 190 * whether or not a given board is wired for MCSI. |
191 */ | 191 */ |
192 #if defined(CONFIG_TARGET_FCDEV3B) || defined(CONFIG_TARGET_PIRELLI) | 192 #if defined(CONFIG_TARGET_FCMODEM) || defined(CONFIG_TARGET_PIRELLI) |
193 AI_DisableBit(5); | 193 AI_DisableBit(5); |
194 AI_DisableBit(6); | 194 AI_DisableBit(6); |
195 AI_DisableBit(7); | 195 AI_DisableBit(7); |
196 AI_DisableBit(8); | 196 AI_DisableBit(8); |
197 #else | 197 #else |
270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; | 270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; |
271 #endif | 271 #endif |
272 | 272 |
273 // ARMIO_CNTL_REG register configuration : | 273 // ARMIO_CNTL_REG register configuration : |
274 // set IOs 1,2,5,7,9,14 and 15 as ouputs. | 274 // set IOs 1,2,5,7,9,14 and 15 as ouputs. |
275 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCDEV3B | 275 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCFAM |
276 // are FreeCalypso additions | 276 // are FreeCalypso additions |
277 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) | 277 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) |
278 AI_ConfigBitAsOutput(0); | 278 AI_ConfigBitAsOutput(0); |
279 #endif | 279 #endif |
280 AI_ConfigBitAsOutput(1); | 280 AI_ConfigBitAsOutput(1); |
281 AI_ConfigBitAsOutput(2); | 281 AI_ConfigBitAsOutput(2); |
282 #ifdef CONFIG_TARGET_GTAMODEM | 282 #ifdef CONFIG_TARGET_GTAMODEM |
283 AI_ConfigBitAsOutput(3); | 283 AI_ConfigBitAsOutput(3); |
284 #endif | 284 #endif |
285 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) | 285 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) |
286 AI_ConfigBitAsOutput(4); | 286 AI_ConfigBitAsOutput(4); |
287 #endif | 287 #endif |
288 AI_ConfigBitAsOutput(5); | 288 AI_ConfigBitAsOutput(5); |
289 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) | 289 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) |
290 AI_ConfigBitAsOutput(6); | 290 AI_ConfigBitAsOutput(6); |
291 #endif | 291 #endif |
292 AI_ConfigBitAsOutput(7); | 292 AI_ConfigBitAsOutput(7); |
293 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) | 293 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) |
294 AI_ConfigBitAsOutput(8); | 294 AI_ConfigBitAsOutput(8); |
295 #endif | 295 #endif |
296 AI_ConfigBitAsOutput(9); | 296 AI_ConfigBitAsOutput(9); |
297 #ifdef CONFIG_TARGET_GTAMODEM | 297 #ifdef CONFIG_TARGET_GTAMODEM |
298 AI_ConfigBitAsOutput(10); | 298 AI_ConfigBitAsOutput(10); |
299 AI_ConfigBitAsOutput(11); | 299 AI_ConfigBitAsOutput(11); |
300 AI_ConfigBitAsOutput(12); | 300 AI_ConfigBitAsOutput(12); |
301 #endif | 301 #endif |
302 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B) | 302 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) |
303 AI_ConfigBitAsOutput(13); | 303 AI_ConfigBitAsOutput(13); |
304 #endif | 304 #endif |
305 AI_ConfigBitAsOutput(14); | 305 AI_ConfigBitAsOutput(14); |
306 AI_ConfigBitAsOutput(15); | 306 AI_ConfigBitAsOutput(15); |
307 #endif | 307 #endif |