diff options
4 files changed, 4 insertions, 27 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp index 365082048..e58e1706e 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp @@ -25,9 +25,8 @@ double magnesium_radio_ctrl_impl::_set_all_gain( "freq=" << freq << " Hz, " "chan=" << chan << ", " "dir=" << dir); - const size_t ad9371_chan = _master ? 0 : 1; ;// FIXME: use chan when 2 radios - const magnesium_cpld_ctrl::chan_sel_t chan_sel = - _master ? magnesium_cpld_ctrl::CHAN1 : magnesium_cpld_ctrl::CHAN2; + const size_t ad9371_chan = chan; + auto chan_sel = static_cast<magnesium_cpld_ctrl::chan_sel_t>(chan); gain_tuple_t gain_tuple = (dir == RX_DIRECTION) ? get_rx_gain_tuple(gain, _map_freq_to_rx_band(freq)): get_tx_gain_tuple(gain, _map_freq_to_tx_band(freq)); diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp index 578aa9640..04af0c7a4 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp @@ -171,7 +171,7 @@ void magnesium_radio_ctrl_impl::set_rx_antenna( chan ? magnesium_cpld_ctrl::CHAN1 : magnesium_cpld_ctrl::CHAN2; _update_atr_switches(chan_sel, RX_DIRECTION, ant); - radio_ctrl_impl::set_rx_antenna(ant, chan); // we don't use _master here since each radio has one antenna. + radio_ctrl_impl::set_rx_antenna(ant, chan); } double magnesium_radio_ctrl_impl::set_tx_frequency( diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp index c6fd1bee4..85c11f063 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp @@ -299,10 +299,6 @@ private: //! Prepended for all dboard RPC calls std::string _rpc_prefix; - //! If true, this is a master radio. This attribute will go away when we - // move back to 1 radio block per dboard. - bool _master; - //! Additional block args; gets set during set_rpc_client() uhd::device_addr_t _block_args; diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp index 4f47427b7..ba7d937aa 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp @@ -111,25 +111,13 @@ void magnesium_radio_ctrl_impl::_init_defaults() void magnesium_radio_ctrl_impl::_init_peripherals() { UHD_LOG_TRACE(unique_id(), "Initializing peripherals..."); - fs_path cpld_path = _root_path.branch_path() - / str(boost::format("Radio_%d") % ((get_block_id().get_block_count()/2)*2)) - / "cpld"; - fs_path rx_lo_path = _root_path.branch_path() - / str(boost::format("Radio_%d") % ((get_block_id().get_block_count()/2)*2)) - / "rx_lo"; - fs_path tx_lo_path = _root_path.branch_path() - / str(boost::format("Radio_%d") % ((get_block_id().get_block_count()/2)*2)) - / "tx_lo"; UHD_LOG_TRACE(unique_id(), "Initializing SPI core..."); _spi = spi_core_3000::make(_get_ctrl(0), regs::sr_addr(regs::SPI), regs::rb_addr(regs::RB_SPI) ); - UHD_LOG_TRACE(unique_id(), "Initializing CPLD..."); - UHD_LOG_TRACE(unique_id(), "CPLD path: " << cpld_path); - if (not _tree->exists(cpld_path)) { - UHD_LOG_TRACE(unique_id(), "Creating new CPLD object..."); + UHD_LOG_TRACE(unique_id(), "Creating new CPLD object..."); spi_config_t spi_config; spi_config.use_custom_divider = true; spi_config.divider = 125; @@ -159,12 +147,6 @@ void magnesium_radio_ctrl_impl::_init_peripherals() DX_DIRECTION, radio_ctrl_impl::get_rx_antenna(0) ); - _tree->create<magnesium_cpld_ctrl::sptr>(cpld_path).set(_cpld); - } else { - UHD_LOG_TRACE(unique_id(), "Reusing someone else's CPLD object..."); - _cpld = _tree->access<magnesium_cpld_ctrl::sptr>(cpld_path).get(); - } - UHD_LOG_TRACE(unique_id(), "Initializing TX LO..."); _tx_lo = adf435x_iface::make_adf4351( [this](const std::vector<uint32_t> transactions){ |