Pasthis

Raw | New paste
Never expires.
diff --git a/drivers/core/device.c b/drivers/core/device.c
index d9ce546c0c..56b96b9b43 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -36,6 +36,14 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static int dummy_post_bind(struct udevice *dev)
+{
+	if (ofnode_pre_reloc(dev_ofnode(dev)))
+		dev_or_flags(dev, DM_FLAG_PRE_RELOC);
+
+	return 0;
+}
+
 static int device_bind_common(struct udevice *parent, const struct driver *drv,
 			      const char *name, void *plat,
 			      ulong driver_data, ofnode node,
@@ -178,6 +186,10 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
 		ret = uc->uc_drv->post_bind(dev);
 		if (ret)
 			goto fail_uclass_post_bind;
+	} else {
+		ret = dummy_post_bind(dev);
+		if (ret)
+			goto fail_uclass_post_bind;
 	}
 
 	if (parent)