[U-Boot] [PATCH V2] imx: mx6slevk: fix mmc breakage
Peng Fan
peng.fan at nxp.com
Thu Oct 19 03:06:11 UTC 2017
Hi Fabio
> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> Sent: Tuesday, October 17, 2017 12:15 AM
> To: Peng Fan <peng.fan at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>; Fabio Estevam
> <fabio.estevam at nxp.com>; U-Boot-Denx <u-boot at lists.denx.de>
> Subject: Re: [U-Boot] [PATCH V2] imx: mx6slevk: fix mmc breakage
>
> Hi Peng,
>
> Subject should be changed as you are no longer fixing a MMC breakage.
>
> On Mon, Oct 16, 2017 at 10:23 AM, Peng Fan <peng.fan at nxp.com> wrote:
> > Log:
> > "
> > MMC Device 1 not found
> > *** Warning - No MMC card found, using default environment
>
> This message should be removed as you are no longer fixing a MMC breakage.
>
> > "
> > Add alias node for usdhc.
>
> Why? Please explain why you need the alias. What happens if the alias is not
> added?
>
> Upstream dts file does not have the alias either, so why should we diverge
> from upstream dts?
When adding DM support, I add this piece code in fsl_esdhc.c
/*
* TODO:
* Because lack of clk driver, if SDHC clk is not enabled,
* need to enable it first before this driver is invoked.
*
* we use MXC_ESDHC_CLK to get clk freq.
* If one would like to make this function work,
* the aliases should be provided in dts as this:
*
* aliases {
* mmc0 = &usdhc1;
* mmc1 = &usdhc2;
* mmc2 = &usdhc3;
* mmc3 = &usdhc4;
* };
* Then if your board only supports mmc2 and mmc3, but we can
* correctly get the seq as 2 and 3, then let mxc_get_clock
* work as expected.
*/
init_clk_usdhc(dev->seq);
priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev->seq);
If no alias node, the dev->seq maybe wrong.
>
> Also, as far as I recall the mmc alias mechanism does not work in the kernel.
>
> We cannot guarantee the probe ordering and we should use UUID to specify
> the rootfs location.
>
> > Cleaned up board usb code.
>
> This part is fine and you could do a patch doing only this USB board code
> removal.
Ok. I'll do a cleanup patch for usb part.
Regards,
Peng.
>
> Thanks
More information about the U-Boot
mailing list