2021-06-11 21:01:47 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2021-06-17 20:53:09 +00:00
|
|
|
from m1n1.trace.gpio import GPIOTracer
|
2021-06-11 21:01:47 +00:00
|
|
|
|
2021-06-17 20:53:09 +00:00
|
|
|
#trace_device("/arm-io/gpio", True)
|
2021-06-11 21:01:47 +00:00
|
|
|
|
|
|
|
# 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)
|
|
|
|
|
2021-06-17 20:53:09 +00:00
|
|
|
GPIOTracer = GPIOTracer._reloadcls()
|
|
|
|
gpio_tracer = GPIOTracer(hv, "/arm-io/gpio", verbose=0)
|
|
|
|
gpio_tracer.start()
|