> -----Original Message-----
> From: Y.b. Lu
> Sent: 2019年2月15日 10:26
> To: u-boot@lists.denx.de
> Cc: Jaehoon Chung <jh80.ch...@samsung.com>; Prabhakar Kushwaha
> <prabhakar.kushw...@nxp.com>; Peng Fan <peng....@nxp.com>; Y.b. Lu
> <yangbo...@nxp.com>
> Subject: [v2, 1/3] mmc: fsl_esdhc: add esdhc_imx flag
> 
> The fsl_esdhc driver was for Freescale eSDHC on MPC83XX/MPC85XX initially.
> The later QoriQ series processors (which were evolutions of
> MPC83XX/MPC85XX) and i.MX series processors were using this driver for
> their eSDHCs too.
> 
> So there are two evolution directions for eSDHC now. For the two series
> processors, the eSDHCs are becoming more and more different.
> We should have split it into two drivers, like them
> (sdhci-of-esdhc.c/sdhci-esdhc-imx.c) in linux kernel. But it seemed to be a 
> lot
> of work now. So let's keep as it is. Be very careful to change the driver if 
> the
> changes are not common for all eSDHCs, and clarify i.MX eSDHC specific
> things to distingush them with QorIQ eSDHC.
> 
> This patch is to added an esdhc_imx flag for the development of i.MX eSDHC,
> to distinguish it with QoriQ eSDHC.
> 
> Signed-off-by: Yangbo Lu <yangbo...@nxp.com>
> ---
> Changes for v2:
>       - Converted to use device_is_compatible().
> ---
>  drivers/mmc/fsl_esdhc.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index
> 21fa2ab1d4..a647bc7f1c 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -147,6 +147,7 @@ struct fsl_esdhc_priv {
>       struct gpio_desc cd_gpio;
>       struct gpio_desc wp_gpio;
>  #endif
> +     bool esdhc_imx;
>  };
> 
>  /* Return the XFERTYP flags for a given command and data packet */ @@
> -1462,6 +1463,16 @@ static int fsl_esdhc_probe(struct udevice *dev)
>               priv->caps = data->caps;
>       }
> 
> +     /*
> +      * This is to specify whether current eSDHC is an i.MX eSDHC,
> +      * since the i.MX eSDHC has been becoming more and more different
> +      * with QorIQ eSDHC and initial MPC83XX/MPC85XX.
> +      */
> +     if (!device_is_compatible(dev, "fsl,esdhc"))
> +             priv->esdhc_imx = true;
> +     else
> +             priv->esdhc_imx = false;
> +
>       val = dev_read_u32_default(dev, "bus-width", -1);
>       if (val == 8)
>               priv->bus_width = 8;

Reviewed-by: Peng Fan <peng....@nxp.com>

> --
> 2.17.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to