diff options
| author | Tom Rini <[email protected]> | 2025-01-22 16:08:34 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-22 17:08:47 -0600 |
| commit | a3b71cc6f5cc74d4edc5808790a3d2999ea3f7fe (patch) | |
| tree | bf148f9145392c695ffb623ef8c307a4a3fe8e82 /include/dm | |
| parent | 2eed5a1ff36217372e19f7513bd07077fc76718a (diff) | |
| parent | 8985ff56b16dc6c04da2c96d48e7f6f54d04e3ff (diff) | |
Merge patch series "upl: Prerequite patches for updated spec"
Simon Glass <[email protected]> says:
The current UPL spec[1] has been tidied up and improved over the last
year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL
patches. It is split from [2]
[1] https://github.com/UniversalPayload/spec/tree/3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/dm')
| -rw-r--r-- | include/dm/ofnode.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 890f0e6cf40..120393426db 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -386,16 +386,29 @@ static inline oftree oftree_from_np(struct device_node *root) void oftree_dispose(oftree tree); /** - * ofnode_name_eq() - Check if the node name is equivalent to a given name - * ignoring the unit address + * ofnode_name_eq() - Check a node name ignoring its unit address * - * @node: valid node reference that has to be compared - * @name: name that has to be compared with the node name + * @node: valid node to compared, which may have a unit address + * @name: name (without unit address) to compare with the node name * Return: true if matches, false if it doesn't match */ bool ofnode_name_eq(ofnode node, const char *name); /** + * ofnode_name_eq_unit() - Check a node name ignoring its unit address + * + * This is separate from ofnode_name_eq() to avoid code-size increase for + * boards which don't need this function + * + * @node: valid node to compared, which may have a unit address + * @name: name to compare with the node name. If this contains a unit + * address, it is matched, otherwise the unit address is ignored + * when searching for matches + * Return: true if matches, false if it doesn't match + */ +bool ofnode_name_eq_unit(ofnode node, const char *name); + +/** * ofnode_read_u8() - Read a 8-bit integer from a property * * @node: valid node reference to read property from @@ -594,6 +607,18 @@ bool ofnode_read_bool(ofnode node, const char *propname); */ ofnode ofnode_find_subnode(ofnode node, const char *subnode_name); +/** + * ofnode_find_subnode_unit() - find a named subnode of a parent node + * + * @node: valid reference to parent node + * @subnode_name: name of subnode to find, including any unit address. If the + * unit address is omitted, any subnode which matches the name (excluding + * any unit address) is returned + * Return: reference to subnode (which can be invalid if there is no such + * subnode) + */ +ofnode ofnode_find_subnode_unit(ofnode node, const char *subnode_name); + #if CONFIG_IS_ENABLED(DM_INLINE_OFNODE) #include <asm/global_data.h> @@ -1809,7 +1834,7 @@ static inline int ofnode_read_bootscript_flash(u64 *bootscr_flash_offset, * of_add_subnode() - add a new subnode to a node * * @parent: parent node to add to - * @name: name of subnode + * @name: name of subnode (allocated by this function) * @nodep: returns pointer to new subnode (valid if the function returns 0 * or -EEXIST) * Returns 0 if OK, -EEXIST if already exists, -ENOMEM if out of memory, other |
