Hi Simon,

Sorry for late answer.

> -----Original Message-----
> From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass
> Sent: 2017年7月5日 3:33
> To: Wenyou Yang - A41535 <wenyou.y...@microchip.com>
> Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Jaehoon Chung
> <jh80.ch...@samsung.com>; Wenyou Yang - A41535
> <wenyou.y...@microchip.com>; Andreas Bießmann <andr...@biessmann.org>;
> Tom Rini <tr...@konsulko.com>; Stephen Warren <swar...@nvidia.com>
> Subject: Re: [PATCH v6] mmc: gen_atmel_mci: add driver model support for mci
> 
> Hi Wenyou,
> 
> On 12 April 2017 at 20:29, Wenyou Yang <wenyou.y...@atmel.com> wrote:
> > Add the driver model support for Atmel mci while retaining the
> > existing legacy code. This allows the driver to support boards that
> > have converted to driver model as well as those that have not.
> >
> > Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> > ---
> >
> > Changes in v6:
> >  - Rebase the master branch (commit: 4f6d85bb51).
> >
> > Changes in v5:
> >  - Rebase on v2017.03.
> >
> > Changes in v4:
> >  - Remove unneeded #ifdef CONFIG_DM_MMC.
> >
> > Changes in v3:
> >  - Use unified #ifdef CONFIG_DM_MMC #else...#endif, instead of #ifndef
> CONFIG_DM_MMC
> >    #else...#endif.
> >
> > Changes in v2:
> >  - Change the return type of atmel_mci_setup_cfg() from int to void.
> >  - Add comments on the features depends on the IP version.
> >  - Add the error handle path of clock.
> >  - Fix the missing use priv->bus_clk_rate.
> >  - Return from mmc_bind() directly, instead of checking its return.
> >
> >  drivers/mmc/Kconfig         |   9 +++
> >  drivers/mmc/gen_atmel_mci.c | 158
> > +++++++++++++++++++++++++++++++++++++++++++-
> >  2 files changed, 166 insertions(+), 1 deletion(-)
> 
> > +static int atmel_mci_bind(struct udevice *dev) {
> > +       struct atmel_mci_priv *priv = dev_get_priv(dev);
> > +
> > +       return mmc_bind(dev, &priv->mmc, &priv->cfg); }
> 
> Sorry for not noticing this before, but I don't think this works as intended. 
> The
> bind() method is called before the device is probed and so the device has no
> private data. You should use dev_get_platdata() here, and set up a new 
> structure
> to hold the mmc and cfg members.
> 
> See for example omap_hsmmc.c

Thank you for your correcting,  I will send a patch to fix it.

> 
> Regards,
> Simon


Best Regards,
Wenyou Yang
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to