diff options
Diffstat (limited to 'mpm/lib')
-rw-r--r-- | mpm/lib/dboards/magnesium_manager.cpp | 5 | ||||
-rw-r--r-- | mpm/lib/mykonos/ad937x_ctrl.cpp | 6 | ||||
-rw-r--r-- | mpm/lib/mykonos/ad937x_device.cpp | 3 | ||||
-rw-r--r-- | mpm/lib/mykonos/ad937x_device.hpp | 1 | ||||
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_config_t.cpp | 4 | ||||
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_config_t.hpp | 2 |
6 files changed, 13 insertions, 8 deletions
diff --git a/mpm/lib/dboards/magnesium_manager.cpp b/mpm/lib/dboards/magnesium_manager.cpp index b130d62ad..2d12712ab 100644 --- a/mpm/lib/dboards/magnesium_manager.cpp +++ b/mpm/lib/dboards/magnesium_manager.cpp @@ -11,15 +11,16 @@ using namespace mpm::dboards; using namespace mpm::chips; magnesium_manager::magnesium_manager( - const std::string &mykonos_spidev + const std::string &mykonos_spidev, + const size_t deserializer_lane_xbar ) : _spi_mutex(std::make_shared<std::mutex>()) , _spi_lock(mpm::types::lockable::make(_spi_mutex)) , _mykonos_ctrl(ad937x_ctrl::make( _spi_mutex, + deserializer_lane_xbar, make_ad937x_iface(mykonos_spidev), mpm::ad937x::gpio::gain_pins_t() )) { - } diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp index 729d3a6f3..ecb328fc8 100644 --- a/mpm/lib/mykonos/ad937x_ctrl.cpp +++ b/mpm/lib/mykonos/ad937x_ctrl.cpp @@ -172,10 +172,11 @@ class ad937x_ctrl_impl : public ad937x_ctrl public: ad937x_ctrl_impl( std::shared_ptr<std::mutex> spi_mutex, + const size_t deserializer_lane_xbar, mpm::types::regs_iface::sptr iface, mpm::ad937x::gpio::gain_pins_t gain_pins) : spi_mutex(spi_mutex), - device(iface.get(), gain_pins), + device(iface.get(), deserializer_lane_xbar, gain_pins), _iface(iface) { /* nop */ @@ -550,10 +551,11 @@ private: ad937x_ctrl::sptr ad937x_ctrl::make( std::shared_ptr<std::mutex> spi_mutex, + const size_t deserializer_lane_xbar, mpm::types::regs_iface::sptr iface, mpm::ad937x::gpio::gain_pins_t gain_pins ) { - return std::make_shared<ad937x_ctrl_impl>(spi_mutex, iface, gain_pins); + return std::make_shared<ad937x_ctrl_impl>(spi_mutex, deserializer_lane_xbar, iface, gain_pins); } diff --git a/mpm/lib/mykonos/ad937x_device.cpp b/mpm/lib/mykonos/ad937x_device.cpp index 31fe7a459..e6941b52d 100644 --- a/mpm/lib/mykonos/ad937x_device.cpp +++ b/mpm/lib/mykonos/ad937x_device.cpp @@ -257,9 +257,10 @@ Initialization functions ad937x_device::ad937x_device( mpm::types::regs_iface* iface, + const size_t deserializer_lane_xbar, const gain_pins_t gain_pins) : full_spi_settings(iface), - mykonos_config(&full_spi_settings.spi_settings), + mykonos_config(&full_spi_settings.spi_settings, deserializer_lane_xbar), gain_ctrl(gain_pins) { } diff --git a/mpm/lib/mykonos/ad937x_device.hpp b/mpm/lib/mykonos/ad937x_device.hpp index 9219cbf8c..26bb01685 100644 --- a/mpm/lib/mykonos/ad937x_device.hpp +++ b/mpm/lib/mykonos/ad937x_device.hpp @@ -45,6 +45,7 @@ public: ad937x_device( mpm::types::regs_iface* iface, + const size_t deserializer_lane_xbar, mpm::ad937x::gpio::gain_pins_t gain_pins ); diff --git a/mpm/lib/mykonos/config/ad937x_config_t.cpp b/mpm/lib/mykonos/config/ad937x_config_t.cpp index c8e50c33d..b707400c8 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.cpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.cpp @@ -45,7 +45,7 @@ const int16_t ad937x_config_t::DEFAULT_SNIFFER_FIR_15366[DEFAULT_RX_FIR_SIZE] = -3988, -4942,-3512, 958, 8118,16519,23993,28395,28395,23993,16519, 8118, 958,-3512,-4942,-3988, -1871, 198, 1444, 1683, 1192, 440, -175, -466, -456, -283, -92, 30, 71, 59, 31, 10 }; -ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : +ad937x_config_t::ad937x_config_t(spiSettings_t* sps, const size_t deserializer_lane_xbar) : _rx(DEFAULT_RX_SETTINGS), _rxProfile(DEFAULT_RX_PROFILE), _framer(DEFAULT_FRAMER), @@ -57,7 +57,6 @@ ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : _tx(DEFAULT_TX_SETTINGS), _txProfile(DEFAULT_TX_PROFILE), _deframer(DEFAULT_DEFRAMER), - // TODO: Remove if ADI ever fixes this // The TX bring up requires a valid ORX profile // https://github.com/EttusResearch/uhddev/blob/f0f8f58471c3fed94279c32f00e9f8da7db40efd/mpm/lib/mykonos/adi/mykonos.c#L16590 @@ -89,6 +88,7 @@ ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : _sniffer_rx_fir_config(DEFAULT_RX_FIR_GAIN, std::vector<int16_t>(DEFAULT_SNIFFER_FIR, DEFAULT_SNIFFER_FIR + DEFAULT_RX_FIR_SIZE)) { _device.spiSettings = sps; + _deframer.deserializerLaneCrossbar = deserializer_lane_xbar; _init_pointers(); diff --git a/mpm/lib/mykonos/config/ad937x_config_t.hpp b/mpm/lib/mykonos/config/ad937x_config_t.hpp index c50f5f774..93b08a1df 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.hpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.hpp @@ -13,7 +13,7 @@ class ad937x_config_t : public boost::noncopyable { public: - ad937x_config_t(spiSettings_t* sps); + ad937x_config_t(spiSettings_t* sps, const size_t deserializer_lane_xbar); mykonosDevice_t * device; ad937x_fir rx_fir_config; |