dm: Provide a way to shut down driver model

Add a new method which removes and unbinds all drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index ac1c164..346d462 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -56,6 +56,14 @@
 	return 0;
 }
 
+int dm_uninit(void)
+{
+	device_remove(dm_root());
+	device_unbind(dm_root());
+
+	return 0;
+}
+
 int dm_scan_platdata(void)
 {
 	int ret;