U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos
Date: Wed, 21 Nov 2018 01:59:19 +0100	[thread overview]
Message-ID: <20181121015919.6f41cad1@jawa> (raw)
In-Reply-To: <20181107150322.23314-1-m.szyprowski@samsung.com>

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

> From: Lukasz Majewski <l.majewski@samsung.com>
> 
> Disable some legacy code to let it work on ARM64 based Exynos SoCs.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> [extracted from old sources and adapted to mainline u-boot, minor
> fixes] Signed-off-by: Marek Szyprowski <m.szyprowski@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>

  reply	other threads:[~2018-11-21  0:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181107150113eucas1p27265a2a4fd58f9c1f69a96b5e1fe1fba@eucas1p2.samsung.com>
2018-11-07 15:00 ` [U-Boot] [PATCH 0/9] ARM: Exynos: Add TM2 board support Marek Szyprowski
2018-11-07 15:00   ` [U-Boot] [PATCH 1/9] cmd: itest: add support for .q size specifier Marek Szyprowski
2018-11-21  0:48     ` Lukasz Majewski
2018-11-07 15:00   ` [U-Boot] [PATCH 2/9] gadget: f_thor: properly enable 3rd endpoint defined by the protocol Marek Szyprowski
2018-11-21  0:49     ` Lukasz Majewski
2018-11-07 15:00   ` [U-Boot] [PATCH 3/9] cmd: thor: select DFU subsystem also for 'thor' download tool Marek Szyprowski
2018-11-21  0:51     ` Lukasz Majewski
2018-11-07 15:01   ` [U-Boot] [PATCH 4/9] dfu: mmc: add support for in-partition offset Marek Szyprowski
2018-11-19 10:23     ` Minkyu Kang
2018-11-21  0:56     ` Lukasz Majewski
2018-11-07 15:03   ` [U-Boot] [PATCH 5/9] mmc: dw_mmc: add support for 64bit DMA Marek Szyprowski
2018-11-21  8:52     ` Lukasz Majewski
2018-11-21  8:54       ` Lukasz Majewski
2018-11-07 15:03   ` [U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos Marek Szyprowski
2018-11-21  0:59     ` Lukasz Majewski [this message]
2018-11-07 15:04   ` [U-Boot] [PATCH 7/9] arm: armv8: add support for boards with broken/unset counter frequency Marek Szyprowski
2018-11-21  1:06     ` Lukasz Majewski
2018-11-07 15:04   ` [U-Boot] [PATCH 8/9] ARM: Exynos: Add minimal support for ARM 64bit based Exynos5433 SoC Marek Szyprowski
2018-11-19 10:23     ` Minkyu Kang
2018-11-21  1:12     ` Lukasz Majewski
2018-11-07 15:05   ` [U-Boot] [PATCH 9/9] ARM: Exynos: Add Exynos5433 based TM2 board support Marek Szyprowski
2018-11-19 10:23     ` Minkyu Kang
2018-11-21  1:30     ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181121015919.6f41cad1@jawa \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox