aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/phy_link.h2
-rw-r--r--src/osmo-bts-litecell15/l1_if.c1
-rw-r--r--src/osmo-bts-litecell15/l1_if.h2
-rw-r--r--src/osmo-bts-litecell15/lc15bts_vty.c54
-rw-r--r--src/osmo-bts-litecell15/main.c9
-rw-r--r--src/osmo-bts-sysmo/l1_if.c1
-rw-r--r--src/osmo-bts-sysmo/l1_if.h2
-rw-r--r--src/osmo-bts-sysmo/main.c8
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c36
9 files changed, 98 insertions, 17 deletions
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index b4588c2c..73d57749 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -82,6 +82,7 @@ struct phy_instance {
union {
struct {
+ uint32_t dsp_trace_f;
struct femtol1_hdl *hdl;
} sysmobts;
struct {
@@ -92,6 +93,7 @@ struct phy_instance {
uint32_t trx_id;
} octphy;
struct {
+ uint32_t dsp_trace_f;
struct lc15l1_hdl *hdl;
} lc15;
} u;
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index e7b769a9..9bca6354 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1403,6 +1403,7 @@ struct lc15l1_hdl *l1if_open(struct phy_instance *pinst)
fl1h->clk_use_eeprom = 1;
fl1h->min_qual_rach = MIN_QUAL_RACH;
fl1h->min_qual_norm = MIN_QUAL_NORM;
+ fl1h->dsp_trace_f = pinst->u.lc15.dsp_trace_f;
get_hwinfo(fl1h);
diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h
index 6d6bebd5..c7add4b4 100644
--- a/src/osmo-bts-litecell15/l1_if.h
+++ b/src/osmo-bts-litecell15/l1_if.h
@@ -36,7 +36,7 @@ struct calib_send_state {
struct lc15l1_hdl {
struct gsm_time gsm_time;
uint32_t hLayer1; /* handle to the L1 instance in the DSP */
- uint32_t dsp_trace_f;
+ uint32_t dsp_trace_f; /* currently operational DSP trace flags */
uint8_t clk_use_eeprom;
int clk_cal;
uint8_t clk_src;
diff --git a/src/osmo-bts-litecell15/lc15bts_vty.c b/src/osmo-bts-litecell15/lc15bts_vty.c
index 90607965..558e7e1c 100644
--- a/src/osmo-bts-litecell15/lc15bts_vty.c
+++ b/src/osmo-bts-litecell15/lc15bts_vty.c
@@ -130,6 +130,31 @@ DEFUN(cfg_phy_min_qual_norm, cfg_phy_min_qual_norm_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_phy_dsp_trace_f, cfg_phy_dsp_trace_f_cmd,
+ "HIDDEN", TRX_STR)
+{
+ struct phy_instance *pinst = vty->index;
+ unsigned int flag;
+
+ flag = get_string_value(lc15bts_tracef_names, argv[1]);
+ pinst->u.lc15.dsp_trace_f |= ~flag;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_phy_no_dsp_trace_f, cfg_phy_no_dsp_trace_f_cmd,
+ "HIDDEN", NO_STR TRX_STR)
+{
+ struct phy_instance *pinst = vty->index;
+ unsigned int flag;
+
+ flag = get_string_value(lc15bts_tracef_names, argv[1]);
+ pinst->u.lc15.dsp_trace_f &= ~flag;
+
+ return CMD_SUCCESS;
+}
+
+
/* runtime */
DEFUN(show_dsp_trace_f, show_dsp_trace_f_cmd,
@@ -338,7 +363,16 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
static void write_phy_inst(struct vty *vty, struct phy_instance *pinst)
{
struct lc15l1_hdl *fl1h = pinst->u.lc15.hdl;
+ int i;
+ for (i = 0; i < 32; i++) {
+ if (pinst->u.lc15.dsp_trace_f & (1 << i)) {
+ const char *name;
+ name = get_value_string(lc15bts_tracef_names, (1 << i));
+ vty_out(vty, " dsp-trace-flag %s%s", name,
+ VTY_NEWLINE);
+ }
+ }
if (fl1h->calib_path)
vty_out(vty, " trx-calibration-path %s%s",
fl1h->calib_path, VTY_NEWLINE);
@@ -375,6 +409,24 @@ int bts_model_vty_init(struct gsm_bts *bts)
NO_STR TRX_STR DSP_TRACE_F_STR,
"\n", "", 0);
+ cfg_phy_dsp_trace_f_cmd.string = vty_cmd_string_from_valstr(bts,
+ lc15bts_tracef_names,
+ "dsp-trace-flag (",
+ "|",")", VTY_DO_LOWER);
+ cfg_phy_dsp_trace_f_cmd.doc = vty_cmd_string_from_valstr(bts,
+ lc15bts_tracef_docs,
+ DSP_TRACE_F_STR,
+ "\n", "", 0);
+
+ cfg_phy_no_dsp_trace_f_cmd.string = vty_cmd_string_from_valstr(bts,
+ lc15bts_tracef_names,
+ "no dsp-trace-flag (",
+ "|",")", VTY_DO_LOWER);
+ cfg_phy_no_dsp_trace_f_cmd.doc = vty_cmd_string_from_valstr(bts,
+ lc15bts_tracef_docs,
+ NO_STR DSP_TRACE_F_STR,
+ "\n", "", 0);
+
install_element_ve(&show_dsp_trace_f_cmd);
install_element_ve(&show_sys_info_cmd);
install_element_ve(&dsp_trace_f_cmd);
@@ -389,6 +441,8 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element(BTS_NODE, &cfg_bts_auto_band_cmd);
install_element(BTS_NODE, &cfg_bts_no_auto_band_cmd);
+ install_element(PHY_INST_NODE, &cfg_phy_dsp_trace_f_cmd);
+ install_element(PHY_INST_NODE, &cfg_phy_no_dsp_trace_f_cmd);
install_element(PHY_INST_NODE, &cfg_phy_cal_path_cmd);
install_element(PHY_INST_NODE, &cfg_phy_min_qual_rach_cmd);
install_element(PHY_INST_NODE, &cfg_phy_min_qual_norm_cmd);
diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c
index f9cacb74..ae789f47 100644
--- a/src/osmo-bts-litecell15/main.c
+++ b/src/osmo-bts-litecell15/main.c
@@ -60,7 +60,6 @@
#include "misc/lc15bts_bid.h"
extern int pcu_direct;
-static unsigned int dsp_trace = 0x00000000;
int bts_model_init(struct gsm_bts *bts)
{
@@ -127,8 +126,7 @@ void bts_update_status(enum bts_global_status which, int on)
void bts_model_print_help()
{
- printf( " -p --dsp-trace Set DSP trace flags\n"
- " -w --hw-version Print the targeted HW Version\n"
+ printf( " -w --hw-version Print the targeted HW Version\n"
" -M --pcu-direct Force PCU to access message queue for "
"PDCH dchannel directly\n"
);
@@ -164,7 +162,6 @@ int bts_model_handle_options(int argc, char **argv)
while (1) {
int option_idx = 0, c;
static const struct option long_options[] = {
- /* FIXME: all those are generic Osmocom app options */
{ "dsp-trace", 1, 0, 'p' },
{ "hw-version", 0, 0, 'w' },
{ "pcu-direct", 0, 0, 'M' },
@@ -177,10 +174,6 @@ int bts_model_handle_options(int argc, char **argv)
break;
switch (c) {
- case 'p':
- dsp_trace = strtoul(optarg, NULL, 16);
-#warning use dsp_trace!!!
- break;
case 'M':
pcu_direct = 1;
break;
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 8d07422f..55453ef6 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1463,6 +1463,7 @@ struct femtol1_hdl *l1if_open(struct phy_instance *pinst)
fl1h->clk_use_eeprom = 1;
fl1h->min_qual_rach = MIN_QUAL_RACH;
fl1h->min_qual_norm = MIN_QUAL_NORM;
+ fl1h->dsp_trace_f = pinst->u.sysmobts.dsp_trace_f;
get_hwinfo_eeprom(fl1h);
#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0)
if (fl1h->hw_info.model_nr == 2050) {
diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h
index de4f2a32..f69ee9cc 100644
--- a/src/osmo-bts-sysmo/l1_if.h
+++ b/src/osmo-bts-sysmo/l1_if.h
@@ -45,7 +45,7 @@ enum {
struct femtol1_hdl {
struct gsm_time gsm_time;
uint32_t hLayer1; /* handle to the L1 instance in the DSP */
- uint32_t dsp_trace_f;
+ uint32_t dsp_trace_f; /* currently operational DSP trace flags */
uint8_t clk_use_eeprom;
int clk_cal;
uint8_t clk_src;
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 88981eef..68143bb4 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -55,7 +55,6 @@
#include "oml_router.h"
extern int pcu_direct;
-static unsigned int dsp_trace = 0x00000000;
/* Set the clock calibration to the value
* read from the eeprom.
@@ -168,22 +167,17 @@ int bts_model_handle_options(int argc, char **argv)
int option_idx = 0, c;
static const struct option long_options[] = {
/* specific to this hardware */
- { "dsp-trace", 1, 0, 'p' },
{ "hw-version", 0, 0, 'w' },
{ "pcu-direct", 0, 0, 'M' },
{ 0, 0, 0, 0 }
};
- c = getopt_long(argc, argv, "p:w:M",
+ c = getopt_long(argc, argv, "wM",
long_options, &option_idx);
if (c == -1)
break;
switch (c) {
- case 'p':
- dsp_trace = strtoul(optarg, NULL, 16);
-#warning use dsp_trace!!!
- break;
case 'M':
pcu_direct = 1;
break;
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index ced8f8e0..d620b4a1 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -227,6 +227,30 @@ DEFUN(cfg_trx_nominal_power, cfg_trx_nominal_power_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_phy_dsp_trace_f, cfg_phy_dsp_trace_f_cmd,
+ "HIDDEN", TRX_STR)
+{
+ struct phy_instance *pinst = vty->index;
+ unsigned int flag;
+
+ flag = get_string_value(femtobts_tracef_names, argv[1]);
+ pinst->u.sysmobts.dsp_trace_f |= ~flag;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_phy_no_dsp_trace_f, cfg_phy_no_dsp_trace_f_cmd,
+ "HIDDEN", NO_STR TRX_STR)
+{
+ struct phy_instance *pinst = vty->index;
+ unsigned int flag;
+
+ flag = get_string_value(femtobts_tracef_names, argv[1]);
+ pinst->u.sysmobts.dsp_trace_f &= ~flag;
+
+ return CMD_SUCCESS;
+}
+
/* runtime */
DEFUN(show_trx_clksrc, show_trx_clksrc_cmd,
@@ -484,6 +508,16 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
static void write_phy_inst(struct vty *vty, struct phy_instance *pinst)
{
struct femtol1_hdl *fl1h = pinst->u.sysmobts.hdl;
+ int i;
+
+ for (i = 0; i < 32; i++) {
+ if (pinst->u.sysmobts.dsp_trace_f & (1 << i)) {
+ const char *name;
+ name = get_value_string(femtobts_tracef_names, (1 << i));
+ vty_out(vty, " dsp-trace-flag %s%s", name,
+ VTY_NEWLINE);
+ }
+ }
if (fl1h->clk_use_eeprom)
vty_out(vty, " clock-calibration eeprom%s", VTY_NEWLINE);
@@ -549,6 +583,8 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element(TRX_NODE, &cfg_trx_ul_power_target_cmd);
install_element(TRX_NODE, &cfg_trx_nominal_power_cmd);
+ install_element(PHY_INST_NODE, &cfg_phy_dsp_trace_f_cmd);
+ install_element(PHY_INST_NODE, &cfg_phy_no_dsp_trace_f_cmd);
install_element(PHY_INST_NODE, &cfg_phy_clkcal_cmd);
install_element(PHY_INST_NODE, &cfg_phy_clkcal_eeprom_cmd);
install_element(PHY_INST_NODE, &cfg_phy_clkcal_def_cmd);