m1n1/proxyclient/hv/trace_gpio.py
Janne Grunau de82209079 m1n1.trace.gpio: convert GPIOTracer to new framework
Signed-off-by: Janne Grunau <j@jannau.net>
2021-06-18 14:23:23 +09:00

16 lines
533 B
Python

# SPDX-License-Identifier: MIT
from m1n1.trace.gpio import GPIOTracer
#trace_device("/arm-io/gpio", True)
# trace gpio interrups, useful to follow the cascaded interrupts
aic_phandle = getattr(hv.adt["/arm-io/aic"], "AAPL,phandle")
node = hv.adt["/arm-io/gpio"]
if getattr(node, "interrupt-parent") == aic_phandle:
for irq in getattr(node, "interrupts"):
hv.trace_irq(node.name, irq, 1, hv.IRQTRACE_IRQ)
GPIOTracer = GPIOTracer._reloadcls()
gpio_tracer = GPIOTracer(hv, "/arm-io/gpio", verbose=0)
gpio_tracer.start()