Pasthis
Raw |
New paste
Never expires.
diff --git a/drivers/misc/test_drv.c b/drivers/misc/test_drv.c
index 927618256f..f9f40552ae 100644
--- a/drivers/misc/test_drv.c
+++ b/drivers/misc/test_drv.c
@@ -177,6 +177,7 @@ U_BOOT_DRIVER(denx_u_boot_fdt_test) = {
.ops = &test_ops,
.priv_auto = sizeof(struct dm_test_priv),
.plat_auto = sizeof(struct dm_test_pdata),
+ .flags = DM_FLAG_PROBE_AFTER_BIND,
};
static const struct udevice_id testfdt1_ids[] = {
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 6118ad42ca..71e7bebc34 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -223,6 +223,28 @@ static int dm_test_fdt_pre_reloc(struct unit_test_state *uts)
}
DM_TEST(dm_test_fdt_pre_reloc, 0);
+static int dm_test_fdt_probe_after_bind_pre_reloc(struct unit_test_state *uts)
+{
+ const ofnode node = ofnode_path("/a-test");
+ struct udevice *dev;
+ struct uclass *uc;
+ int ret;
+
+ ret = dm_init_and_scan(true);
+ ut_assert(!ret);
+
+ ret = uclass_get(UCLASS_TEST_FDT, &uc);
+ ut_assert(!ret);
+
+ ret = uclass_find_device_by_ofnode(uc->uc_drv->id, node, &dev);
+ ut_assert(!ret);
+
+ ut_assert(dev_get_flags(dev) & DM_FLAG_ACTIVATED);
+
+ return 0;
+}
+DM_TEST(dm_test_fdt_probe_after_bind_pre_reloc, 0);
+
/* Test that sequence numbers are allocated properly */
static int dm_test_fdt_uclass_seq(struct unit_test_state *uts)
{