summaryrefslogtreecommitdiffstats
path: root/drivers/core/device.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2015-02-13 13:11:09 -0500
committerTom Rini <trini@ti.com>2015-02-13 13:11:09 -0500
commit757566d1567a98f5c331c14f088001dbfe187191 (patch)
tree86c9ab53fbefee672f37165f51db398338bf9968 /drivers/core/device.c
parentc445506d73a0fba6472d12510b2d41148f078349 (diff)
parentb1f6659c420dae9cd06514fbd8342f39b3f326b9 (diff)
downloadu-boot-757566d1567a98f5c331c14f088001dbfe187191.tar.gz
u-boot-757566d1567a98f5c331c14f088001dbfe187191.tar.xz
u-boot-757566d1567a98f5c331c14f088001dbfe187191.zip
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r--drivers/core/device.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index b73d3b8961..73c3e07c28 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -449,3 +449,15 @@ enum uclass_id device_get_uclass_id(struct udevice *dev)
{
return dev->uclass->uc_drv->id;
}
+
+#ifdef CONFIG_OF_CONTROL
+fdt_addr_t dev_get_addr(struct udevice *dev)
+{
+ return fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg");
+}
+#else
+fdt_addr_t dev_get_addr(struct udevice *dev)
+{
+ return FDT_ADDR_T_NONE;
+}
+#endif