mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-17 06:08:28 +00:00
m1n1.adt: Add pmap-io-ranges parsing
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
1e787e9d02
commit
c76851ae11
1 changed files with 13 additions and 1 deletions
|
@ -42,6 +42,13 @@ STD_PROPERTIES = {
|
|||
"power-gates": SafeGreedyRange(Int32ul),
|
||||
}
|
||||
|
||||
PMAPIORanges = SafeGreedyRange(Struct(
|
||||
"addr" / Hex(Int64ul),
|
||||
"size" / Hex(Int64ul),
|
||||
"flags" / Hex(Int32ul),
|
||||
"name" / FourCC,
|
||||
))
|
||||
|
||||
PMGRPSRegs = SafeGreedyRange(Struct(
|
||||
"reg" / Int32ul,
|
||||
"offset" / Hex(Int32ul),
|
||||
|
@ -157,6 +164,11 @@ DEV_PROPERTIES = {
|
|||
"clock-frequencies-nclk": SafeGreedyRange(Int32ul),
|
||||
},
|
||||
},
|
||||
"defaults": {
|
||||
"*": {
|
||||
"pmap-io-ranges": PMAPIORanges,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def parse_prop(node, path, node_name, name, v, is_template=False):
|
||||
|
@ -179,7 +191,7 @@ def parse_prop(node, path, node_name, name, v, is_template=False):
|
|||
try:
|
||||
compat = node.compatible[0]
|
||||
except AttributeError:
|
||||
return None, v
|
||||
compat = ""
|
||||
|
||||
for compat_match, cprops in dev_props.items():
|
||||
if fnmatch.fnmatch(compat, compat_match):
|
||||
|
|
Loading…
Add table
Reference in a new issue