From patchwork Mon Jul 22 17:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 813761 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1986369wro; Mon, 22 Jul 2024 11:01:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUSdLOSryd6LajAc480f4NAmJIseUwigymMWble/Bz2cGxBRp5cU99tejSZYamMnA2vFsXfXRFx+E7OZg1zWadw X-Google-Smtp-Source: AGHT+IEFVyGQN5OrWnHhjYnT7ghfC3ZzFRfF2p911XDHQFUD/DuvFYD4aboyWyVP2Xw2ShOsj6qr X-Received: by 2002:a50:bb69:0:b0:57d:4409:4f48 with SMTP id 4fb4d7f45d1cf-5a2cc79260fmr11209850a12.15.1721671269710; Mon, 22 Jul 2024 11:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721671269; cv=none; d=google.com; s=arc-20160816; b=OXedYIXrq9hKe/ZcbodiJxBuMVIFyHQqXoCm6CuGxkfZB8XqoKWEev/J14azdL6Wou p5T8OhQAttik4lW7k8FhsX+c0ykn5dfCJ7Dp9ZBa74XRxsBl6k4T14ZEvLqk9sxSQ6Oa ZVN0PyB3yTt4zeXZPC3ZR2OF47mGcAIPCmp0dwd3SLml19KWqwu8NFGH1wcHfukpy5UW FA/07EVJPTndHGQ5gptV5kV4l9/0bEXPETM9P8kZB/PscLx41UYLYkdtT9+Ldiy6spln cwz/k2c/GuY8UKqzXbki11jeMeKwCvuExiXsSqLByewZunb7ueUWcnbDFNfW+Xj/4M8A Hjfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qUyYRxpueeOSVxhoJgsfpm5qpbIninTSmLGdu9hQMkw=; fh=5jlgcFu5Tnj+okfvxIL56GaFBHAkmQYCyRSvnbDZD0E=; b=HwsHiA/F6CjNQmSZrC6b7/4IsF544TY445myVtHAIJaue3LNA7ty8JVI0PidhcMTJT 6dv5/O4Q8syUYLvTKGBumVAUGaSUZ00kAd5nymIPpPDWIjXR98pf0Xh1jWvUVGQDuZWj XH/Tlq9A5+aEO+sVn6Rtp1Sumhpuf+wg7iSNLxlswuG9DDBYtw7LdyMiCR8jjWzcrYpz XmYDV4em6GYqFmAoSJkrtiVg6+rv4EwD+aA7p4ZUqCKN0kMflLinL7NioitHjQrw0Nkw 9ENgiI2hlcHFE9jfno+nx2CmoDbl9SGSO9o5QxgxeIzJiEYeuJsS+F1N5DFpiV/4Oppg LorA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mjk2ORzA; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5a74dbc42c7si2070856a12.315.2024.07.22.11.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 11:01:09 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mjk2ORzA; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9081788617; Mon, 22 Jul 2024 19:58:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="mjk2ORzA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4679088614; Mon, 22 Jul 2024 19:57:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EFB7388621 for ; Mon, 22 Jul 2024 19:57:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-70365f905b6so3012348a34.0 for ; Mon, 22 Jul 2024 10:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721671076; x=1722275876; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qUyYRxpueeOSVxhoJgsfpm5qpbIninTSmLGdu9hQMkw=; b=mjk2ORzAgDx4WGM8bhhd7/X5VkUmJ/NRYmlQn7gJeWH27ckrV8yEiU8u7jBWHulvFH VXdmbP/SEMNOMnoZqcZ6B6YDLlMtTivqgEqTe/4MfHyyM9OXgod9HgyxJW9agRv+Rb+h 9pglUZc/gqZaSFEE87dqpsdJ90RvA5LgM65jYVpz1XnXcd/vTRyYFMmzzpfy+DRYz37d NrlHx1m0tlrwNZV86LRi+4/g0dsJlC4dB+OMUrJeLjcxT8/bBCJLKYp/W57cnffQDXrL bPmlwtUVfwkRWrRtKsyf8mfEJgmbSw0ATMLCtBJ4/nYkB5ShRCvVrXdqhiWEueKtVt3A 4Bsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721671076; x=1722275876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qUyYRxpueeOSVxhoJgsfpm5qpbIninTSmLGdu9hQMkw=; b=skwtOTDVGtNk77raDIdBjypiGplt3gTXwiWV0/hPIozWdgoGbpJBg4v2CBAQ8pY62R O38xigAggYhy14aobEk7WXO3552m5lH/WO8KL5HrWGjctShdS4ewSNFtRSyhcJ7plKpy k3o1E4pCF+7P07qw4odFwsTbPWiP1MlRHgQtD0KIAsIy8amb9zYebcbnAapxk8MTEX00 bCm8WFxvruAbKEs9YE/CR63LGelkCmYWquUDykOt8nR6BarBYn9RK0d0yOmgoCWLd+oN xcg3ff5q6cppFZRihl2HNjKCAuNyUA7nmYWMbjJ8kekvLawAR7JJlUw7aPi2TbcT4TQo 50uA== X-Forwarded-Encrypted: i=1; AJvYcCWNGUULBEnRn3bDZX/7xAYrYxiJaBHVCEhU4nhz+KaN5rOcf6up7FAPVU9PvCCb8yPVQQ4aULzZ0e5ggVBYXwWyLcMZcw== X-Gm-Message-State: AOJu0YwJTqmQC+Zyr8teVSmvKH5q9qiS/+U9/zYUW51uTD6mZFnakOVa rnUkc+MrHFFX95pDw1GIAs9XeBclZmTAvlD80W1RQiIXCCyznBjnMaCtjvEIFw4= X-Received: by 2002:a05:6830:488c:b0:708:b46d:5c76 with SMTP id 46e09a7af769-709008dd3abmr9251818a34.17.1721671075771; Mon, 22 Jul 2024 10:57:55 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-708f60eb421sm1658717a34.44.2024.07.22.10.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 10:57:55 -0700 (PDT) From: Sam Protsenko To: Minkyu Kang , Minkyu Kang Cc: Tom Rini , Peng Fan , Jaehoon Chung , Simon Glass , Quentin Schulz , Philipp Tomsich , Kever Yang , Eugeniy Paltsev , Peter Robinson , Jonas Karlman , Yang Xiwen , Ferass El Hafidi , Sean Anderson , u-boot@lists.denx.de, uboot-snps-arc@synopsys.com Subject: [PATCH v3 19/38] mmc: exynos_dw_mmc: Don't call pinmux functions on ARM64 chips Date: Mon, 22 Jul 2024 12:57:21 -0500 Message-Id: <20240722175740.6985-20-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722175740.6985-1-semen.protsenko@linaro.org> References: <20240722175740.6985-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Pinmux configuration on ARM64 platforms must be performed during startup in pinctrl driver using info from device tree. exynos_pinmux_config() and pinmux_decode_periph_id() are only available on ARM32 platforms, so don't call those functions on ARM64 platforms. Instead of the latter function, use "non-removable" property from device tree to derive the dev_index value. This fixes next linking errors on ARM64 platforms: ld: drivers/mmc/exynos_dw_mmc.o: in function `exynos_dwmci_get_config': undefined reference to `pinmux_decode_periph_id' ld: drivers/mmc/exynos_dw_mmc.o: in function `do_dwmci_init': undefined reference to `exynos_pinmux_config' Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v3: - (none) Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drivers/mmc/exynos_dw_mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index aa542c13fea8..ed2752391603 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -144,6 +144,7 @@ static int exynos_dwmci_core_init(struct dwmci_host *host) 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; @@ -152,6 +153,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); } @@ -163,6 +165,7 @@ static int exynos_dwmci_get_config(struct udevice *dev, const void *blob, int err = 0; u32 timing[3]; +#ifdef CONFIG_CPU_V7A /* Extract device id for each mmc channel */ host->dev_id = pinmux_decode_periph_id(blob, node); @@ -174,6 +177,12 @@ static int exynos_dwmci_get_config(struct udevice *dev, const void *blob, printf("DWMMC%d: Can't get the dev index\n", host->dev_index); return -EINVAL; } +#else + if (dev_read_bool(dev, "non-removable")) + host->dev_index = 0; /* eMMC */ + else + host->dev_index = 2; /* SD card */ +#endif /* Get the bus width from the device node (Default is 4bit buswidth) */ host->buswidth = fdtdec_get_int(blob, node, "samsung,bus-width", 4);