From patchwork Wed Nov 7 15:03:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150405 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5277346ljp; Wed, 7 Nov 2018 07:06:20 -0800 (PST) X-Google-Smtp-Source: AJdET5etekwzTbYq7dpvbYL5rJLSxswPtRLyf5uNLiZfmqp7OTlXwblmLjhmUvkJcBktcxV/LUls X-Received: by 2002:a17:906:f2d5:: with SMTP id gz21-v6mr370069ejb.81.1541603180021; Wed, 07 Nov 2018 07:06:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603180; cv=none; d=google.com; s=arc-20160816; b=iZY+MX9/5s/0pcn04eY/5NtLxKFf0iwcOtRV6wkoUToFTVpO74cwnNFYkggN/HKmS5 DGN2izXafej4XASdEdobHOph09IiB2lQaJ8rWvz7/nUpDcAq/pbE3y472bUKCa+0BWco eRVhTzufs+pV9z3otbKgjMPM6SdqCSv+i58fT4We09Guld4V7MUMjzKeCRVBylZxqkya JxPCYhOKqCDcxofxAYk2+HNXGKTneHR0CVJUWQOgMyL3z4MFOCCJxWZH+oG6EN9miDvs QIrchQBMnL1vbeLamc2g6YFKhjMHSAuvOMwgXwfIgJjflLvz3rydkqYA3mw5Jvq/XYqJ F52Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=WqH/XeR6NBARU/8lkqYHj0a2AcEj1UJChuZCCe3xoLQ=; b=kS/H8e54yQbZ49gcnsPr4j/RFRnewfo0ifddwNsYWMOfKVwLQPdAqAaPclTlTi7UvC ThYSLXpISN2JHmi3IsxaANidB/+AGhhI3OVhDdqn7A+kz4VCCtiumUwSBOJWJ4AuLA/Q 4DIMricyrXa2KH0lWDIiiw3mb9aJAnA6ld4YdACW4Mzf98zV/mtNJkxPAofGvNJ6yi3a 3kt3rsYpfuecBRlqu5ryr3slKYYxOm4+zxBnS0Gr6cJ5fyrPUFWpSLOuKMGO0bC+L80p GyCCJPAfGevkVg1jmS8iJRZc1yC3nWJkNEYJfSfWkhnsX4NLr9DAzISgI00rOd0Jer52 HE/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=bivfI8IM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id z26-v6si569912edx.446.2018.11.07.07.06.19; Wed, 07 Nov 2018 07:06:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=bivfI8IM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id 996C8C224D3; Wed, 7 Nov 2018 15:05:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4067BC22534; Wed, 7 Nov 2018 15:05:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 27E67C2257C; Wed, 7 Nov 2018 15:03:31 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id 7D6A9C224F8 for ; Wed, 7 Nov 2018 15:03:28 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150328euoutp02fe3fccae3a7c6a207a2238a80d0a1124~k38Sm-_eW0556105561euoutp02N; Wed, 7 Nov 2018 15:03:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150328euoutp02fe3fccae3a7c6a207a2238a80d0a1124~k38Sm-_eW0556105561euoutp02N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541603008; bh=7P2HpAjkL/vmHrqMIF1Pd3xawM+51jrDRpecEAK6Y00=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=bivfI8IMX4l60ZIzpBuhJ8jbet5b6eFVibSQ2NsRAWMa6dRnoavDyXp12eXiBfpnP +SEM0hk0WMj8kskvk0Yz/VX5lROM4aRB5SoK3P0FtzRajqq61BhoSrB6yMGy4d6Ral Z12oIIK54mSCyi6At7QUABrvp0z9WMDrEWNpkO/Y= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150327eucas1p2f6a3375c690e6cfcc090a14d0af57695~k38SNYuxS2478524785eucas1p24; Wed, 7 Nov 2018 15:03:27 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 1E.9B.04806.FBEF2EB5; Wed, 7 Nov 2018 15:03:27 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150326eucas1p27aa5f623304a8f20cd964b32916af7c4~k38RdTM3U0331703317eucas1p28; Wed, 7 Nov 2018 15:03:26 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-be-5be2febf767a Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 8B.05.04128.EBEF2EB5; Wed, 7 Nov 2018 15:03:26 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT00H4XWHMV510@eusync1.samsung.com>; Wed, 07 Nov 2018 15:03:26 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:03:22 +0100 Message-id: <20181107150322.23314-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7djP87r7/z2KNtjxRdpi44z1rBY3frWx Wjx/d5nJYu2Ru+wWHUdaGC3e7u1kd2DzmDfrBIvH2Ts7GD36tqxiDGCO4rJJSc3JLEst0rdL 4Mo4tjKn4JRgxY7+eYwNjOv5uhg5OSQETCSOrDjJ1sXIxSEksIJR4u7+hYwQzmdGic8HWtlh qq5vOAdVtYxRYkHLD1YIp4FJovFnCytIFZuAoUTX2y42EFtEQELiV/9VRhCbWeAao8Ss7Yog trBAgMS5vsdgNSwCqhLXbv5nArF5BWwlVvzYxQaxTV5i9YYDzCA2p4CdRHfPZBaQZRICH1kl tky+xwxR5CLx/nETVIOwxKvjW6BOlZG4PLkbqqGZUaJ9xix2CKeHUWLrnB1QHdYSh49fZIU4 j09i0rbpQFM5gOK8Eh1tQhAlHhJvF5yC+nkio8S0O7OZJzBKLmBkWMUonlpanJueWmycl1qu V5yYW1yal66XnJ+7iREYZ6f/Hf+6g3H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623304a8f20cd964b32916af7c4 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150326eucas1p27aa5f623304a8f20cd964b32916af7c4 References: <20181107150105.23165-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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);