mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-03-17 06:56:59 +00:00
m1n1.adt: Parse 'dma-channels' of DMA-enabled peripherals
Signed-off-by: Martin Povišer <povik@cutebit.org>
This commit is contained in:
parent
f8b13927f2
commit
f8e08ebe22
1 changed files with 14 additions and 0 deletions
|
@ -276,6 +276,17 @@ ASCSegmentRange = Struct(
|
|||
"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": {
|
||||
"*": {
|
||||
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue