aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-17 11:58:57 -0700
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-07-18 17:55:50 -0700
commit118e7a21bf95e82a13e4916016123695c7327062 (patch)
treeb38543d31e7e2c8f74f416ac47a7f96890b0ebc8 /mpm
parenta308d2e02479d671d5bf0618907b484c47168392 (diff)
downloaduhd-118e7a21bf95e82a13e4916016123695c7327062.tar.gz
uhd-118e7a21bf95e82a13e4916016123695c7327062.tar.bz2
uhd-118e7a21bf95e82a13e4916016123695c7327062.zip
mpm: n3xx: Init device on boot
Specify skip_boot_init=1 to not init during boot. This will increase boot time for an N310, typically by around 15 seconds.
Diffstat (limited to 'mpm')
-rwxr-xr-xmpm/python/usrp_hwd.py4
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n3xx.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/mpm/python/usrp_hwd.py b/mpm/python/usrp_hwd.py
index d04d04927..a09ea95ed 100755
--- a/mpm/python/usrp_hwd.py
+++ b/mpm/python/usrp_hwd.py
@@ -174,6 +174,10 @@ def main():
if len(mpm.__githash__):
version_string += "-g" + mpm.__githash__
log.info("Launching USRP/MPM, version: %s", version_string)
+ if args.init_only:
+ # If --init-only is provided, we force disable init during boot time so
+ # we can properly time it in init_only().
+ args.default_args['skip_boot_init'] = "1"
if args.override_db_pids is not None:
log.warning('Overriding daughterboard PIDs!')
args.default_args['override_db_pids'] = args.override_db_pids
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py
index bec7aa6fe..783ea4ca2 100644
--- a/mpm/python/usrp_mpm/periph_manager/n3xx.py
+++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py
@@ -197,6 +197,11 @@ class n3xx(ZynqComponents, PeriphManagerBase):
self.log.error("Failed to initialize motherboard: %s", str(ex))
self._initialization_status = str(ex)
self._device_initialized = False
+ try:
+ if not args.get('skip_boot_init', False):
+ self.init(args)
+ except Exception as ex:
+ self.log.warning("Failed to init device on boot!")
def _check_fpga_compat(self):
" Throw an exception if the compat numbers don't match up "