Received: by 10.223.185.116 with SMTP id b49csp736705wrg; Wed, 21 Feb 2018 06:10:11 -0800 (PST) X-Google-Smtp-Source: AH8x227oUH8L1oI2R1/wlKO1XURsYz6t08UE/5jyNztcf1ZDFShn29JSyeMC12szpIoxKKKeJoPm X-Received: by 10.99.186.73 with SMTP id l9mr2785210pgu.83.1519222210961; Wed, 21 Feb 2018 06:10:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519222210; cv=none; d=google.com; s=arc-20160816; b=ZAQFAyWzx/DfjSiYvQlQl0YNvCY6x25an2kCTerXkDYZU06/dNZSMbeRHneFhLGehU RrogIrQnw3ovzCX6TcGvmsTE/xSYINOymyZ6C7iKeLUeCHJVNS4GWr9fhygu+CcvNmdm /+kkueoZ2+SR1c8KYhODquYvDfl13LiJ26mBpt5N5i3ufed0yWhTDcedh2M8d9Xj/xw2 Ql1ODat2qQVDmP11VZkZwN+5DBQINd/QJYzfKGE8HDFoiNPeNm1sL8+DL1+sL6LfwENw zIpachTypOz84vB+dz8GdjRFBY86LTBsyHrOT9wRza89fZCmiO+ikP20DH4RO4+rssSe Bt8Q== 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=pM8E0E9HtNkwpKzyesgp/+UyBk0zqgZE6enbO5uHy5w=; b=EODMG+BOScimrD9xhfXU0G+Mq/+T3aFiQSZkGSyLFg07t0z0NgSCF01zPeU8RKwUYt nYGb1MJwE0n1R4LXPDfFYSduyrsORs8WnjZl73A0ud8veQ/0JTNDs7Cl33hoD3wMVARG HKqs3caYbknEL9vEkLpmO8F4l6W25eKQ0M2IbcfyqcjQCNdLYE0r/JYCQCnr5I40BCCL 8EBz3w4nqNxLCDc5krYOOYyMpfk0f+Dy4Z11DuUqZ5Q5wkGBzsvfdyduGlC7Fdn/NcqG lQ8Sp07bTbLRzGDovY/1r4swbGo4jgAYa4ecWBp/8HvZSSnjxmRj1/8rs2opGEcAt0dx Czkw== 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 w16-v6si7397284plp.276.2018.02.21.06.09.56; Wed, 21 Feb 2018 06:10:10 -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 S937425AbeBUOGX (ORCPT + 99 others); Wed, 21 Feb 2018 09:06:23 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38984 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935559AbeBUNCY (ORCPT ); Wed, 21 Feb 2018 08:02:24 -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 F08EBE4A; Wed, 21 Feb 2018 13:02:23 +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.14 102/167] Revert "mmc: meson-gx: include tx phase in the tuning process" Date: Wed, 21 Feb 2018 13:48:33 +0100 Message-Id: <20180221124529.945115035@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124524.639039577@linuxfoundation.org> References: <20180221124524.639039577@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.14-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;