summaryrefslogtreecommitdiff
path: root/drivers/core/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/core/root.c')
-rw-r--r--drivers/core/root.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 26b8195faa..815173f86e 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -26,6 +26,7 @@
#include <dm/read.h>
#include <dm/root.h>
#include <dm/uclass.h>
+#include <dm/uclass-internal.h>
#include <dm/util.h>
#include <linux/list.h>
@@ -407,6 +408,12 @@ int dm_init_and_scan(bool pre_reloc_only)
return 0;
}
+void dm_get_stats(int *device_countp, int *uclass_countp)
+{
+ *device_countp = device_get_decendent_count(gd->dm_root);
+ *uclass_countp = uclass_get_count();
+}
+
#ifdef CONFIG_ACPIGEN
static int root_acpi_get_name(const struct udevice *dev, char *out_name)
{