Skip to content

Commit

Permalink
m1n1.adt: Parse 'dma-channels' of DMA-enabled peripherals
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Povišer <[email protected]>
  • Loading branch information
povik committed Nov 18, 2023
1 parent f8b1392 commit f8e08eb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions proxyclient/m1n1/adt.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,17 @@
"flags" / Hex(Int32ul),
)

DMAChannelsData = Struct(
"channo" / Hex(Int32ul),
"datashape" / Hex(Int32ul),
"timeout" / Hex(Int32ul),
"limit" / Hex(Int32ul),
"threshold" / Hex(Int32ul),
"unk1" / Hex(Int32ul),
"unk2" / Hex(Int32ul),
"unk3" / Hex(Int32ul),
)

DEV_PROPERTIES = {
"pmgr": {
"*": {
Expand Down Expand Up @@ -477,6 +488,9 @@ def parse_prop(node, path, node_name, name, v, is_template=False):
# parsing this correctly would require a second pass
t = Array(len(v) // 4, Int32ul)

elif name == "dma-channels":
t = SafeGreedyRange(DMAChannelsData)

elif name == "segment-ranges":
t = SafeGreedyRange(ASCSegmentRange)

Expand Down

0 comments on commit f8e08eb

Please sign in to comment.