dm: core: Add ofnode_read_resource()
authorSimon Glass <sjg@chromium.org>
Tue, 25 Jul 2017 14:29:55 +0000 (08:29 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 28 Jul 2017 18:02:47 +0000 (12:02 -0600)
commitdcf988525f6e2045b9122ba7c3bf6a9bf44f146e
tree066e1e3e7a3f2aaceb5e407f85cf2a39ff1b486d
parentc61d0009feb966e0e93254a8c435a1889085e6b8
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>
drivers/core/ofnode.c
drivers/core/read.c
drivers/core/read_extra.c
include/dm/ofnode.h
include/dm/read.h