diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-20 16:47:56 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-07-21 13:18:45 +0200 |
commit | 1ddb183736bad257b8e774c0d0ab1ff8f628b442 (patch) | |
tree | 16b5e64b54547a9081a277117cd1194643681d09 /src/osmo-bts-sysmo | |
parent | c2d3e45571e75610a40669f0fa0efed7b6e65946 (diff) |
Enable direct access to PDTCH queue of DSP by PCU
Use "-P -M" to enable PCU and direct access.
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 6 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 10 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/oml.c | 7 |
3 files changed, 18 insertions, 5 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index b219c41d..3cf2955a 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -57,6 +57,8 @@ #include "l1_transp.h" #include "hw_misc.h" +extern int pcu_direct; + /* FIXME: make threshold configurable */ #define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */ #define MIN_QUAL_NORM -0.5f /* at least -1 dB C/I */ @@ -959,12 +961,10 @@ int l1if_activate_rf(struct femtol1_hdl *hdl, int on) #else sysp->u.activateRfReq.timing.u8TimSrc = 1; /* Master */ sysp->u.activateRfReq.msgq.u8UseTchMsgq = 0; - sysp->u.activateRfReq.msgq.u8UsePdtchMsgq = 0; + sysp->u.activateRfReq.msgq.u8UsePdtchMsgq = pcu_direct; /* Use clock from OCXO or whatever source is configured */ sysp->u.activateRfReq.rfTrx.clkSrc = hdl->clk_src; - sysp->u.activateRfReq.rfRx.clkSrc = hdl->clk_src; sysp->u.activateRfReq.rfTrx.iClkCor = hdl->clk_cal; - sysp->u.activateRfReq.rfRx.iClkCor = hdl->clk_cal; #endif } else { sysp->id = SuperFemto_PrimId_DeactivateRfReq; diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 2203309d..84a02745 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -51,7 +51,7 @@ /* FIXME: read from real hardware */ const uint8_t abis_mac[6] = { 0,1,2,3,4,5 }; -int gprs_enabled = 0; +int gprs_enabled = 0, pcu_direct = 0; static const char *config_file = "osmo-bts.cfg"; static int daemonize = 0; @@ -110,6 +110,8 @@ static void print_help() " -p --dsp-trace Set DSP trace flags\n" " -w --hw-version Print the targeted HW Version\n" " -P --pcu Enable PCU L1 socket interface\n" + " -M --pcu-direct Force PCU to access message queue for " + "PDCH dchannel directly\n" ); } @@ -140,10 +142,11 @@ static void handle_options(int argc, char **argv) { "dsp-trace", 1, 0, 'p' }, { "hw-version", 0, 0, 'w' }, { "pcu", 0, 0, 'P' }, + { "pcu-direct", 0, 0, 'M' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "hc:d:Dc:sTVe:p:w:P", + c = getopt_long(argc, argv, "hc:d:Dc:sTVe:p:w:PM", long_options, &option_idx); if (c == -1) break; @@ -175,6 +178,9 @@ static void handle_options(int argc, char **argv) } gprs_enabled = 1; break; + case 'M': + pcu_direct = 1; + break; case 'V': print_version(1); exit(0); diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index 257f30a1..705fd83c 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -291,6 +291,13 @@ static int trx_init(struct gsm_bts_trx *trx) return l1if_req_compl(fl1h, msg, 0, trx_init_compl_cb, fl1h); } +uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx) +{ + struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx); + + return fl1h->hLayer1; +} + static int trx_close_compl_cb(struct msgb *l1_msg, void *data) { return 0; |