From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Szyprowski Date: Wed, 07 Nov 2018 16:03:22 +0100 Subject: [U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos In-Reply-To: <20181107150105.23165-1-m.szyprowski@samsung.com> References: <20181107150105.23165-1-m.szyprowski@samsung.com> Message-ID: <20181107150322.23314-1-m.szyprowski@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Lukasz Majewski Disable some legacy code to let it work on ARM64 based Exynos SoCs. Signed-off-by: Lukasz Majewski [extracted from old sources and adapted to mainline u-boot, minor fixes] Signed-off-by: Marek Szyprowski --- 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); -- 2.17.1