[U-Boot] [EXT] Re: [PATCH v1] net: use block layer in net driver

Joe Hershberger joe.hershberger at gmail.com
Mon Jun 10 15:41:08 UTC 2019


On Sun, Jun 2, 2019 at 9:28 PM Yinbo Zhu <yinbo.zhu at nxp.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Joe Hershberger [mailto:joe.hershberger at gmail.com]
> > Sent: 2019年6月1日 19:16
> > To: Yinbo Zhu <yinbo.zhu at nxp.com>
> > Cc: York Sun <york.sun at nxp.com>; u-boot at lists.denx.de; Xiaobo Xie
> > <xiaobo.xie at nxp.com>; Jiafei Pan <jiafei.pan at nxp.com>; Ran Wang
> > <ran.wang_1 at nxp.com>
> > Subject: [EXT] Re: [U-Boot] [PATCH v1] net: use block layer in net driver
> >
> > Caution: EXT Email
> >
> > On Thu, May 9, 2019 at 3:02 PM Joe Hershberger <joe.hershberger at gmail.com>
> > wrote:
> > >
> > > On Wed, Apr 17, 2019 at 4:02 AM Yinbo Zhu <yinbo.zhu at nxp.com> wrote:
> > > >
> > > > From: Yinbo Zhu <yinbo.zhu at nxp.com>
> > > >
> > > > At present the MMC subsystem maintains its own list of MMC devices.
> > > > This cannot work with driver model when CONFIG_BLK is enabled, use
> > > > blk_dread to replace previous mmc read interface,
> > > >
> > > > Signed-off-by: Yinbo Zhu <yinbo.zhu at nxp.com>
> > > > ---
> > > >  drivers/net/phy/cortina.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
> > > > index a04a118f90..2337c3403c 100644
> > > > --- a/drivers/net/phy/cortina.c
> > > > +++ b/drivers/net/phy/cortina.c
> > > > @@ -176,7 +176,7 @@ void cs4340_upload_firmware(struct phy_device
> > *phydev)
> > > >                 printf("MMC read: dev # %u, block # %u, count %u ...\n",
> > > >                        dev, blk, cnt);
> > > >                 mmc_init(mmc);
> > > > -               (void)mmc->block_dev.block_read(&mmc->block_dev, blk,
> > cnt,
> > > > +               (void)blk_dread(mmc_get_blk_desc(mmc), blk, cnt,
> > > >                                                 addr);
> > >
> > > Should this be switching on CONFIG_BLK or CONFIG_DM_MMC or something.
> >
> > Any word?
> >
> Yes, need enable above two config. And default uboot had enabled them.

OK, if this depends on them, even if they are default, this block
should check for the option in v2. Also, if there is still a use-case
for the "mmc->block_dev.block_read" that exists with different or
fewer options, then that could also be a config option instead of
replaced.

Thanks,
-Joe

>
> Regards,
> Yinbo
> > >
> > > >         }
> > > >  #endif
> > > > --
> > > > 2.17.1
> > > >
> > > > _______________________________________________
> > > > U-Boot mailing list
> > > > U-Boot at lists.denx.de
> > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > > >
> > sts.denx.de%2Flistinfo%2Fu-boot&data=02%7C01%7Cyinbo.zhu%40nxp.c
> > > >
> > om%7Cf4dd39cb85174bb474e208d6e682980b%7C686ea1d3bc2b4c6fa92cd9
> > 9c5c30
> > > >
> > 1635%7C0%7C1%7C636949845952441371&sdata=PJGcNYuSLsAndJaGTBe
> > khmEN
> > > > sad96LwmV92jLec5mrs%3D&reserved=0


More information about the U-Boot mailing list