From 36dcc1b8f3c4b9952b25d1f2040c7189fe24f03c Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 12 Jun 2021 11:22:51 +0200 Subject: [PATCH] hv.py: remove only the used USB-C port from the ADT Signed-off-by: Janne Grunau --- proxyclient/m1n1/hv.py | 45 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/proxyclient/m1n1/hv.py b/proxyclient/m1n1/hv.py index a4f6fbfd..c0f835d2 100644 --- a/proxyclient/m1n1/hv.py +++ b/proxyclient/m1n1/hv.py @@ -894,29 +894,28 @@ class HV(Reloadable): if self.iodev in (IODEV.USB0, IODEV.USB1): idx = int(str(self.iodev)[-1]) - for idx in (0, 1): - for prefix in ("/arm-io/dart-usb%d", - "/arm-io/atc-phy%d", - "/arm-io/usb-drd%d", - "/arm-io/acio%d", - "/arm-io/acio-cpu%d", - "/arm-io/dart-acio%d", - "/arm-io/apciec%d", - "/arm-io/dart-apciec%d", - "/arm-io/apciec%d-piodma", - "/arm-io/i2c0/hpmBusManager/hpm%d", - "/arm-io/atc%d-dpxbar", - "/arm-io/atc%d-dpphy", - "/arm-io/atc%d-dpin0", - "/arm-io/atc%d-dpin1", - "/arm-io/atc-phy%d", - ): - name = prefix % idx - print(f"Removing ADT node {name}") - try: - del self.adt[name] - except KeyError: - pass + for prefix in ("/arm-io/dart-usb%d", + "/arm-io/atc-phy%d", + "/arm-io/usb-drd%d", + "/arm-io/acio%d", + "/arm-io/acio-cpu%d", + "/arm-io/dart-acio%d", + "/arm-io/apciec%d", + "/arm-io/dart-apciec%d", + "/arm-io/apciec%d-piodma", + "/arm-io/i2c0/hpmBusManager/hpm%d", + "/arm-io/atc%d-dpxbar", + "/arm-io/atc%d-dpphy", + "/arm-io/atc%d-dpin0", + "/arm-io/atc%d-dpin1", + "/arm-io/atc-phy%d", + ): + name = prefix % idx + print(f"Removing ADT node {name}") + try: + del self.adt[name] + except KeyError: + pass for name in ("/cpus/cpu1", "/cpus/cpu2", "/cpus/cpu3",