aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-05-07 18:22:52 -0700
committerMartin Braun <martin.braun@ettus.com>2018-06-08 13:27:13 -0700
commit22d684c3c8db8644cbdaf7b2955048050007ec30 (patch)
tree74af816cdb9eee199d2bcb111687cd1613d0045e /mpm/python
parentcd716e264e6e9243d34d49979a5d42214ecbbc44 (diff)
downloaduhd-22d684c3c8db8644cbdaf7b2955048050007ec30.tar.gz
uhd-22d684c3c8db8644cbdaf7b2955048050007ec30.tar.bz2
uhd-22d684c3c8db8644cbdaf7b2955048050007ec30.zip
mpm: Use device_info to determine overlay list
Diffstat (limited to 'mpm/python')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py12
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n3xx.py4
2 files changed, 7 insertions, 9 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index 7d811af3f..d1f2c9f92 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -141,7 +141,7 @@ class PeriphManagerBase(object):
@staticmethod
# Yes, this is overridable too: List the required device tree overlays
- def list_required_dt_overlays(eeprom_md, device_args):
+ def list_required_dt_overlays(device_info):
"""
Lists device tree overlays that need to be applied before this class can
be used. List of strings.
@@ -181,10 +181,9 @@ class PeriphManagerBase(object):
self.mboard_info,
dboard_infos
)
- self.log.warning(self.device_info)
self._default_args = self._update_default_args(args)
self.log.debug("Using default args: {}".format(self._default_args))
- self._init_mboard_overlays(self._eeprom_head, self._default_args)
+ self._init_mboard_overlays()
override_db_pids_str = self._default_args.get('override_db_pids')
if override_db_pids_str:
override_db_pids = [
@@ -346,15 +345,14 @@ class PeriphManagerBase(object):
else:
return default_args
- def _init_mboard_overlays(self, eeprom_md, device_args):
+ def _init_mboard_overlays(self):
"""
Load all required overlays for this motherboard
"""
requested_overlays = self.list_required_dt_overlays(
- eeprom_md,
- device_args,
+ self.device_info,
)
- self.log.trace("Motherboard requests device tree overlays: {}".format(
+ self.log.debug("Motherboard requests device tree overlays: {}".format(
requested_overlays
))
for overlay in requested_overlays:
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py
index 2887df052..0b7c40c24 100644
--- a/mpm/python/usrp_mpm/periph_manager/n3xx.py
+++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py
@@ -166,7 +166,7 @@ class n3xx(PeriphManagerBase):
return device_info
@staticmethod
- def list_required_dt_overlays(eeprom_md, device_args):
+ def list_required_dt_overlays(device_info):
"""
Lists device tree overlays that need to be applied before this class can
be used. List of strings.
@@ -177,7 +177,7 @@ class n3xx(PeriphManagerBase):
"""
# In the N3xx case, we name the dtbo file the same as the product.
# N310 -> n310.dtbo, N300 -> n300.dtbo and so on.
- return [n3xx.pids[eeprom_md['pid']]]
+ return [device_info['product']]
###########################################################################
# Ctor and device initialization tasks