device: simplify structure of handles array
Force the inclusion of a `DEVICE_HANDLE_SEP` at the end of the devicetree dependency section of the array. This lets us simplify the implementation of `device_required_handles_get`, as there is only one symbol the section ends with. This does not use any extra ROM as the array is padded out to the original size with `DEVICE_HANDLE_ENDS` anyway. Also adds a description of the array format where the array is instantiated. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
b5c4140afb
commit
ec331c6fe2
2 changed files with 19 additions and 3 deletions
|
@ -294,10 +294,11 @@ def main():
|
|||
dep_paths.append(dn.path)
|
||||
else:
|
||||
dep_paths.append('(%s)' % dn.path)
|
||||
# Force separator to signal start of injected dependencies
|
||||
hdls.append(DEVICE_HANDLE_SEP)
|
||||
if len(hs.ext_deps) > 0:
|
||||
# TODO: map these to something smaller?
|
||||
ext_paths.extend(map(str, hs.ext_deps))
|
||||
hdls.append(DEVICE_HANDLE_SEP)
|
||||
hdls.extend(hs.ext_deps)
|
||||
|
||||
# When CONFIG_USERSPACE is enabled the pre-built elf is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue