soc/intel_adsp: cavstool: don't unload driver when --log-only
Audio users want logging too. This restores feature parity since the
older scripts were removed in commit
cd5302fa00
("boards/intel_adsp_cavs15: Remove ancient tooling")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
40b38d5e48
commit
98f66d7564
1 changed files with 6 additions and 2 deletions
|
@ -37,8 +37,12 @@ def map_regs():
|
|||
# Check sysfs for a loaded driver and remove it
|
||||
if os.path.exists(f"{pcidir}/driver"):
|
||||
mod = os.path.basename(os.readlink(f"{pcidir}/driver/module"))
|
||||
log.warning(f"Existing driver found! Unloading \"{mod}\" module")
|
||||
runx(f"rmmod -f {mod}")
|
||||
found_msg = f"Existing driver \"{mod}\" found"
|
||||
if args.log_only:
|
||||
log.info(found_msg)
|
||||
else:
|
||||
log.warning(found_msg + ", unloading module")
|
||||
runx(f"rmmod -f {mod}")
|
||||
|
||||
# Disengage runtime power management so the kernel doesn't put it to sleep
|
||||
with open(f"{pcidir}/power/control", "w") as ctrl:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue