[RFC 1/7] dm: add get_dp_node() to struct uclass_driver
Ilias Apalodimas
ilias.apalodimas at linaro.org
Mon Mar 27 08:44:28 CEST 2023
Hi Simon,
On Mon, 27 Mar 2023 at 07:01, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Heinrich,
>
> On Mon, 27 Mar 2023 at 06:27, Heinrich Schuchardt
> <heinrich.schuchardt at canonical.com> wrote:
> >
> > 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(+)
>
> This affects very few uclasses but adds a field to all of them. I
> think an event might be best for this. We can add an event spy in each
> of the affected uclasses.
This is supposed to be a call from the efi subsystem do get a DP for a
given device. I am not sure how we could replace this with an event.
Regards
/Ilias
>
>
> >
> > 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