Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp154433lqe; Thu, 4 Apr 2024 02:41:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLtwHYsECUQR1Z36Tn3ZJ2KM1Q66k59/KYoDTtCSp0tjueDQRxcMY6yAQ5Iuim2fJXa0SirrOufENsTqh9mmaXLIbgK5tzDFztIGCe6w== X-Google-Smtp-Source: AGHT+IGDW9gINcKxHgxUoum8mWnhL3/rs3TZy0vkeEQuecPoQWinPxVFTgnYW84/rtzsk6h0uytO X-Received: by 2002:a05:6a20:dca0:b0:1a3:aaea:a45b with SMTP id ky32-20020a056a20dca000b001a3aaeaa45bmr1911950pzb.39.1712223686549; Thu, 04 Apr 2024 02:41:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712223686; cv=pass; d=google.com; s=arc-20160816; b=L4pJRLNlGg37iCGdB823h0TH73Knz2YqT0IUYpiViR6wrstpLhUZ/YZ7GHe7rmIVqF cmzBGWstwRuaNQ+gmFZbqodCoxtcOkyuGVbB3Tkj/69S8Q2Nw+TiEWDkEhjP5AihQ81g cU0+pCesIudguU7WDeaEO5h24JBVlkSzIGd4xxLvQbFzDHfjZKTiLLwQv060wmDAw6K1 7TL4nxqeAM+ze4b3vvOYL/tWIiUHuyRADlKvm9qJvEwoZ+3hYpLzjym+7Ks3XLh57+5U tkhSosA9hKcPbm8Sx3wkVd3YawPoEg0wIMWpgvnNRrfgSfVXag+/p5bzuxv3Lm44zG+3 rcnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=HO/dDAUuh8KUawj8ZZNT4wZzfYA+tW547HrSsmqTFKM=; fh=iLiAk5AbzFqSKUn/rYumyrMWQmP6rANxjKpVS2tw1eI=; b=iaANT3JclH8HY0iOlVteUf80rfvVLNRertwD2TldwHzm7NzCkxJO3Y2dtvk/77kWQE XPQb/+2hT99ODAtZ0jqHIZ7LXA/mQSFFMk/7mEmzKNE5EaGPGDU96gInRrEf2ydJKh7Z lACC79jKvFgLGz7qoPrjYBCsiVoAR1HQn2EfNxVgTMihI0ViIXw6j9beKelJzmqBFOHI IIPSu9txJsBrqeTQpyIfjt8pdpBJVanqxZiK+a04r7IJ6PdMkp3/ylrgtKT2D0v7XuHc DU9XVvRIMpGnbz9oVHbgfhBFZmLoGrtQXRv5sAibC+vmmsYVO4SuQ9KbPyWmLlb0+yXx VWkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xZT/jAwa"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-131187-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id fc32-20020a056a002e2000b006ea8ed74f58si15438230pfb.317.2024.04.04.02.41.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 02:41:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131187-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xZT/jAwa"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-131187-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EF3B2B290DA for ; Thu, 4 Apr 2024 09:35:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91BE57F7C1; Thu, 4 Apr 2024 09:31:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xZT/jAwa" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 324A578286 for ; Thu, 4 Apr 2024 09:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712223100; cv=none; b=ugfxTqKIREmxdCB/FPZwz8UU4FwghIqiHbq1rYsr8MqhDWF9ZwOpOadRhbsLPGFRAs6sdg0w9xBwgK/2UfunjFeuRyTos4sc38Q094lZi1UZN8gOwViozClIp+lpgKWbdqfPxWqXOFysjXGCJr/H4kORoq1+XFg9RDGth4usElA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712223100; c=relaxed/simple; bh=w5umMME5XeGEOz99SzYrMx+dj2pL8cBzPjsa+F50+Ec=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Zf/zOFxtK0y6hkHgVtTXkqczB8/h9bYt/6YqSFUzMyTIwquaGxSWhvflGXNaUVIKrJ29DVTPOxGX6v3dbMhMy8q1nA1Vz901XkFVsr8xMZfguphx7GIMNIV5WFKOsQp9F8dQptmN1xnvwDbJJZH40rf4oCBaL4WKzkP7ZQFB1vU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xZT/jAwa; arc=none smtp.client-ip=209.85.219.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-dcbc6a6808fso814243276.2 for ; Thu, 04 Apr 2024 02:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712223098; x=1712827898; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HO/dDAUuh8KUawj8ZZNT4wZzfYA+tW547HrSsmqTFKM=; b=xZT/jAwagTO0oqknp82OdBzpTJ7+TkZPySgC4rtgE35qbxJoPP7EDq7ILxS+Y/d68X vUIN21lszyAZFOIZSUD2qjpTMsE/Hd/dOsbKsSJ+ivNKal6z9MPl/S8QdMcz710maDZ1 hOTKC6K725k+oJ1OIFSX7R96IopX7f0pdhNMBbYSaxW8OTABKFlainYgiHRLdAqSC/K6 S2MCjhTOyV9ZTolU/bNqy+bUddmoa+Z+MasXslV5m0TFXx69WW3v2vZuZ3O52/OrfA+W D6n5xkl7NqzH9q+8VEQqrOte0YyXEcBVNqfKZDULjnKhuhO4wufuBb5aEdkSWzWnUNXY YGBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712223098; x=1712827898; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HO/dDAUuh8KUawj8ZZNT4wZzfYA+tW547HrSsmqTFKM=; b=hFP38Mt3KCAZU2B72bw55h5SL7Q8pINd4FllcYs8fpcv+DhgTP2q6tvtVx3G0wsA8j y/4czvSECUsSU9s+swI6Ds73O258v3vRhlYZNNKCok8ZJ9rPF58FCeCWpXnem4Y1/R4q ww50sfHb7uuwMZwQE4iu6yvOB0zq6lrZCJxI+BxVAii/061x+Tq9Xxg1sMICbEjXsAJs Cw8zHbo/cNXtDXW+TbKHb02hSkAisexmfYjpe3oIe6JzlKQPYxRXVLV1Xr800+Kgh2+h ZI7WZ9stzhW2ixdUuKTIhzceRZHF4XKoffBLknmagwivXFdjjhMEvZIdS12ldVxGktKL mLXQ== X-Forwarded-Encrypted: i=1; AJvYcCVfTbh51Ue9oYZ3klen9/D5AIhXxWjdFFQyPkeX1TH5Q8fiq/gG1DecFzvnqHp+qD1vzjW0YwreW00P6rkp8iWRfDpcjZJ6byMEDWU9 X-Gm-Message-State: AOJu0YzuyuW/7qYY8fi5C08kByh+FhK/sOxrAksc5mYLMrdNNMdVfosw cgT6/bh6EeP3XQAfAgXTh6YDPzYgHG/CuqtV/MgcIIGuVLCYlGSC9MKIZu93ICAVgTmS248dU3S k0v/HPksJD3JglWwD9Bmkm8iJvZBtStWLZNd5Cw== X-Received: by 2002:a25:8405:0:b0:dc6:c2b2:c039 with SMTP id u5-20020a258405000000b00dc6c2b2c039mr1947696ybk.41.1712223098167; Thu, 04 Apr 2024 02:31:38 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240402093539.184287-1-bigunclemax@gmail.com> In-Reply-To: <20240402093539.184287-1-bigunclemax@gmail.com> From: Ulf Hansson Date: Thu, 4 Apr 2024 11:31:01 +0200 Message-ID: Subject: Re: [PATCH v1] mmc: sdhci-of-dwcmshc: th1520: Increase tuning loop count to 128 To: Maksim Kiselev Cc: Drew Fustini , Xi Ruoyao , Adrian Hunter , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Tue, 2 Apr 2024 at 11:36, Maksim Kiselev wrote: > > Fix SD card tuning error by increasing tuning loop count > from 40(MAX_TUNING_LOOP) to 128. > > For some reason the tuning algorithm requires to move through all the taps > of delay line even if the THRESHOLD_MODE (bit 2 in AT_CTRL_R) is used > instead of the LARGEST_WIN_MODE. > > Tested-by: Drew Fustini > Tested-by: Xi Ruoyao > Signed-off-by: Maksim Kiselev Applied for fixes and by adding a fixes+stable tag, thanks! Kind regards Uffe > --- > Previous discussion was here: > https://lore.kernel.org/lkml/CALHCpMhc1F5Ue7U_gsDXREHUZRVQJNYRCJxYxoNqbN=-39jf7A@mail.gmail.com/ > > drivers/mmc/host/sdhci-of-dwcmshc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c > index 8d6cfb648096..1001b6ea1a89 100644 > --- a/drivers/mmc/host/sdhci-of-dwcmshc.c > +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c > @@ -706,6 +706,7 @@ static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode) > > /* perform tuning */ > sdhci_start_tuning(host); > + host->tuning_loop_count = 128; > host->tuning_err = __sdhci_execute_tuning(host, opcode); > if (host->tuning_err) { > /* disable auto-tuning upon tuning error */ > -- > 2.40.1 >