From patchwork Thu Jul 25 20:45:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 814397 Delivered-To: patch@linaro.org Received: by 2002:adf:e641:0:b0:367:895a:4699 with SMTP id b1csp567120wrn; Thu, 25 Jul 2024 13:48:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU0O0RhrK86ooWe0B2QN0yLDQwvyclu8AYPZ0yRBQUzfk6BRQJpP4WCb7Y2uqKr1E6na7ZGYvfXBQUl3ffGrzFD X-Google-Smtp-Source: AGHT+IH4mnyK891vl1zuApuARb+K55V5yITPgq4sklkHCo35HhhpCXEGbgIfcNDzsk3iiLLcTflx X-Received: by 2002:ac2:4f0f:0:b0:52f:154:661b with SMTP id 2adb3069b0e04-52fd6087755mr2708707e87.11.1721940539460; Thu, 25 Jul 2024 13:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721940539; cv=none; d=google.com; s=arc-20160816; b=Mgmnz+exnpbnjJuFyOC8zFq4quZDw3Vqb9UWk3F3xPtPmGwGRH/jWCC7R8Mshl2ZbG MkBZshNpGDiLYieBGHjkajgGCCIDMERfCdRTTk0VGBkN/LlezeTbr1UeHHzNhyZA6hZy imQRP1hhVif1yGJA/0XMVhV38hQq3dOKIrew4x4pojUcL8Hkjb3fk4PsUUEz4w3IuFZu 8Nl6HsydP/JotHKCGGDPQAbqpR9FoJLePPFg79mQxcALCDI44TRE4KwACwmzNjaOS9zy YV5Uk8ZW7gZAkJGD+X6PYT3MDZ/2e2RZGymjXVOSzsF/6bAS8odAU8bqRJ2ms+UJV5bb c8rQ== 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=tDZzEFSNRWDHk7xL6UtbRz9f/m5h3OBvk0iGJDKDqCA=; fh=OTySlVJDlw8wUxLaVKD1AktpNzgvWiOA+77NIBDm/CU=; b=PGH7DUBwAofHGxkw8ujOTDWbDd9z3P1K/Ru8sjeHcI4vf0FiB2K3pMry42hXXte/oE RwieWjuBQfRReklqE1ZNvvDcRxZP/QRsBdxHwcFSI0kzttzPPjR4giRYQYIGOJDk2WxR MC8DAG9DAYbySp+J3Xu/b/ziOtqNNA4eRqGpfcxBU+tMFFeTCbR4ML+nYaL6B/t2dIqB fJrwDtXq7nc9QJP/YPo/W4+n5EIkSQOPT0OqSRrLN+s7dF1bzFR7zXMqotXXVPI/kAhL AQqaCc5WWj5mesc+1wRjh+T+gMU0Mnzy6MJwtTEsdh93QQZxkfM4cdxUkKe3Q9Iaci/Z ToRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ibGIwNJ0; 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 2adb3069b0e04-52fd5bfbd68si671384e87.422.2024.07.25.13.48.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 13:48:59 -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=ibGIwNJ0; 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 C54368871C; Thu, 25 Jul 2024 22:45:45 +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="ibGIwNJ0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8784E88403; Thu, 25 Jul 2024 22:45:40 +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-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) (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 1DED188599 for ; Thu, 25 Jul 2024 22:45:38 +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-oi1-x231.google.com with SMTP id 5614622812f47-3db130a872fso195076b6e.2 for ; Thu, 25 Jul 2024 13:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721940337; x=1722545137; 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=tDZzEFSNRWDHk7xL6UtbRz9f/m5h3OBvk0iGJDKDqCA=; b=ibGIwNJ0szbBS7VC3u0nnoj7voA/NPvsV5Sf167E4DLLSM8/qL3996QZcGETzgnr07 BxEG0jIRUOgJCm21D53+6PRTR645f1KEoLmkTfh25gHpfKw3CYmPPDk6KuC04EKE2z3u 3s3MnztZe1AD9qkz0xWM5aujRPkMjFm+mIjX3bPniVKwmdJu+QIgAkdshSV7OJ1evSpl B4qQVQ8q/MJ8WFgi9tFg4L1RllMKHTbiriQWCGKMJz5PiHL3iVg/jZn9JB1G1rdu9fLX 2G8kF9QbORxYV08o6dHKCt7uXeBbXIA7LW2uRaW+/sPCbtphdT34DezH5DW9iWNrXQMu xfSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721940337; x=1722545137; 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=tDZzEFSNRWDHk7xL6UtbRz9f/m5h3OBvk0iGJDKDqCA=; b=gukJKVVrEBjL2l/M0z5k5DIUaNKIdvQvAsCXc6/aZ6jQ7TKXrCgRsIv/oBLzH/kKH6 RIOtWdAvQa+k6n4zAJF5RAwIOj4b5ydjvwwLi0YsUHgADpObdHepZ3zTUCWflsJHuegO 0Bf4xTLpnFj6pjhpumAismgLinQuvlQ6PgV8szoERIYon2K8b8G/nz7lVNFJ5fKjn10m oSnXwlX65RojXukSwClfQgylvwQYa4GgOrOAUy/Rkwh44fgNOTtmeG0wOPeG0yeVMJu9 26VBZfVLT+P/+l1jHrTbWvdOMFEVxfkq2nxiDh1HuwgF4fG2V56Fd3MWO7tJ2gfRAaWj hq+g== X-Forwarded-Encrypted: i=1; AJvYcCXJgEJtBRhCfZ/IG1xH7mYQqORCKKH/eFUY31R/PnKXgnPFP4tkhf1NYptIbAKfu7ds/oUX4xJ/MbPZB3vpCOF/7GeYjA== X-Gm-Message-State: AOJu0YzRMNPY0SLrocZX6/c4oYV2Ta/G/YStch+8MioP6NVu9DI4rIQy DbsUox1HPL/YYUTSS4mjBJTUtxFVbTK+r0WpVYAVeSx7Do3wkxQQHJp+gnuAx5w= X-Received: by 2002:a05:6808:171c:b0:3da:a793:f116 with SMTP id 5614622812f47-3db140ecf9fmr3574750b6e.26.1721940336851; Thu, 25 Jul 2024 13:45:36 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3db1341dde2sm430303b6e.17.2024.07.25.13.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 13:45:36 -0700 (PDT) From: Sam Protsenko To: Jaehoon Chung Cc: Minkyu Kang , Minkyu Kang , Tom Rini , Peng Fan , 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 v4 21/38] mmc: exynos_dw_mmc: Use .of_to_plat for device tree parsing Date: Thu, 25 Jul 2024 15:45:03 -0500 Message-Id: <20240725204520.18134-22-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240725204520.18134-1-semen.protsenko@linaro.org> References: <20240725204520.18134-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 exynos_dwmci_get_config() is called from the probe function and used to read data from device tree. Make use of .of_to_plat driver callback instead, and convert exynos_dwmci_get_config() to match its signature. No functional change. Signed-off-by: Sam Protsenko --- Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/exynos_dw_mmc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index 4d28ede0d756..09a59fdf0120 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -223,10 +223,13 @@ static int do_dwmci_init(struct dwmci_host *host) return exynos_dwmci_core_init(host); } -static int exynos_dwmci_get_config(struct udevice *dev, const void *blob, - int node, struct dwmci_host *host, - struct dwmci_exynos_priv_data *priv) +#ifdef CONFIG_DM_MMC +static int exynos_dwmmc_of_to_plat(struct udevice *dev) { + const void *blob = gd->fdt_blob; + struct dwmci_exynos_priv_data *priv = dev_get_priv(dev); + struct dwmci_host *host = &priv->host; + int node = dev_of_offset(dev); int err = 0; u32 timing[3]; @@ -286,7 +289,6 @@ static int exynos_dwmci_get_config(struct udevice *dev, const void *blob, return 0; } -#ifdef CONFIG_DM_MMC static int exynos_dwmmc_probe(struct udevice *dev) { struct exynos_mmc_plat *plat = dev_get_plat(dev); @@ -301,10 +303,6 @@ static int exynos_dwmmc_probe(struct udevice *dev) return err; #endif - err = exynos_dwmci_get_config(dev, gd->fdt_blob, dev_of_offset(dev), - host, priv); - if (err) - return err; err = do_dwmci_init(host); if (err) return err; @@ -335,6 +333,7 @@ U_BOOT_DRIVER(exynos_dwmmc_drv) = { .name = "exynos_dwmmc", .id = UCLASS_MMC, .of_match = exynos_dwmmc_ids, + .of_to_plat = exynos_dwmmc_of_to_plat, .bind = exynos_dwmmc_bind, .ops = &dm_dwmci_ops, .probe = exynos_dwmmc_probe,