From patchwork Mon Jul 22 17:57:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 813765 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1986719wro; Mon, 22 Jul 2024 11:01:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXcjMCEY47v2n7Ca2eJX//HYnrx5guNpvAAAZJfa6TYlNvYPZcIj5c0+fSCrOXINPEs4PTaDsKA9l34zKXSnEky X-Google-Smtp-Source: AGHT+IHYfdFlP3azqG5kJ2Pg+YPV6KRvJxZ1OtT4s2ENyTPQimIrOjQLkxPz0ANY2zHr2QGF4p+X X-Received: by 2002:a50:bb04:0:b0:5a3:d140:1a39 with SMTP id 4fb4d7f45d1cf-5a479879b3fmr4416327a12.1.1721671310804; Mon, 22 Jul 2024 11:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721671310; cv=none; d=google.com; s=arc-20160816; b=Ld0vNByzc9nbV8hdVbgOo6k+BM16WQJnniKO+R4Jpk1IzrZZL8g24PzLD7rfs6gMeb AHMTb6jZEompIj5bpR5v8AFV1KAk+KbQ0dP7diyTWIceM4DuTEx9rD1ADEuzTHiQByps DSvSv8tPpVIDBfMcDljTxBYM0pchK8m8BtwO1uw7BMhrtaoTrtG/waDV8XMnBe2C+3MK mBlKKWuxWsB/iKj1luRNmVRFj8Not3xdrpoEw1JYWU/NubJNTmnwl6xcIQXkaJjDblF1 UcX8U9h4n44w8ShkrSzq71Ju/IKVcYF5y13a8GW4xjbJrAGxIUMp+FQMs3eBYrr1A/Ec iKiA== 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=xaXsGm/EMP0xrerv4pMH9IvwpK22W5xwacPA9TDWRnE=; fh=IbgSS7WEOlBwi9fHWyiO5kAmnbB6+vMV+vyqQp8/8CA=; b=YAT8KFY2vM8TYyNqOov7GRMVgS2wXpEaG63bczwPmyul7yUOBD5LK+HnlOn1wb+ToG yvrnyLrImQ720gIJCqeiJbOf73WVE3VLeRXjyoUh93p00SipvPJehVmW2LAQzAonSYdQ 46ZP4AkrgAJ8nYirT5Vd9nVeAVxVYiiA3xFptVuRp3vxMLCABDeX+5hrW7kZeYCPH8Yx nJ6k02hxpl2BcVCMogzcp9b9uv0aLMzH7i5jG6H57m4xrRpt6wNtIry1tM4rEbvM2THh Af/tYuM2YUfa1oMXAcJu5cwUx+4v/EJOOgq5X5V7r4A/ouTTP8ge/HYPLuK4HVM5ZBoU F+Jw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BW85u562; 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; dara=neutral header.i=@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-5a74817365fsi2052204a12.437.2024.07.22.11.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 11:01:50 -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=BW85u562; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19E1F884DC; Mon, 22 Jul 2024 19:58:07 +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="BW85u562"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4393A88614; Mon, 22 Jul 2024 19:58:02 +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-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 BE4F688614 for ; Mon, 22 Jul 2024 19:57:59 +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-x32d.google.com with SMTP id 46e09a7af769-703775e4d5dso2242966a34.0 for ; Mon, 22 Jul 2024 10:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721671078; x=1722275878; 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=xaXsGm/EMP0xrerv4pMH9IvwpK22W5xwacPA9TDWRnE=; b=BW85u562zC+FXTO2TDya/cdolygZ7rC4tZdOhLZdW8FVGI09euRAkqmzlLh2nIzVia ksY8yXbaAadlXsG2NNH5FdrfnC2eLqD1xb2/4ci4zAmvtJqe+3Pa8C67ETYy1edZl6Dz PgwJISRtv/8hJ73peBrZkeEvqmfILODJohQFeMLeVCEIPrAeVNSA6iAM6ZaQDsUb2PLH ls/lyoUucmog+2PYWnYgt3tJ6sw29Dr81ZhrpHGYZmyCtUTwV7/VQ7Qscu5EVdb3Uz+b JphdwFrGxGAyIph3gkhz/icfOw7JoZpOz4eCV4gjnYOPE2rsxXHK1uJyM2XkUJuNuG3Y u9cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721671078; x=1722275878; 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=xaXsGm/EMP0xrerv4pMH9IvwpK22W5xwacPA9TDWRnE=; b=dVLCB49Ga07mqGZc1g9qIfVluybMQexFCmUar7a7Y9VgSkOlEuVEbXCGPO0hKOVNHc 4P9iLMmVEEvxQHo+r9I+Xxo3tUEo8QLA/swC3jzCG0O2K8dNyuOyr1f2YrWg7guljvfd Ev7I2qmZW0KtvXY2LXbLmKJN648sDdqZGVU9gSTF2F2HEDjNkF7AFg+p3HGEer80dvZz Bn0aW+TXZ+2ALIzsJZ/OF/pHv0AmMzSrWFiif9wDIVmQw/rMbZik/CEsBS7jKVXnhcOa M2pc5wZ7nY4Vj8nbm5op0UbDAEwdtR0jPop+Ccxwg0NZQoVo1voMyTdIQC5Nd7+I4jGk Ddew== X-Forwarded-Encrypted: i=1; AJvYcCUs9tktYIP8It3tZ+s809FLSETkMgQ+mp17djujnm+gGOpkv1elXq2wC3k6zCGjBs6NM112tM/A+Z8yJTTcr03SHKTdeA== X-Gm-Message-State: AOJu0Yxug6PVtIjjVMIWiQgYJRymDNONgsMcDYgQ6Aa1RTIf75Iuhbdo U11RkueFqo08FH28Z5zZwKqRR8qpInxKwA2lzd54Xb2PnyZmArUUblijxiNDFo4= X-Received: by 2002:a05:6830:3814:b0:703:77b1:c653 with SMTP id 46e09a7af769-709009b1172mr11080955a34.24.1721671078530; Mon, 22 Jul 2024 10:57:58 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-708f60d6ed1sm1635243a34.39.2024.07.22.10.57.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 10:57:58 -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 23/38] mmc: exynos_dw_mmc: Read upstream SDR timing properties Date: Mon, 22 Jul 2024 12:57:25 -0500 Message-Id: <20240722175740.6985-24-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 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 --- Changes in v3: - (none) Changes in v2: - (none) 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 50d0208b29fd..4108af47e518 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -227,7 +227,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; @@ -262,16 +262,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) {