summaryrefslogtreecommitdiffstats
path: root/include/dm
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-02-10 14:46:32 +0800
committerSimon Glass <sjg@chromium.org>2015-02-12 15:17:29 -0700
commitc9cac3f8413c1f67d1e1b7a1770e584584107cd2 (patch)
tree5e9344a29ff68938b6901a7b7a1ca7db53e92617 /include/dm
parentbe9891c52d5472156949a3137be5f48355fd3f29 (diff)
downloadtalos-obmc-uboot-c9cac3f8413c1f67d1e1b7a1770e584584107cd2.tar.gz
talos-obmc-uboot-c9cac3f8413c1f67d1e1b7a1770e584584107cd2.zip
dm: introduce dev_get_addr interface
Abstracting dev_get_addr can improve drivers that want to get device's address. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 81afa8c628..7a48eb88b8 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -12,6 +12,7 @@
#define _DM_DEVICE_H
#include <dm/uclass-id.h>
+#include <fdtdec.h>
#include <linker_lists.h>
#include <linux/list.h>
@@ -351,4 +352,13 @@ int device_find_first_child(struct udevice *parent, struct udevice **devp);
*/
int device_find_next_child(struct udevice **devp);
+/**
+ * dev_get_addr() - Get the reg property of a device
+ *
+ * @dev: Pointer to a device
+ *
+ * @return addr
+ */
+fdt_addr_t dev_get_addr(struct udevice *dev);
+
#endif
OpenPOWER on IntegriCloud