Skip to content

Commit

Permalink
soc: intel_adsp: tools: add cavstool.py fallback for PCI class
Browse files Browse the repository at this point in the history
If no PCI device with DSP capability is reported, also try to
find compatible devices using PCI_CLASS=40300. This is mostly
useful on preproduction systems where incorrect PCI class data
is reported.

Signed-off-by: Kai Vehmanen <[email protected]>
  • Loading branch information
kv2019i authored and kartben committed Jan 7, 2025
1 parent a9097c9 commit 76dc24b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion soc/intel/intel_adsp/tools/cavstool.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ def adsp_mem_window_config():
return (base, stride)

def map_regs(log_only):
p = runx(f"grep -iEl 'PCI_CLASS=40(10|38)0' /sys/bus/pci/devices/*/uevent")
try:
p = runx(f"grep -iEl 'PCI_CLASS=40(10|38)0' /sys/bus/pci/devices/*/uevent")
except subprocess.CalledProcessError:
# if no device found, also try 40300 class no-DSP devices
p = runx(f"grep -iEl 'PCI_CLASS=40300' /sys/bus/pci/devices/*/uevent")
pcidir = os.path.dirname(p)

# Platform/quirk detection. ID lists cribbed from the SOF kernel driver
Expand Down

0 comments on commit 76dc24b

Please sign in to comment.