Skip to content

Commit

Permalink
openamp: xlnx: move TTC removal logic to end of xlnx_openamp_parse
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Levinsky <[email protected]>
  • Loading branch information
bentheredonethat authored and zeddii committed Mar 5, 2025
1 parent 5e8f6d2 commit 228082d
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions lopper/assists/openamp_xlnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,13 +1183,6 @@ def xlnx_rpmsg_parse(tree, node, openamp_channel_info, options, xlnx_options = N
if not ret:
return ret

if role == 'host':
for node in tree["/"].subnodes():
if "cdns,ttc" in node.propval('compatible'):
tree.delete(node)

xlnx_openamp_remove_channels(tree)

# remove definitions
try:
defn_node = tree["/definitions"]
Expand Down Expand Up @@ -1917,6 +1910,29 @@ def xlnx_openamp_parse(sdt, options, xlnx_options = None, verbose = 0 ):
if ret == False:
return ret

opts,args2 = getopt.getopt( args, "", [ "openamp_role=" ] )
if opts == [] and args2 == []:
print('ERROR: No arguments passed for OpenAMP Module. Erroring out now.')
return False

role = None
if xlnx_options != None:
role = xlnx_options["openamp_role"]
else:
for o,a in opts:
if o in ('-l', "--openamp_role"):
role = a
else:
print("Argument: ",o, " is not recognized. Erroring out.")
return False

if role == 'host':
for node in tree["/"].subnodes():
if "cdns,ttc" in node.propval('compatible'):
tree.delete(node)

xlnx_openamp_remove_channels(tree)

return True

def xlnx_openamp_rpmsg_expand(tree, subnode, verbose = 0 ):
Expand Down

0 comments on commit 228082d

Please sign in to comment.