From patchwork Mon Jun 10 01:12:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 802955 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp1735031wro; Sun, 9 Jun 2024 18:16:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXq7dc/T8OT/MOKncXss0yEmIK7N5lDMoqdUk6+bJaYCSbAuSybxyyLPtSVh/vaVwMd8bbu+JO9nPru3Fv1Fljw X-Google-Smtp-Source: AGHT+IH6jUK8K8EH10h1t7DtmyoxQvmtO/dVcPnf0NbGrywTQAS9N9Kwups8bMFMEfo7rDMrJccO X-Received: by 2002:a50:a458:0:b0:57c:7e8e:ad85 with SMTP id 4fb4d7f45d1cf-57c7e8eae8dmr1192965a12.29.1717982203034; Sun, 09 Jun 2024 18:16:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717982203; cv=none; d=google.com; s=arc-20160816; b=oxWMj3O97XmX6OZXVaIYbn5wOfdiShx0ZGcxaMEo6eD2h5l/ZCh6lytWEp03LoCDL8 WgBYG1HwEqmG6M+6ZIiHV4NLFHjg/JaoSHWWfGSHt6t3DVJGeEA0M/sbGrIws2qsoxD5 E4pWzShvDBziam7FydEuhEvKEdQFRZu0oQeOjftnb0zx9fzCWwQJBZ5UH4Nfnuq+bmTx BsJiDrwEP0Y8kaA+UXYw753bDrEMnp2JPeXpIRBDdjPYdolD2RiR7qIwbyjho0NKXJqG 1/ZcMetSIAVo4md1LjGsfteWB968SHPwV0ZtXPtsJux8MnxiTcL3tD5W3CoY9bWpWBEN fFCw== 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=TWuiRkwYfnSkNX7yMTQMOdsupA1/S3nuefRl1iclhSw=; fh=S3xUgAkWJ2IxOWlJ3em1fXxe9er16nmIVlxaSj4BzUo=; b=AsUyl3YiAFiNZh8t8wU+OQULUGsvbpr8ex2A5YEjrBRiKnw9ZakJoQdk+ktOxV4hmv 561isZSnVEJdnUUO8zbjYf66hmSneRagVQRkj+dyWiT/pB8oTJxnW4y8gqusPCgztglZ dgAAhdFYBjEI7QaA6Fsh0fZVJFHTtozW/Nb5cEor44FMuNHI5YilaI1qHGwnEXN2NbLq Q66LZfAzlytoTJbNgZApCjBUiHLPGsjL5TszX/j9FVzwhbqEmRVoXyHdz6cPOORFEsKx 0+iaa5gRfEKnwReWL410iqouJ2IfkNw99DyolPBOxOutMYOCr8widklnuyFKDLx8NbyT 35FA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="e/F6COw2"; 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-57c753996e9si1375208a12.291.2024.06.09.18.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 18:16:43 -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="e/F6COw2"; 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 9507B8854B; Mon, 10 Jun 2024 03:12:50 +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="e/F6COw2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A17988528; Mon, 10 Jun 2024 03:12:48 +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-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) (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 D7BBF88477 for ; Mon, 10 Jun 2024 03:12: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=semen.protsenko@linaro.org Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-254a370e7a4so484736fac.1 for ; Sun, 09 Jun 2024 18:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717981964; x=1718586764; 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=TWuiRkwYfnSkNX7yMTQMOdsupA1/S3nuefRl1iclhSw=; b=e/F6COw2Fuu322EE88hoV4i3zpO6HUOr4/C1rGyumbAY6FPSlqWe0YNukPuP1+Ezg4 F3bCr0FYagDU0nfm58usYf9M+TWV3SzfMCYosn+MJHWdK+OAqK5jSdvwr3YnYNbatMoc MZ56WkeR3WsNGn0a3QzmZ2vHRz3v800i2I6kGoigGsVUVsWECZsM0ahOjsAq3tV6PgQ0 OQ7zaRUrzKrUH2Ke46nxMxZLL+1O5z50pM4AWiBQJJ6F9UDXqjdfC6WAQ9DflBanqLIT LPLdnKq79ePpYVTFyCJh+eIqIFN3+oP5aOPXFTA1d4N6mxzflGEIHLbC/rrDYaTYT1Gn JpXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717981964; x=1718586764; 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=TWuiRkwYfnSkNX7yMTQMOdsupA1/S3nuefRl1iclhSw=; b=SueNbweKAdSdl3AWYb6S0gOKCJLLRwj9Kwyg+Xe96zAui6vnLt9zmiF07y/cTAUnHl 4OcK7m/GemCdif4YdXV068qMwr8Ef/ir0jcSOnXSDavq6sdE05VVH+vF0+KlyaHsFsql wkEtixRBxRug07efqlROqNGjNYYOuvi2cyKRclwUKt+jQGhZ/jNFRsFgpHVMbLgtWyMS arqYNJ75bmtJEQcgbC8CP+s5IkeOS/zp6RIw08cyXV6gnplRKfItylU9opdAbMhwayC7 tuJnPgpYaAn1D9uIqal4xlp6WIzFCZvmKjp8FFeuD2U4NwFwTdJsYb9SxlVasdhBINR/ 2b1g== X-Forwarded-Encrypted: i=1; AJvYcCW2bVd3cPeD4b5DFKhN6ekv2KOAVHjxk9+HcCG/G9IDEteWaIQI8MX2mR9UvxfPicwARaEt7tqblOr9iU5HO8ZUaMoDiw== X-Gm-Message-State: AOJu0Yxx6vU7zeyQF44WIYdK9wp4qMgtYnQ0ttRfG+c1bCzSicLAaXZ0 QCRgQdZ/s1MAp2iTYNTTwmPqofuHyovZMBS7owMtyGfhEvE2Bfufwg96xbw/bHg= X-Received: by 2002:a05:6870:4710:b0:254:ae7b:28ab with SMTP id 586e51a60fabf-254ae7b2addmr1575360fac.13.1717981964440; Sun, 09 Jun 2024 18:12:44 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-254b17368b2sm615173fac.4.2024.06.09.18.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 18:12:44 -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 24/40] mmc: exynos_dw_mmc: Read upstream SDR timing properties Date: Sun, 9 Jun 2024 20:12:10 -0500 Message-Id: <20240610011226.4050-25-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 The obsolete "samsung,timing" dts property is now split into "samsung,dw-mshc-ciu-div" (for holding the internal DW MMC divider value) and "samsung,dw-mshc-sdr-timing" (for actual timing values) in upstream Linux kernel. Rework the driver to make use of new properties instead of the old one. All affected dts files were already updated accordingly. No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/exynos_dw_mmc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index eb2d2d204def..a6e4d76fb25a 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -228,7 +228,7 @@ static int exynos_dwmmc_of_to_plat(struct udevice *dev) struct dwmci_exynos_priv_data *priv = dev_get_priv(dev); struct dwmci_host *host = &priv->host; int err = 0; - u32 timing[3]; + u32 div, timing[2]; #ifdef CONFIG_CPU_V7A const void *blob = gd->fdt_blob; @@ -263,16 +263,16 @@ static int exynos_dwmmc_of_to_plat(struct udevice *dev) } /* Extract the timing info from the node */ - err = dev_read_u32_array(dev, "samsung,timing", timing, 3); + div = dev_read_u32_default(dev, "samsung,dw-mshc-ciu-div", 0); + err = dev_read_u32_array(dev, "samsung,dw-mshc-sdr-timing", timing, 2); if (err) { - printf("DWMMC%d: Can't get sdr-timings for devider\n", - host->dev_index); + printf("DWMMC%d: Can't get sdr-timings\n", host->dev_index); return -EINVAL; } - priv->sdr_timing = (DWMCI_SET_SAMPLE_CLK(timing[0]) | - DWMCI_SET_DRV_CLK(timing[1]) | - DWMCI_SET_DIV_RATIO(timing[2])); + priv->sdr_timing = DWMCI_SET_SAMPLE_CLK(timing[0]) | + DWMCI_SET_DRV_CLK(timing[1]) | + DWMCI_SET_DIV_RATIO(div); /* sdr_timing didn't assigned anything, use the default value */ if (!priv->sdr_timing) {