diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2019-09-10 15:44:40 -0500 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-09-24 17:23:44 -0700 |
commit | f47d805cc3999a98055c9a1ee132a40c2f58d515 (patch) | |
tree | 489f871adf78b3e46dc4e58fcee40103a2f1e01e /mpm | |
parent | 22b9593dce1ad034ef84ee3609d2ccbceeb33098 (diff) | |
download | uhd-f47d805cc3999a98055c9a1ee132a40c2f58d515.tar.gz uhd-f47d805cc3999a98055c9a1ee132a40c2f58d515.tar.bz2 uhd-f47d805cc3999a98055c9a1ee132a40c2f58d515.zip |
mpm: fixed mboard_max_revision value
This value should be 9 to correspond with the rev J motherboards.
This property was renamed to mboard_last_rev_compat in a previous commit.
But mboard_max_rev is actually a more accurate description,
since it specifies the latest hardware revision that the software
is aware of. I renamed all references back to mboard_max_rev.
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/python/usrp_mpm/bist.py | 2 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/base.py | 19 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/e320.py | 2 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n3xx.py | 2 |
4 files changed, 10 insertions, 15 deletions
diff --git a/mpm/python/usrp_mpm/bist.py b/mpm/python/usrp_mpm/bist.py index 7957f2f37..e26d6d36c 100644 --- a/mpm/python/usrp_mpm/bist.py +++ b/mpm/python/usrp_mpm/bist.py @@ -495,7 +495,7 @@ class UsrpBIST(object): # If this is true, trigger a reload of the default FPGA image self.reload_fpga_image = False try: - default_rev = self.get_mb_periph_mgr().mboard_last_rev_compat + default_rev = self.get_mb_periph_mgr().mboard_max_rev except ImportError: # This means we're in dry run mode or something like that, so just # pick something diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index a3adc56c8..430082604 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -85,7 +85,7 @@ class PeriphManagerBase(object): # For checking revision numbers, this is the highest revision that this # particular version of MPM supports. Leave at None to skip a max rev # check. - mboard_last_rev_compat = None + mboard_max_rev = None # A list of available sensors on the motherboard. This dictionary is a map # of the form sensor_name -> method name mboard_sensor_callback_map = {} @@ -288,15 +288,10 @@ class PeriphManagerBase(object): ) raise RuntimeError("Invalid PID found in EEPROM.") # The rev_compat is either directly stored in the EEPROM, or we fall - # back first to the dt_compat, then the rev itself (because every rev is - # compatible with itself). - # The dt_compat solution is a technically a hack, but it works because - # all hardware we have released until we made this change happened to - # have a dt_compat that also works as a rev_compat. + # back to the the rev itself (because every rev is compatible with + # itself). rev_compat = \ - eeprom_head.get('rev_compat', - eeprom_head.get('dt_compat', - eeprom_head.get('rev'))) + eeprom_head.get('rev_compat', eeprom_head.get('rev')) try: rev_compat = int(rev_compat) except (ValueError, TypeError): @@ -307,16 +302,16 @@ class PeriphManagerBase(object): # In order for the software to be able to understand the hardware, the # rev_compat value (stored on the EEPROM) must be smaller or equal to # the value stored in the software itself. - if self.mboard_last_rev_compat is None: + if self.mboard_max_rev is None: self.log.warning("Skipping HW/SW compatibility check!") else: - if rev_compat > self.mboard_last_rev_compat: + if rev_compat > self.mboard_max_rev: raise RuntimeError( "Software is maximally compatible with revision `{}', but " "the hardware has revision `{}' and is minimally compatible " "with hardware revision `{}'. Please upgrade your version of" "MPM in order to use this device." - .format(self.mboard_last_rev_compat, mboard_info['rev'], rev_compat) + .format(self.mboard_max_rev, mboard_info['rev'], rev_compat) ) return mboard_info diff --git a/mpm/python/usrp_mpm/periph_manager/e320.py b/mpm/python/usrp_mpm/periph_manager/e320.py index 3135a6994..ced2f398b 100644 --- a/mpm/python/usrp_mpm/periph_manager/e320.py +++ b/mpm/python/usrp_mpm/periph_manager/e320.py @@ -78,7 +78,7 @@ class e320(ZynqComponents, PeriphManagerBase): mboard_info = {"type": "e3xx", "product": "e320" } - mboard_last_rev_compat = 0 + mboard_max_rev = 0 mboard_sensor_callback_map = { 'ref_locked': 'get_ref_lock_sensor', 'gps_locked': 'get_gps_lock_sensor', diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py index 3e53ba854..3eb9e709c 100644 --- a/mpm/python/usrp_mpm/periph_manager/n3xx.py +++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py @@ -131,7 +131,7 @@ class n3xx(ZynqComponents, PeriphManagerBase): mboard_eeprom_offset = 0 mboard_eeprom_max_len = 256 mboard_info = {"type": "n3xx"} - mboard_last_rev_compat = 5 # last known compat through dt_compat field + mboard_max_rev = 9 # latest HW revision that this version of MPM is aware of mboard_sensor_callback_map = { 'ref_locked': 'get_ref_lock_sensor', 'gps_locked': 'get_gps_lock_sensor', |