changeset 411:ee49b250774f

tpudrv10.c: initial rf_path[] reconstruction
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 19 Jan 2018 07:38:43 +0000
parents bc1654e1e80d
children 2b038b43e31b
files src/cs/layer1/tpu_drivers/source0/tpudrv10.c
diffstat 1 files changed, 31 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/layer1/tpu_drivers/source0/tpudrv10.c	Thu Jan 18 06:09:39 2018 +0000
+++ b/src/cs/layer1/tpu_drivers/source0/tpudrv10.c	Fri Jan 19 07:38:43 2018 +0000
@@ -155,47 +155,59 @@
     // common
     UWORD16 arfcn0;
     UWORD16 limit;
-    UWORD16 rf_chip_band;	/* from tpudrv12.obj, not in tpudrv61.c */
     T_TX_RX tx_rx[2];
 };
 
 struct rf_path_s {
-  UWORD8 rx_up;
-  UWORD8 rx_down;
-  UWORD8 tx_up;
-  UWORD8 tx_down;
-  struct synth_s *synth;
+  UWORD16 rf_chip_band;
+  UWORD8  rx_up;
+  UWORD8  rx_down;
+  UWORD8  tx_up;
+  UWORD8  tx_down;
+  UWORD8  tx_up_rev;
+  struct  synth_s *synth;
 };
 
-#if 0
 const struct synth_s synth_900[] =
 {
-  {  0,  124, BAND_SELECT_GSM, {{ 890,   1}, { 935,   2}}},// gsm    0 - 124
-  {974, 1023, BAND_SELECT_GSM, {{ 880,   1}, { 925,   2}}},// egsm 975 - 1023
+  {  0,  124, {{ 890,   1}, { 935,   4}}},// gsm    0 - 124
+  {974, 1023, {{ 880,   1}, { 925,   4}}},// egsm 975 - 1023
 };
 
 const struct synth_s synth_1800[] =
 {
-  {511, 885, BAND_SELECT_DCS, {{1710,  1},  {1805,   1}}}, // dcs  512 - 885
+  {511, 885, {{1710, -1},  {1805,   1}}}, // dcs  512 - 885
 };
 
 const struct synth_s synth_1900[] =
 {
-  {511, 810, BAND_SELECT_PCS, {{1850,  1},  {1930,   1}}}, // pcs  512 - 810;
+  {511, 810, {{1850, -1},  {1930,   1}}}, // pcs  512 - 810;
 };
 
 const struct synth_s synth_850[] =
 {
-  {127, 192, BAND_SELECT_850_LO, {{ 824,   2},  { 869,   2}}}, // gsm850 low
-  {127, 251, BAND_SELECT_850_HI, {{ 824,   1},  { 869,   2}}}, // gsm850 high
+  {127, 251, {{ 824,   1},  { 869,   4}}}, // gsm850 high
 };
 
 struct rf_path_s rf_path[] = {    //same index used as for band_config[] - 1
-  { RU_900,  RD_900,  TU_900,  TD_900,  (struct synth_s *)synth_900 }, //EGSM
-  { RU_1800, RD_1800, TU_1800, TD_1800, (struct synth_s *)synth_1800}, //DCS
-  { RU_1900, RD_1900, TU_1900, TD_1900, (struct synth_s *)synth_1900}, //PCS
-  { RU_850,  RD_850,  TU_850,  TD_850,  (struct synth_s *)synth_850 }, //GSM850
-  { RU_900,  RD_900,  TU_900,  TD_900,  (struct synth_s *)synth_900 }, //GSM
+  /* EGSM */
+  { BAND_SELECT_GSM, RU_900,  RD_900,  TU_900,  TD_900,  TU_REV_900,
+    (struct synth_s *)synth_900 },
+  /* DCS */
+  { BAND_SELECT_DCS, RU_1800, RD_1800, TU_1800, TD_1800, TU_REV_1800,
+    (struct synth_s *)synth_1800},
+  /* PCS */
+  { BAND_SELECT_PCS, RU_1900, RD_1900, TU_1900, TD_1900, TU_REV_1900,
+    (struct synth_s *)synth_1900},
+  /* GSM850 */
+  { BAND_SELECT_850, RU_850,  RD_850,  TU_850,  TD_850,  TU_REV_850,
+    (struct synth_s *)synth_850 },
+  /* PCS in dual-us */
+  { BAND_SELECT_PCS, RU_1900, RD_1900, TU_1900, TD_1900, TU_REV_1900,
+    (struct synth_s *)synth_1900},
+  /* non-E GSM */
+  { BAND_SELECT_GSM, RU_900,  RD_900,  TU_900,  TD_900,  TU_REV_900,
+    (struct synth_s *)synth_900 },
 };
 
 /*
@@ -205,6 +217,7 @@
  * from LoCosto's calc_rf_freq().
  */
 
+#if 0
 UWORD32 calc_a_b(UWORD16 arfcn, UWORD8 downlink)
 {
   UWORD32 farfcn;	/* in 200 kHz units */