[U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos

Lukasz Majewski lukma at denx.de
Wed Nov 21 00:59:19 UTC 2018


On Wed, 07 Nov 2018 16:03:22 +0100
Marek Szyprowski <m.szyprowski at samsung.com> wrote:

> From: Lukasz Majewski <l.majewski at samsung.com>
> 
> Disable some legacy code to let it work on ARM64 based Exynos SoCs.
> 
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> [extracted from old sources and adapted to mainline u-boot, minor
> fixes] Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
> ---
>  drivers/mmc/exynos_dw_mmc.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
> index 3e9d47538c..c7ba3b6060 100644
> --- a/drivers/mmc/exynos_dw_mmc.c
> +++ b/drivers/mmc/exynos_dw_mmc.c
> @@ -143,6 +143,7 @@ static struct dwmci_host
> dwmci_host[DWMMC_MAX_CH_NUM]; 
>  static int do_dwmci_init(struct dwmci_host *host)
>  {
> +#ifdef CONFIG_CPU_V7A
>  	int flag, err;
>  
>  	flag = host->buswidth == 8 ? PINMUX_FLAG_8BIT_MODE :
> PINMUX_FLAG_NONE; @@ -151,6 +152,7 @@ static int do_dwmci_init(struct
> dwmci_host *host) printf("DWMMC%d not configure\n", host->dev_index);
>  		return err;
>  	}
> +#endif
>  
>  	return exynos_dwmci_core_init(host);
>  }
> @@ -160,10 +162,15 @@ static int exynos_dwmci_get_config(const void
> *blob, int node, struct dwmci_exynos_priv_data *priv)
>  {
>  	int err = 0;
> -	u32 base, timing[3];
> +	dma_addr_t base;
> +	u32 timing[3];
>  
> +#ifdef CONFIG_CPU_V7A
>  	/* Extract device id for each mmc channel */
>  	host->dev_id = pinmux_decode_periph_id(blob, node);
> +#else
> +	host->dev_id = 0;
> +#endif
>  
>  	host->dev_index = fdtdec_get_int(blob, node, "index",
> host->dev_id); if (host->dev_index == host->dev_id)
> @@ -247,19 +254,20 @@ static int exynos_dwmci_process_node(const void
> *blob, int exynos_dwmmc_init(const void *blob)
>  {
>  	int node_list[DWMMC_MAX_CH_NUM];
> -	int boot_dev_node;
>  	int err = 0, count;
>  
>  	count = fdtdec_find_aliases_for_id(blob, "mmc",
>  			COMPAT_SAMSUNG_EXYNOS_DWMMC, node_list,
>  			DWMMC_MAX_CH_NUM);
>  
> +#ifdef CONFIG_CPU_V7A
>  	/* For DWMMC always set boot device as mmc 0 */
>  	if (count >= 3 && get_boot_mode() == BOOT_MODE_SD) {
> -		boot_dev_node = node_list[2];
> +		int boot_dev_node = node_list[2];
>  		node_list[2] = node_list[0];
>  		node_list[0] = boot_dev_node;
>  	}
> +#endif
>  
>  	err = exynos_dwmci_process_node(blob, node_list, count);
>  

The patch seems correct :-)

However, though, I shall NOT ack my own patch....


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181121/0a4aeae4/attachment.sig>


More information about the U-Boot mailing list