From 606d8fc36de0e1812da66e48f23eb7b840b28ebb Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Fri, 13 Jul 2018 16:00:24 -0700 Subject: mg: fix tx power issue This commit will fix power issues with 2 radios configuration (UHD 3.12+). Removed unused _master boolean. CPLD path are now correct, each radio has its own CPLD object. --- .../dboard/magnesium/magnesium_radio_ctrl_init.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp') 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(cpld_path).set(_cpld); - } else { - UHD_LOG_TRACE(unique_id(), "Reusing someone else's CPLD object..."); - _cpld = _tree->access(cpld_path).get(); - } - UHD_LOG_TRACE(unique_id(), "Initializing TX LO..."); _tx_lo = adf435x_iface::make_adf4351( [this](const std::vector transactions){ -- cgit v1.2.3