dm: core: Provide a way to reset the device tree
At present there is only one device tree used by the ofnode functions, except for some esoteric use of live tree. In preparation for supporting more than one, add a way to reset the list of device trees. For now this does nothing. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <event.h>
|
||||
#include <of_live.h>
|
||||
#include <os.h>
|
||||
#include <dm/ofnode.h>
|
||||
#include <dm/root.h>
|
||||
#include <dm/test.h>
|
||||
#include <dm/uclass-internal.h>
|
||||
@@ -99,6 +100,7 @@ static int dm_test_pre_run(struct unit_test_state *uts)
|
||||
|
||||
/* Determine whether to make the live tree available */
|
||||
gd_set_of_root(of_live ? uts->of_root : NULL);
|
||||
oftree_reset();
|
||||
ut_assertok(dm_init(of_live));
|
||||
uts->root = dm_root();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user