[RFC 1/7] dm: add get_dp_node() to struct uclass_driver

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Sun Mar 26 19:27:37 CEST 2023


Currently the device paths don't match the dm tree.
We should create a device path node per dm tree node.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 include/dm/uclass.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index ee15c92063..e11637ce4d 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -11,6 +11,7 @@
 
 #include <dm/ofnode.h>
 #include <dm/uclass-id.h>
+#include <efi.h>
 #include <linker_lists.h>
 #include <linux/list.h>
 
@@ -68,6 +69,7 @@ struct udevice;
  * @child_post_probe: Called after a child in this uclass is probed
  * @init: Called to set up the uclass
  * @destroy: Called to destroy the uclass
+ * @get_dp_node: Get EFI device path node
  * @priv_auto: If non-zero this is the size of the private data
  * to be allocated in the uclass's ->priv pointer. If zero, then the uclass
  * driver is responsible for allocating any data required.
@@ -99,6 +101,9 @@ struct uclass_driver {
 	int (*child_post_probe)(struct udevice *dev);
 	int (*init)(struct uclass *class);
 	int (*destroy)(struct uclass *class);
+#if CONFIG_IS_ENABLED(EFI_LOADER)
+	struct efi_device_path *(*get_dp_node)(struct udevice *dev);
+#endif
 	int priv_auto;
 	int per_device_auto;
 	int per_device_plat_auto;
-- 
2.39.2



More information about the U-Boot mailing list