aboutsummaryrefslogtreecommitdiff
path: root/include/dm/tag.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dm/tag.h')
-rw-r--r--include/dm/tag.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/include/dm/tag.h b/include/dm/tag.h
index 54fc31eb153..745088ffcff 100644
--- a/include/dm/tag.h
+++ b/include/dm/tag.h
@@ -10,11 +10,23 @@
#include <linux/list.h>
#include <linux/types.h>
+struct dm_stats;
struct udevice;
enum dm_tag_t {
+ /* Types of core tags that can be attached to devices */
+ DM_TAG_PLAT,
+ DM_TAG_PARENT_PLAT,
+ DM_TAG_UC_PLAT,
+
+ DM_TAG_PRIV,
+ DM_TAG_PARENT_PRIV,
+ DM_TAG_UC_PRIV,
+ DM_TAG_DRIVER_DATA,
+ DM_TAG_ATTACH_COUNT,
+
/* EFI_LOADER */
- DM_TAG_EFI = 0,
+ DM_TAG_EFI = DM_TAG_ATTACH_COUNT,
DM_TAG_COUNT,
};
@@ -107,4 +119,22 @@ int dev_tag_del(struct udevice *dev, enum dm_tag_t tag);
*/
int dev_tag_del_all(struct udevice *dev);
+/**
+ * dev_tag_collect_stats() - Collect information on driver model performance
+ *
+ * This collects information on how driver model is performing. For now it only
+ * includes memory usage
+ *
+ * @stats: Place to put the collected information
+ */
+void dev_tag_collect_stats(struct dm_stats *stats);
+
+/**
+ * tag_get_name() - Get the name of a tag
+ *
+ * @tag: Tag to look up, which must be valid
+ * Returns: Name of tag
+ */
+const char *tag_get_name(enum dm_tag_t tag);
+
#endif /* _DM_TAG_H */