dm: core: Allow the uclass list to move

At present the uclass list head is in global_data. This is convenient
but with the new of-platdata we need the list head to be declared by
the generated code.

Change this over to be a pointer. Provide a 'static' version in
global_data to retain the current behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/dm/core.c b/test/dm/core.c
index 565896e..580d171 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -116,14 +116,14 @@
 	 * device with no children.
 	 */
 	ut_assert(dms->root);
-	ut_asserteq(1, list_count_items(&gd->uclass_root));
+	ut_asserteq(1, list_count_items(gd->uclass_root));
 	ut_asserteq(0, list_count_items(&gd->dm_root->child_head));
 	ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]);
 
 	ut_assertok(dm_scan_plat(false));
 
 	/* We should have our test class now at least, plus more children */
-	ut_assert(1 < list_count_items(&gd->uclass_root));
+	ut_assert(1 < list_count_items(gd->uclass_root));
 	ut_assert(0 < list_count_items(&gd->dm_root->child_head));
 
 	/* Our 3 dm_test_infox children should be bound to the test uclass */
@@ -1073,7 +1073,7 @@
 	struct udevice *dev;
 	struct uclass *uc;
 
-	list_for_each_entry(uc, &gd->uclass_root, sibling_node) {
+	list_for_each_entry(uc, gd->uclass_root, sibling_node) {
 		list_for_each_entry(dev, &uc->dev_head, uclass_node) {
 			if (dev->seq_ == -1)
 				printf("Device '%s' has no seq (%d)\n",