diff options
author | Alex Williams <alex.williams@ni.com> | 2019-01-23 07:10:46 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-01-23 13:21:15 -0800 |
commit | 10ad1a6626c427d5a152d17ffd305932cb56bb70 (patch) | |
tree | a55775905d30b95df634c7ef214fe180a429d2f1 /mpm | |
parent | 3f77f6d5e0a63aed64d58fb8e8276b098cef2486 (diff) | |
download | uhd-10ad1a6626c427d5a152d17ffd305932cb56bb70.tar.gz uhd-10ad1a6626c427d5a152d17ffd305932cb56bb70.tar.bz2 uhd-10ad1a6626c427d5a152d17ffd305932cb56bb70.zip |
mpm: Fix up Rhodium EEPROM handling for BfrfsEEPROM
Fixes Rhodium for changes introduced in b7bab6a. The constructor call
for BfrfsEEPROM didn't match the signature, and Rhodium's EEPROM map
referred to the wrong revision.
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/rhodium.py | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/rhodium.py b/mpm/python/usrp_mpm/dboard_manager/rhodium.py index 70bf8c544..8e036aa81 100644 --- a/mpm/python/usrp_mpm/dboard_manager/rhodium.py +++ b/mpm/python/usrp_mpm/dboard_manager/rhodium.py @@ -161,7 +161,7 @@ class Rhodium(BfrfsEEPROM, DboardManagerBase): # Map I2C channel to slot index i2c_chan_map = {0: 'i2c-9', 1: 'i2c-10'} user_eeprom = { - 2: { # RevC + 0: { # dt-compat=0 'label': "e0004000.i2c", 'offset': 1024, 'max_size': 32786 - 1024, @@ -192,7 +192,7 @@ class Rhodium(BfrfsEEPROM, DboardManagerBase): 'TX' : 'TX_INSWITCH_CTRL'} def __init__(self, slot_idx, **kwargs): - super(Rhodium, self).__init__(slot_idx, **kwargs) + DboardManagerBase.__init__(self, slot_idx, **kwargs) self.log = get_logger("Rhodium-{}".format(slot_idx)) self.log.trace("Initializing Rhodium daughterboard, slot index %d", self.slot_idx) @@ -255,7 +255,7 @@ class Rhodium(BfrfsEEPROM, DboardManagerBase): self._lo_dist = None self.log.debug("Turning on Module and RF power supplies") self._power_on() - BfrfsEEPROM.__init__(self, self.rev, self.user_eeprom) + BfrfsEEPROM.__init__(self) self._spi_ifaces = _init_spi_devices() self.log.debug("Loaded SPI interfaces!") self.cpld = RhCPLD(self._spi_ifaces['cpld'], self.log) @@ -281,27 +281,6 @@ class Rhodium(BfrfsEEPROM, DboardManagerBase): self._daughterboard_gpio.set(FPGAtoDbGPIO.DB_POWER_ENABLE, 0) self._daughterboard_gpio.set(FPGAtoDbGPIO.RF_POWER_ENABLE, 0) - def _init_user_eeprom(self, eeprom_info): - """ - Reads out user-data EEPROM, and intializes a BufferFS object from that. - """ - self.log.trace("Initializing EEPROM user data...") - eeprom_paths = get_eeprom_paths(eeprom_info.get('label')) - self.log.trace("Found the following EEPROM paths: `{}'".format( - eeprom_paths)) - eeprom_path = eeprom_paths[self.slot_idx] - self.log.trace("Selected EEPROM path: `{}'".format(eeprom_path)) - user_eeprom_offset = eeprom_info.get('offset', 0) - self.log.trace("Selected EEPROM offset: %d", user_eeprom_offset) - user_eeprom_data = open(eeprom_path, 'rb').read()[user_eeprom_offset:] - self.log.trace("Total EEPROM size is: %d bytes", len(user_eeprom_data)) - return BufferFS( - user_eeprom_data, - max_size=eeprom_info.get('max_size'), - alignment=eeprom_info.get('alignment', 1024), - log=self.log - ), eeprom_path - def init(self, args): """ Execute necessary init dance to bring up dboard |