From patchwork Mon Jun 10 01:12:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 802951 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp1734882wro; Sun, 9 Jun 2024 18:16:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/Bh49nTkgabwuii1y3sHjTex24rYKLZWSlCTRS9bz4dE7YVqUwJ5MwjfyCsK0LOSpHMllrp2joIRlaJG0obSr X-Google-Smtp-Source: AGHT+IEIZDjAuceUwmmjqWgEup69B6Qu713caoK8E9w76yNhFcUf14s6QffCvmb9s8Pvbq6hIAFy X-Received: by 2002:a50:9e06:0:b0:57a:2a46:701 with SMTP id 4fb4d7f45d1cf-57c50902d83mr4685778a12.19.1717982164347; Sun, 09 Jun 2024 18:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717982164; cv=none; d=google.com; s=arc-20160816; b=BjEWtp1rP+NStn1wfvOwIrXrGp98OgVAka4M9RjP7onzOyuEWtQKt3UHw/mzyTejmL Pe4XMKDCiJamHkzGXqrR8tp6XGlk7qEfYxz5dZnd/cO6xCIPG7wyU9+DUvsvM8jFbkAh TmZTHWHtyH1Hz9zDrW5TzU7xUyQd2VgDvcnpMokoIEq6dvX9u/df0myuyP72vw9QPX3N tpXwmDYs6Tm9kqeaidtXFWAeVdj0crSY+bGv2HD3dEWTycA0w+SWrFmDM0Nv4Xqe0cWb kZpIzJzW6m3X+9r2FICRK+O8mzhv0Jprp/YX7UAYkgDMUVWI38iFUSAjWRq+AQg9E2uB +XzQ== 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=kUlSrGaFAyyOiQQdsehGkSzrSRXQT/CDiakY96Iprr8=; fh=ZBjtqn4P6gikzDezncS2rDLKLR83308qUB027TtVc7E=; b=VRPV/4wwmUPkF/GSEk2ExQdMkS9wtJYKDx51mgmoCEah7PgKbvwK0R1GSDVIZ9gGgP f7VmS9Cxrr5puS3mTC6ZCxUpXCXU8UiO4EqPli5hI18UppSI4Aqi+fuPlfMOqTEnPmLM nxdv5KWuiJV+oMSmbPV7aBBlV2961cnG2hn2HumEcQQiztxkx1Z22IyPRecx2YRaM8cR 2okSJczadiAaW1JyaRK0Fwkhk3iOUFSVPJEnJSckenZUN0TRbehyYOYAL9XXp0q580mC lGFIecWHyB8QNsJogCLQ93rSK8Tl3J3OtCkDfwLbuIp9puhQeEW+gUhF9WzAejrwgxwW bpDQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Q/pH8txl"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c6872208bsi2200337a12.105.2024.06.09.18.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 18:16:04 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Q/pH8txl"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C611D88524; Mon, 10 Jun 2024 03:12:47 +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="Q/pH8txl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E00088506; Mon, 10 Jun 2024 03:12:45 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) (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 C15308849A for ; Mon, 10 Jun 2024 03:12:42 +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-oa1-x2e.google.com with SMTP id 586e51a60fabf-2548a00c19eso1244587fac.3 for ; Sun, 09 Jun 2024 18:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717981961; x=1718586761; 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=kUlSrGaFAyyOiQQdsehGkSzrSRXQT/CDiakY96Iprr8=; b=Q/pH8txlX6Kf7AzRRBG74SCCnJ/MRAjlBeuA/PaR/ESoWClP8U56GZLRrIlhwJUl/Y 1GJvYvDXei6LD30KsSXRAfWBy6or8/xaMKbU/F/EK94g5V0iougReRpO1yncpRq4vWXL BP0sMqMPoOpvcgkzaZvuKEjbz2HVtsR0VK1u5Y9m3b4hzyRB2A7tZ4Jc999PgWK8SdsY Ed71PIOspBF/JDDSCeRbppV+pW14d50v2Lc2tXVYd5Xarb0CE+/wMr7z/d0Uj/icN8k+ jlF0dW8lEbiehU4gxHkVrm6gUPkiL4jpAKKYdAXoKJWY//h3sRWejAgK5Vf7X+bzGwca Cl3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717981961; x=1718586761; 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=kUlSrGaFAyyOiQQdsehGkSzrSRXQT/CDiakY96Iprr8=; b=hlC0Wfydyae6aj1Ov1So2Cd9kWPM/I73zcH4jeg6OUDzOq3H1YMYTvOGGeAkzfn2hk IKV2SO+mGxeTItl7kpPR8u35FUb9kR4Y8Dq4AP7P7U7C0otovHO3Kdvuz/yPpcrpdAiB SsnCiuxgCuwvNUWf4tjST8s2GLTy0vEP+hSwObnVhhs0/zoRovH9vXj9s85vMfTHw5Sx Q1WJJyGdxH4Il5TTubaU8RSyrgipK7tGWnNZJabF2NkQJsewQaCSmdtk0kjmgVXtH2HQ 9VCQSkjWhsZCNLCcPiL8W6QevQje3vUu7BOW3I369647qKisui8ABZNRMKAeQybxYoq0 FloA== X-Forwarded-Encrypted: i=1; AJvYcCUSLYbcnu44wHVY/EwuyF6eIJxMAiU//aGJsfvGqJE8GFNb22R6lug+1szmw9bh406SlmPftKHiueQVDeZevzFmb2kuig== X-Gm-Message-State: AOJu0Yx6M/A1neNssL5DerwNJ4kT57GAClVkvF/A0b+TvdgrAXKVd7BT 8eZrozWmp0+ac8d/Q8nv+stZKdDxDLvkczacvxThwtq8ee4XzvyLJBaSgJaWYms= X-Received: by 2002:a05:6870:8326:b0:24c:ac7e:8a5c with SMTP id 586e51a60fabf-25464c3dbc1mr9448757fac.21.1717981961509; Sun, 09 Jun 2024 18:12:41 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f9633c5c35sm951306a34.4.2024.06.09.18.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 18:12:41 -0700 (PDT) From: Sam Protsenko To: Tom Rini , Minkyu Kang , Peng Fan , Jaehoon Chung , Simon Glass Cc: 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 v2 20/40] mmc: exynos_dw_mmc: Don't call pinmux functions on ARM64 chips Date: Sun, 9 Jun 2024 20:12:06 -0500 Message-Id: <20240610011226.4050-21-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240610011226.4050-1-semen.protsenko@linaro.org> References: <20240610011226.4050-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 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 8e80bd6a059f..2ed8429d0a40 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -145,6 +145,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; @@ -153,6 +154,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); } @@ -164,6 +166,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); @@ -175,6 +178,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);