diff options
author | RobertWalstab <robert.walstab@gmail.com> | 2020-07-14 10:55:35 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-07-20 16:01:03 -0500 |
commit | 1d3866bef4e4677b95d3364b94880d7823d2530f (patch) | |
tree | 4ab0fe6879f60c4c8c3e007ae92acd11b82fbd2f /mpm/python | |
parent | 46f61951e88d8936814095bf2f8db014b6ff67e6 (diff) | |
download | uhd-1d3866bef4e4677b95d3364b94880d7823d2530f.tar.gz uhd-1d3866bef4e4677b95d3364b94880d7823d2530f.tar.bz2 uhd-1d3866bef4e4677b95d3364b94880d7823d2530f.zip |
uhd: remove liberio
Diffstat (limited to 'mpm/python')
-rw-r--r-- | mpm/python/usrp_mpm/CMakeLists.txt | 1 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/liberiotable.py | 60 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/base.py | 7 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/e320.py | 3 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/xports/CMakeLists.txt | 1 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/xports/__init__.py | 1 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/xports/xportmgr_liberio.py | 74 |
7 files changed, 1 insertions, 146 deletions
diff --git a/mpm/python/usrp_mpm/CMakeLists.txt b/mpm/python/usrp_mpm/CMakeLists.txt index e4332a617..9ea114e0b 100644 --- a/mpm/python/usrp_mpm/CMakeLists.txt +++ b/mpm/python/usrp_mpm/CMakeLists.txt @@ -18,7 +18,6 @@ set(USRP_MPM_TOP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/e31x_legacy_eeprom.py ${CMAKE_CURRENT_SOURCE_DIR}/ethdispatch.py ${CMAKE_CURRENT_SOURCE_DIR}/gpsd_iface.py - ${CMAKE_CURRENT_SOURCE_DIR}/liberiotable.py ${CMAKE_CURRENT_SOURCE_DIR}/mpmlog.py ${CMAKE_CURRENT_SOURCE_DIR}/mpmtypes.py ${CMAKE_CURRENT_SOURCE_DIR}/mpmutils.py diff --git a/mpm/python/usrp_mpm/liberiotable.py b/mpm/python/usrp_mpm/liberiotable.py deleted file mode 100644 index d732eedcb..000000000 --- a/mpm/python/usrp_mpm/liberiotable.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright 2017 Ettus Research, a National Instruments Company -# -# SPDX-License-Identifier: GPL-3.0-or-later -# -""" -Liberio DMA dispatcher table control -""" - -from builtins import str -from builtins import object -from usrp_mpm.mpmlog import get_logger -from usrp_mpm.sys_utils.uio import UIO - -class LiberioDispatcherTable(object): - """ - Controls a Liberio DMA dispatcher table. - - label -- A label that can be used by udev to find a UIO device - """ - - def __init__(self, label): - self.log = get_logger(label) - self._regs = UIO(label=label, read_only=False) - self.poke32 = self._regs.poke32 - self.peek32 = self._regs.peek32 - - def set_route(self, sid, dma_channel): - """ - Sets up routing in the Liberio dispatcher. From sid, only the - destination part is important. After this call, any CHDR packet with the - appropriate destination address will get routed to `dma_channel`. - - sid -- Full SID, but only destination part matters. - dma_channel -- The DMA channel to which these packets should get routed. - """ - self.log.debug( - "Routing SID `{sid}' to DMA channel `{chan}'.".format( - sid=str(sid), chan=dma_channel - ) - ) - def poke_and_trace(addr, data): - " Do a poke32() and log.trace() " - self.log.trace("Writing to address 0x{:04X}: 0x{:04X}".format( - addr, data - )) - self.poke32(addr, data) - # Poke reg for destination channel - try: - with self._regs: - poke_and_trace( - 0 + 4 * sid.dst_ep, - dma_channel, - ) - except Exception as ex: - self.log.error( - "Unexpected exception while setting route: %s", - str(ex), - ) - raise diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index c13fb58bc..09f66a2d4 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -845,11 +845,9 @@ class PeriphManagerBase(object): The return value is a list of strings. Every string is a key for a transport type. Values include: - "udp": Means this device can be reached via UDP - - "liberio": Means this device can be reached via Liberio (local DMA) The list is filtered based on what the device knows about where the UHD - session is. For example, on an N310, it will only either return "UDP" - or "Liberio", depending on if we're remotely launching UHD, or locally. + session is. For example, on an N310, it will only return "UDP". In order to get further information about how to connect to the device, the keys returned from this function can be used with @@ -870,9 +868,6 @@ class PeriphManagerBase(object): - port (UDP port) - link_rate (bps of the link, e.g. 10e9 for 10GigE) - For Liberio, every entry has the following keys: - - tx_dev: TX device (/dev/tx-dma*) - - rx_dev: RX device (/dev/rx-dma*) """ raise NotImplementedError("get_chdr_link_options() not implemented.") diff --git a/mpm/python/usrp_mpm/periph_manager/e320.py b/mpm/python/usrp_mpm/periph_manager/e320.py index 2f34a8ce1..dc91b20d9 100644 --- a/mpm/python/usrp_mpm/periph_manager/e320.py +++ b/mpm/python/usrp_mpm/periph_manager/e320.py @@ -394,9 +394,6 @@ class e320(ZynqComponents, PeriphManagerBase): - port (UDP port) - link_rate (bps of the link, e.g. 10e9 for 10GigE) - For Liberio, every entry has the following keys: - - tx_dev: TX device (/dev/tx-dma*) - - rx_dev: RX device (/dev/rx-dma*) """ if xport_type not in self._xport_mgrs: self.log.warning("Can't get link options for unknown link type: `{}'." diff --git a/mpm/python/usrp_mpm/xports/CMakeLists.txt b/mpm/python/usrp_mpm/xports/CMakeLists.txt index e89fcec9b..bd5ddcf36 100644 --- a/mpm/python/usrp_mpm/xports/CMakeLists.txt +++ b/mpm/python/usrp_mpm/xports/CMakeLists.txt @@ -8,7 +8,6 @@ set(USRP_MPM_FILES ${USRP_MPM_FILES}) set(USRP_MPM_XPORT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${CMAKE_CURRENT_SOURCE_DIR}/xportmgr_udp.py - ${CMAKE_CURRENT_SOURCE_DIR}/xportmgr_liberio.py ) list(APPEND USRP_MPM_FILES ${USRP_MPM_XPORT_FILES}) set(USRP_MPM_FILES ${USRP_MPM_FILES} PARENT_SCOPE) diff --git a/mpm/python/usrp_mpm/xports/__init__.py b/mpm/python/usrp_mpm/xports/__init__.py index e3e2bc89b..e96208361 100644 --- a/mpm/python/usrp_mpm/xports/__init__.py +++ b/mpm/python/usrp_mpm/xports/__init__.py @@ -8,4 +8,3 @@ Transport managers """ from .xportmgr_udp import XportMgrUDP -from .xportmgr_liberio import XportMgrLiberio diff --git a/mpm/python/usrp_mpm/xports/xportmgr_liberio.py b/mpm/python/usrp_mpm/xports/xportmgr_liberio.py deleted file mode 100644 index 1b4f87fbf..000000000 --- a/mpm/python/usrp_mpm/xports/xportmgr_liberio.py +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright 2017 Ettus Research, a National Instruments Company -# -# SPDX-License-Identifier: GPL-3.0-or-later -# -""" -Liberio Transport manager -""" - -from builtins import object -import pyudev - -class XportMgrLiberio(object): - """ - Transport manager for Liberio connections - """ - # udev label for the UIO device that controls the DMA engine - liberio_label = 'liberio' - # Number of available DMA channels - max_chan = 4 - - def __init__(self, log, max_chan=-1): - self.log = log.getChild('Liberio') - if max_chan < 0: - context = pyudev.Context() - rx_of_nodes = list(context.list_devices(subsystem="platform", - OF_COMPATIBLE_0="ettus,usrp-rx-dma")) - tx_of_nodes = list(context.list_devices(subsystem="platform", - OF_COMPATIBLE_0="ettus,usrp-tx-dma")) - self.max_chan = min(len(rx_of_nodes), len(tx_of_nodes)) - self.log.debug("Found {} channels".format(self.max_chan)) - else: - self.max_chan = max_chan - self.log.debug("Reporting {} channels".format(self.max_chan)) - - def init(self, args): - """ - Call this when the user calls 'init' on the periph manager - """ - pass - - def deinit(self): - " Clean up after a session terminates " - pass - - def get_xport_info(self): - """ - Returns a dictionary of useful information, e.g. for appending into the - device info. - - Note: This can be run by callers not owning a claim, even when the - device has been claimed by someone else. - - In this case, returns an empty dict. - """ - assert hasattr(self, 'log') - return {} - - def get_chdr_link_options(self): - """ - Returns a list of dictionaries for returning by - PeriphManagerBase.get_chdr_link_options(). - - Note: This requires a claim, which means that init() was called, and - deinit() was not yet called. - """ - return [ - { - 'tx_dev': "/dev/tx-dma{}".format(chan), - 'rx_dev': "/dev/rx-dma{}".format(chan), - 'dma_chan': str(chan), - } - for chan in range(self.max_chan) - ] |