dts/extract_dts_includes.py: Expose flash partition extract function

Allow directly calling the flash partition extraction function and
remove passing any arguments that the function doesn't actually use.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2018-10-30 15:02:37 -05:00 committed by Kumar Gala
parent 6fd3fbbd22
commit 7c2a8a4678
2 changed files with 2 additions and 5 deletions

View file

@ -19,7 +19,7 @@ class DTFlash(DTDirective):
# Node of the flash
self._flash_node = None
def _extract_partition(self, node_address, yaml, prop):
def extract_partition(self, node_address):
prop_def = {}
prop_alias = {}
node = reduced[node_address]
@ -129,9 +129,6 @@ class DTFlash(DTDirective):
elif prop == 'zephyr,code-partition':
# indicator for code_partition
self._extract_code_partition(node_address, yaml, prop, def_label)
elif prop == 'reg':
# indicator for partition
self._extract_partition(node_address, yaml, prop)
else:
raise Exception(
"DTFlash.extract called with unexpected directive ({})."

View file

@ -428,7 +428,7 @@ def extract_node_include_info(reduced, root_node_address, sub_node_address,
# extract a few different defines for a flash partition so its
# easier to handle the partition node in one step
if 'partition@' in sub_node_address:
flash.extract(sub_node_address, yaml, 'reg', None)
flash.extract_partition(sub_node_address)
continue
# Handle each property individually, this ends up handling common