Hi Heinrich, On Wed, 8 Sept 2021 at 11:50, Heinrich Schuchardt <[email protected]> wrote: > > > > On 9/8/21 3:33 PM, Simon Glass wrote: > > At present UCLASS_EFI is used to represent an EFI filesystem The > > description of this uclass is "EFI managed devices" which is pretty vague. > > The only driver that uses this uclass is in fact not a real U-Boot driver, > > since its operations do not include a struct udevice. > > > > Rather than mess with this, create a new UCLASS_EFI_MEDIA uclass to handle > > EFI media such as disks. Make this the uclass to use for EFI media. > > > > The existing implementation using UCLASS_EFI remains as is, for > > discussion. > > UCLASS_EFI is not related to block devices. It is for drivers > implementing the EFI_DRIVER_BINDING_PROTOCOL. efi_uclass.c simplifies > writing such drivers. So your patch does not make sense to me.
Do you understand the issue here? The existing EFI uclass is not a real U-Boot uclass. It does not use DM-style operations or even devices. It actually isn't clear to me what it is for. So for the purposes of this patch, I ignored it. > > Please, separate the series in two: one for U-Boot on EFI, one for the > UEFI implementation in U-Boot. This series is all about the former. If there is anything related to the latter, it is likely just refactoring to avoid duplicating code. But I can't think of anything at present - can you please be more specific? > > Best regards > > Heinrich > > > > > Signed-off-by: Simon Glass <[email protected]> > > --- > > > > arch/sandbox/dts/test.dts | 4 ++++ > > drivers/block/Kconfig | 23 +++++++++++++++++++++++ > > drivers/block/Makefile | 3 +++ > > drivers/block/blk-uclass.c | 2 +- > > drivers/block/efi-media-uclass.c | 15 +++++++++++++++ > > drivers/block/sb_efi_media.c | 21 +++++++++++++++++++++ > > include/dm/uclass-id.h | 1 + > > test/dm/Makefile | 1 + > > test/dm/efi_media.c | 24 ++++++++++++++++++++++++ > > 9 files changed, 93 insertions(+), 1 deletion(-) > > create mode 100644 drivers/block/efi-media-uclass.c > > create mode 100644 drivers/block/sb_efi_media.c > > create mode 100644 test/dm/efi_media.c Regards, Simon

