
On 19.01.18 21:33, Heinrich Schuchardt wrote:
On 01/19/2018 09:20 PM, Alexander Graf wrote:
On 19.01.18 20:24, Heinrich Schuchardt wrote:
U-Boot devices and EFI handles can be related, e.g. an IDE disk relates to a handle with the EFI_BLOCK_IO_PROTOCOL. Provide a pointer to store this link.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
v3 Don't add an unused handle field to struct udevice. v2 no change
include/efi_loader.h | 2 ++ lib/efi_loader/efi_boottime.c | 1 + 2 files changed, 3 insertions(+)
diff --git a/include/efi_loader.h b/include/efi_loader.h index 188bc06bcc..3579db8b63 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -139,6 +139,8 @@ struct efi_object { struct list_head protocols; /* The object spawner can either use this for data or as identifier */ void *handle; + /* Device */ + struct udevice *dev;
I still don't think you need this.
The stop method of the driver binding protocol we will call the unbind function of the EFI block driver. In the unbind function we need the the reference to delete the driver.
On use case is calling sanunhook for an iSCSI device in the iPXE application.
I must admit that I have not yet implemented the unbinding.
Unbinding is such an unusual slow-path that I think it's perfectly reasonable to just loop through all udevices and just search for the one you're looking for.
So I'll just drop this patch for now.
Alex