Received: by 10.223.185.116 with SMTP id b49csp712483wrg; Wed, 21 Feb 2018 05:49:24 -0800 (PST) X-Google-Smtp-Source: AH8x225LKcmLQb9CkDEKCM2djpvizLUSP/7RtsMFmUPH+t0fsZkjUs8C12l1W6lLAQlXBws4JduZ X-Received: by 10.99.3.8 with SMTP id 8mr2776710pgd.5.1519220964420; Wed, 21 Feb 2018 05:49:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519220964; cv=none; d=google.com; s=arc-20160816; b=YGmHfJ3a1fn5HvboJxZH4IeSx91CU/+xGbiRO5QZUWYL14qtbPAfga8HIDcS68ttIl zWZkrzACMy4G141YbAU+Kn6+p23FbvIiHj24vwUGj/Tubr5VxXFlwqou07pkyoGTrniN qaAgtb2laxI4O7Oxa/+MchGphnHP0L3F+dUhPsc1zacd3nOjBuYP2vz1L4mv8R0H1esa xBbCoLiXYwCHUBSJb3gRte1x/anyRzwycQVZD9pWwjTxrLAl+eZSzSUHssmPOLoVbgIB nes5SKnER08dIZPS4NILZoIlGYqCiNogDg2eO7vbRvucLKRibM667Z0KUH0O0CdFNxsh ZNww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6irKT1RvFfu1QbFDOWTCNkgGkMHbjAh4sCvymFdmxTM=; b=vb1ffvmhb/2Vb279+GN8p+Hvs5N6beVDjEQ45vErTbs3UmogrCdmr1kkV+gt9ql7BW CsWobqNHVZ3x77Q7rm1I7PLdLcJwC5xPwNwROPiMHqpL3Nqo8EppOeFn1FhmsTFaPPMt rVHHHbTlErgY6iuSmqeyWc6NVqGztT0RfoBVPLGDbMvcOICr6tZzqiSc/uqq1gLao002 9xbW2JkIMaNLR2Znuwb2DQn7SjP35l1EFnbF/xS2wfAoeFCm2Ilbv5P3XZnl7vCqgvGv Q9vITwwHYwLKJ1x+fzdKttdsLpZrdE2Ru4kmODqace/kqBUXUKOhK3z/dpa7WP+tRDBm AqUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si889392pfg.51.2018.02.21.05.49.09; Wed, 21 Feb 2018 05:49:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965530AbeBUNKY (ORCPT + 99 others); Wed, 21 Feb 2018 08:10:24 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43672 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933491AbeBUNKW (ORCPT ); Wed, 21 Feb 2018 08:10:22 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8099A121B; Wed, 21 Feb 2018 13:10:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jerome Brunet , Ulf Hansson Subject: [PATCH 4.15 103/163] Revert "mmc: meson-gx: include tx phase in the tuning process" Date: Wed, 21 Feb 2018 13:48:52 +0100 Message-Id: <20180221124535.974823585@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jerome Brunet commit fe0e58048f005fdce315eb4d185e5c160be4ac01 upstream. This reverts commit 0a44697627d17a66d7dc98f17aeca07ca79c5c20. This commit was initially intended to fix problems with hs200 and hs400 on some boards, mainly the odroid-c2. The OC2 (Rev 0.2) I have performs well in this modes, so I could not confirm these issues. We've had several reports about the issues being still present on (some) OC2, so apparently, this change does not do what it was supposed to do. Maybe the eMMC signal quality is on the edge on the board. This may explain the variability we see in term of stability, but this is just a guess. Lowering the max_frequency to 100Mhz seems to do trick for those affected by the issue Worse, the commit created new issues (CRC errors and hangs) on other boards, such as the kvim 1 and 2, the p200 or the libretech-cc. According to amlogic, the Tx phase should not be tuned and left in its default configuration, so it is best to just revert the commit. Fixes: 0a44697627d1 ("mmc: meson-gx: include tx phase in the tuning process") Cc: # 4.14+ Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/meson-gx-mmc.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -716,22 +716,6 @@ static int meson_mmc_clk_phase_tuning(st static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode) { struct meson_host *host = mmc_priv(mmc); - int ret; - - /* - * If this is the initial tuning, try to get a sane Rx starting - * phase before doing the actual tuning. - */ - if (!mmc->doing_retune) { - ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk); - - if (ret) - return ret; - } - - ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->tx_clk); - if (ret) - return ret; return meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk); } @@ -762,9 +746,8 @@ static void meson_mmc_set_ios(struct mmc if (!IS_ERR(mmc->supply.vmmc)) mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); - /* Reset phases */ + /* Reset rx phase */ clk_set_phase(host->rx_clk, 0); - clk_set_phase(host->tx_clk, 270); break;