mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
dm: core: Add ofnode_read_resource()
We sometimes need to read a resource from an arbitrary node. In any case for consistency we should not put the live-tree switching code in a dev_read_...() function. Update this to suit. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1 Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
/* Enable checks to protect against invalid calls */
|
||||
#undef OF_CHECKS
|
||||
|
||||
struct resource;
|
||||
|
||||
/**
|
||||
* ofnode - reference to a device tree node
|
||||
*
|
||||
@@ -605,4 +607,6 @@ int ofnode_read_simple_size_cells(ofnode node);
|
||||
*/
|
||||
bool ofnode_pre_reloc(ofnode node);
|
||||
|
||||
int ofnode_read_resource(ofnode node, uint index, struct resource *res);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user