comparison gsm-fw/L1/cust0/l1_cust.c @ 542:9dd6ca16f13d

gsm-fw/L1/cust0: split between IRAM and XIP code
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 03 Aug 2014 04:59:30 +0000
parents 9c91a1f670bd
children eb3fb4d0dcf0
comparison
equal deleted inserted replaced
541:9c91a1f670bd 542:9dd6ca16f13d
197 enum { 197 enum {
198 RF_ID = 0, 198 RF_ID = 0,
199 ADC_ID = 1 199 ADC_ID = 1
200 }; 200 };
201 201
202 #if (L1_FF_MULTIBAND == 0) 202 #if (L1_FF_MULTIBAND == 0) && !defined(RUN_INT_RAM)
203 /*-------------------------------------------------------*/ 203 /*-------------------------------------------------------*/
204 /* Parameters: none */ 204 /* Parameters: none */
205 /* Return: none */ 205 /* Return: none */
206 /* Functionality: Defines the location of rf-struct */ 206 /* Functionality: Defines the location of rf-struct */
207 /* for each std. */ 207 /* for each std. */
208 /*-------------------------------------------------------*/ 208 /*-------------------------------------------------------*/
209 //omaps00090550 #83 warinng removal 209 //omaps00090550 #83 warinng removal
210 static const T_BAND_CONFIG band_config[] = 210 const T_BAND_CONFIG band_config[] =
211 { /*ffs name, default addr, max carrier, min tx pwr */ 211 { /*ffs name, default addr, max carrier, min tx pwr */
212 {"",(T_RF_BAND *) 0,0,0},//undefined 212 {"",(T_RF_BAND *) 0,0,0},//undefined
213 {"900", (T_RF_BAND *)&rf_900, 174, 19 },//EGSM 213 {"900", (T_RF_BAND *)&rf_900, 174, 19 },//EGSM
214 {"1800",(T_RF_BAND *)&rf_1800, 374, 15 },//DCS 214 {"1800",(T_RF_BAND *)&rf_1800, 374, 15 },//DCS
215 {"1900",(T_RF_BAND *)&rf_1900, 299, 15 },//PCS 215 {"1900",(T_RF_BAND *)&rf_1900, 299, 15 },//PCS
243 { BAND_GSM850, BAND_PCS1900, 21, 1 } // std = 8 850/1900 243 { BAND_GSM850, BAND_PCS1900, 21, 1 } // std = 8 850/1900
244 #endif 244 #endif
245 }; 245 };
246 #endif //if (L1_FF_MULTIBAND == 0) 246 #endif //if (L1_FF_MULTIBAND == 0)
247 247
248 #if (L1_FF_MULTIBAND == 0) && defined(RUN_INT_RAM)
249 extern const T_BAND_CONFIG band_config[];
250 extern const T_STD_CONFIG std_config[];
251 #endif
252
248 /*-------------------------------------------------------*/ 253 /*-------------------------------------------------------*/
249 /* Prototypes of external functions used in this file. */ 254 /* Prototypes of external functions used in this file. */
250 /*-------------------------------------------------------*/ 255 /*-------------------------------------------------------*/
251 void l1_initialize(T_MMI_L1_CONFIG *mmi_l1_config); 256 void l1_initialize(T_MMI_L1_CONFIG *mmi_l1_config);
252 #if (L1_FF_MULTIBAND == 0) 257 #if (L1_FF_MULTIBAND == 0)
253 WORD16 Convert_l1_radio_freq (UWORD16 radio_freq); 258 WORD16 Convert_l1_radio_freq (UWORD16 radio_freq);
254 #endif 259 #endif
260
261 #ifndef RUN_FLASH
255 /*-------------------------------------------------------*/ 262 /*-------------------------------------------------------*/
256 /* Cust_recover_Os() */ 263 /* Cust_recover_Os() */
257 /*-------------------------------------------------------*/ 264 /*-------------------------------------------------------*/
258 /* */ 265 /* */
259 /* Description: adjust OS from sleep duration */ 266 /* Description: adjust OS from sleep duration */
382 #else // Simulation part 389 #else // Simulation part
383 return(CLOCK_STOP); // DEEP sleep 390 return(CLOCK_STOP); // DEEP sleep
384 #endif 391 #endif
385 return(CLOCK_STOP); // omaps00090550 392 return(CLOCK_STOP); // omaps00090550
386 } 393 }
387 394 #endif /* !RUN_FLASH */
388 395
396 #ifndef RUN_INT_RAM
389 /*-------------------------------------------------------*/ 397 /*-------------------------------------------------------*/
390 /* Parameters: none */ 398 /* Parameters: none */
391 /* Return: none */ 399 /* Return: none */
392 /* Functionality: Read the RF configuration, tables etc. */ 400 /* Functionality: Read the RF configuration, tables etc. */
393 /* from FFS files. */ 401 /* from FFS files. */
870 l1_config.params.outen3 = abb[ABB_OUTEN3]; 878 l1_config.params.outen3 = abb[ABB_OUTEN3];
871 l1_config.params.aulga = abb[ABB_AULGA]; 879 l1_config.params.aulga = abb[ABB_AULGA];
872 l1_config.params.aurga = abb[ABB_AURGA]; 880 l1_config.params.aurga = abb[ABB_AURGA];
873 #endif 881 #endif
874 } 882 }
875 883 #endif /* !RUN_INT_RAM */
876 884
885 #ifndef RUN_FLASH
877 /************************************/ 886 /************************************/
878 /* Automatic Gain Control */ 887 /* Automatic Gain Control */
879 /************************************/ 888 /************************************/
880 889
881 /*-------------------------------------------------------*/ 890 /*-------------------------------------------------------*/
1292 else 1301 else
1293 return p_tx_level; 1302 return p_tx_level;
1294 } 1303 }
1295 1304
1296 #endif 1305 #endif
1297 1306 #endif /* !RUN_FLASH */
1307
1308 #ifndef RUN_INT_RAM
1298 /*-------------------------------------------------------*/ 1309 /*-------------------------------------------------------*/
1299 /* Cust_Init_Layer1 */ 1310 /* Cust_Init_Layer1 */
1300 /*-------------------------------------------------------*/ 1311 /*-------------------------------------------------------*/
1301 /* Parameters : */ 1312 /* Parameters : */
1302 /* Return : */ 1313 /* Return : */
1348 1359
1349 get_cal_from_nvmem((UWORD8 *)&rf, sizeof(rf), RF_ID); 1360 get_cal_from_nvmem((UWORD8 *)&rf, sizeof(rf), RF_ID);
1350 get_cal_from_nvmem((UWORD8 *)&adc_cal, sizeof(adc_cal), ADC_ID); 1361 get_cal_from_nvmem((UWORD8 *)&adc_cal, sizeof(adc_cal), ADC_ID);
1351 1362
1352 } 1363 }
1353 1364 #endif /* !RUN_INT_RAM */
1354 1365
1355 /*****************************************************************************************/ 1366 /*****************************************************************************************/
1356 /*************************** TESTMODE functions **********************************/ 1367 /*************************** TESTMODE functions **********************************/
1357 /*****************************************************************************************/ 1368 /*****************************************************************************************/
1358 1369
1359 1370
1360 1371 #ifndef RUN_FLASH
1361 /*------------------------------------------------------*/ 1372 /*------------------------------------------------------*/
1362 /* madc_hex_2_physical */ 1373 /* madc_hex_2_physical */
1363 /*------------------------------------------------------*/ 1374 /*------------------------------------------------------*/
1364 /* Parameters : */ 1375 /* Parameters : */
1365 /* Return : */ 1376 /* Return : */
1398 adc.converted[i] = (((UWORD32)(adc_cal.a[i] * adc.raw[i])) >>10) + adc_cal.b[i]; 1409 adc.converted[i] = (((UWORD32)(adc_cal.a[i] * adc.raw[i])) >>10) + adc_cal.b[i];
1399 1410
1400 //store converted ADC values 1411 //store converted ADC values
1401 memcpy(adc_phy, &adc.converted[0], sizeof(adc.raw)); 1412 memcpy(adc_phy, &adc.converted[0], sizeof(adc.raw));
1402 } 1413 }
1403 1414 #endif /* !RUN_FLASH */
1404 1415
1416 #ifndef RUN_INT_RAM
1405 /*------------------------------------------------------*/ 1417 /*------------------------------------------------------*/
1406 /* get_cal_from_nvmem */ 1418 /* get_cal_from_nvmem */
1407 /*------------------------------------------------------*/ 1419 /*------------------------------------------------------*/
1408 /* Parameters : */ 1420 /* Parameters : */
1409 /* Return : */ 1421 /* Return : */
1427 1439
1428 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id) 1440 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id)
1429 { 1441 {
1430 return (0); 1442 return (0);
1431 } 1443 }
1432 1444 #endif /* !RUN_INT_RAM */
1433 #if (TRACE_TYPE == 4) 1445
1446 #if (TRACE_TYPE == 4) && !defined(RUN_FLASH)
1434 1447
1435 /*------------------------------------------------------*/ 1448 /*------------------------------------------------------*/
1436 /* l1_cst_l1_parameters */ 1449 /* l1_cst_l1_parameters */
1437 /*------------------------------------------------------*/ 1450 /*------------------------------------------------------*/
1438 /* Parameters : s: pointer on configuration string */ 1451 /* Parameters : s: pointer on configuration string */
1514 1527
1515 #if ((CHIPSET == 2) || (CHIPSET == 3) || (CHIPSET == 4) || \ 1528 #if ((CHIPSET == 2) || (CHIPSET == 3) || (CHIPSET == 4) || \
1516 (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || \ 1529 (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || \
1517 (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || \ 1530 (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || \
1518 (CHIPSET == 11) || (CHIPSET == 12)) 1531 (CHIPSET == 11) || (CHIPSET == 12))
1532 #ifndef RUN_FLASH
1519 /*-------------------------------------------------------*/ 1533 /*-------------------------------------------------------*/
1520 /* power_down_config() : temporary implementation !!! */ 1534 /* power_down_config() : temporary implementation !!! */
1521 /*-------------------------------------------------------*/ 1535 /*-------------------------------------------------------*/
1522 /* Parameters : sleep_mode (NO, SMALL, BIG, DEEP or ALL) */ 1536 /* Parameters : sleep_mode (NO, SMALL, BIG, DEEP or ALL) */
1523 /* clocks to be cut in BIG sleep */ 1537 /* clocks to be cut in BIG sleep */
1540 #if (OP_L1_STANDALONE == 0) 1554 #if (OP_L1_STANDALONE == 0)
1541 l1s.pw_mgr.enough_gaug = FALSE; 1555 l1s.pw_mgr.enough_gaug = FALSE;
1542 #endif 1556 #endif
1543 } 1557 }
1544 #endif 1558 #endif
1559 #endif