[PATCH 14/45] dm: blk: Add udevice functions
Simon Glass
sjg at chromium.org
Wed Sep 28 12:20:56 CEST 2022
Hi Takahiro,
On Sun, 25 Sept 2022 at 18:17, AKASHI Takahiro
<takahiro.akashi at linaro.org> wrote:
>
> Hi Simon,
>
> On Sun, Sep 25, 2022 at 09:02:17AM -0600, Simon Glass wrote:
> > At present we have functions called blk_dread(), etc., which take a
> > struct blk_desc * to refer to the block device. Add some functions which
> > use udevice instead, since this is more in keeping with how driver model
> > is supposed to work.
>
> Unfortunately, NAK.
> I have already added similar functions in disk/disk-uclass.c
> with my commit 59da9d4782cd ("dm: disk: add read/write interfaces with
> udevice"). dev_read()/dev_write() works well with UCLASS_BLK (as intended).
>
> I remember that you also ack'ed that patch.
You have a better memory than me!
How about we make those functions call my new ones?
Also I think we should rename your functions to avoid using the
dev_read prefix, since this is for reading from the device tree.
Perhaps disk_read()? Also it seems that we could rationalise the code
between disk_read() and part_read() ? Also should have comments in the
header file about what the functions do (and what type of device they
accept).
Regards,
Simon
[..]
More information about the U-Boot
mailing list