From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 21 Nov 2018 01:59:19 +0100 Subject: [U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos In-Reply-To: <20181107150322.23314-1-m.szyprowski@samsung.com> References: <20181107150105.23165-1-m.szyprowski@samsung.com> <20181107150322.23314-1-m.szyprowski@samsung.com> Message-ID: <20181121015919.6f41cad1@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 07 Nov 2018 16:03:22 +0100 Marek Szyprowski wrote: > 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); > 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: