[U-Boot] [PATCH V2 15/23] mmc: fsl_esdhc: support i.MX8M

Stefano Babic sbabic at denx.de
Thu Dec 7 08:41:28 UTC 2017


On 04/12/2017 05:31, Peng Fan wrote:
> Support i.MX8M in fsl esdhc driver.
> 
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
>  drivers/mmc/fsl_esdhc.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
> index 499d622c6d..3a56f7c2bc 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -228,7 +228,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc,
>  {
>  	int timeout;
>  	struct fsl_esdhc *regs = priv->esdhc_regs;
> -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234)
> +#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \
> +	defined(CONFIG_MX8M)
>  	dma_addr_t addr;
>  #endif
>  	uint wml_value;
> @@ -241,7 +242,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc,
>  
>  		esdhc_clrsetbits32(&regs->wml, WML_RD_WML_MASK, wml_value);
>  #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO
> -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234)
> +#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \
> +	defined(CONFIG_MX8M)
>  		addr = virt_to_phys((void *)(data->dest));
>  		if (upper_32_bits(addr))
>  			printf("Error found for upper 32 bits\n");
> @@ -270,7 +272,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc,
>  		esdhc_clrsetbits32(&regs->wml, WML_WR_WML_MASK,
>  					wml_value << 16);
>  #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO
> -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234)
> +#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \
> +	defined(CONFIG_MX8M)
>  		addr = virt_to_phys((void *)(data->src));
>  		if (upper_32_bits(addr))
>  			printf("Error found for upper 32 bits\n");
> @@ -335,7 +338,8 @@ static void check_and_invalidate_dcache_range
>  	unsigned end = 0;
>  	unsigned size = roundup(ARCH_DMA_MINALIGN,
>  				data->blocks*data->blocksize);
> -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234)
> +#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \
> +	defined(CONFIG_MX8M)
>  	dma_addr_t addr;
>  
>  	addr = virt_to_phys((void *)(data->dest));
> 

Reviewed-by: Stefano Babic <sbabic at denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list