mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
dm: core: Allow writing to a flat tree with ofnode
In generally it is not permitted to implement an ofnode function only for flat tree or live tree. Both must be supported. Also the code for live tree access should be in of_access.c rather than ofnode.c which is really just for holding the API-conversion code. Update ofnode_write_prop() accordingly and fix the test so it can work with flat tree too. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
7b1dfc9fd7
commit
39e42be12b
5 changed files with 85 additions and 53 deletions
|
@ -519,4 +519,16 @@ int of_alias_get_highest_id(const char *stem);
|
|||
*/
|
||||
struct device_node *of_get_stdout(void);
|
||||
|
||||
/**
|
||||
* of_write_prop() - Write a property to the device tree
|
||||
*
|
||||
* @np: device node to which the property value is to be written
|
||||
* @propname: name of the property to write
|
||||
* @value: value of the property
|
||||
* @len: length of the property in bytes
|
||||
* Returns: 0 if OK, -ve on error
|
||||
*/
|
||||
int of_write_prop(struct device_node *np, const char *propname, int len,
|
||||
const void *value);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue