diff options
author | Simon Glass <sjg@chromium.org> | 2017-07-25 08:29:55 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-07-28 12:02:47 -0600 |
commit | dcf988525f6e2045b9122ba7c3bf6a9bf44f146e (patch) | |
tree | 066e1e3e7a3f2aaceb5e407f85cf2a39ff1b486d /include/dm/ofnode.h | |
parent | c61d0009feb966e0e93254a8c435a1889085e6b8 (diff) |
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>
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r-- | include/dm/ofnode.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 15ad5199c2..966ca9309a 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -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 |