From patchwork Mon Feb 12 13:13:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 128048 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3197938ljc; Mon, 12 Feb 2018 05:14:12 -0800 (PST) X-Google-Smtp-Source: AH8x224lRfHPhLcxxU913gmrtBD2GtkQl9eqZmn1JaFfdq6ZjnckN3yFDRi/3lHkeyxCoHVr1orE X-Received: by 10.99.103.129 with SMTP id b123mr9092089pgc.177.1518441252802; Mon, 12 Feb 2018 05:14:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518441252; cv=none; d=google.com; s=arc-20160816; b=uybuAkxVZm9V3Itbiey2miixn6qnMp/WGZXGiSELY0QV/MWIfOMgCcH15Xa3MAQHl7 9bl8rlYwO+lyAE1Zvpa598XJPOLop/ZVeOv02Ix6lOhwpxuxR8r4pSunS6lPyyy7YYk2 cIKnyEj+GRh0jElFwcHZS9xs2pc7CVIRzVUx2RP1wHBhW8BJHJXgnlZbb8kHfsMKSp3H xPDKPPk2WmYQ02tlE2Qfmn3C3PN1jHpi+FOxqFk6WmnHO/m/e+d7+A6LOV9f1s8w9YaN rKCpRkMSDggOwAcWq8aHGIQFFmBgdKP7Bz6VjpQTVnlyZWLm3tHUq5UYAljJfHZEfeGN 0dDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=I9ARiRZjJe4w3Dvm+SaFssVf41svhxCNZAdY0Ruj7jg=; b=K0OY/W45xZsI1TBo9ZoEz/GaHUt0e5oaTjGaKSqLXowhimpKdY2uHP2XntC/O8IBoO GW/B/AYSJ2SkaJlNZZg4K5lPg74KUhJggbslCIjsfESlACIGoLiwHSCnDX+DzSyBgaPZ BgDX7TkZUtdKRRaHC4Gj6Vq1PrweoDXkMEwUiq7xqzRhVF/gDptcApxrMVJ/gO/mhocP HAH5qc++Pry6ZrolR2ikyOY4zi4d8dCStN5KHZmuu9Dk+oJgvIX9UxyXh1Zten/CWKJh Pj/i3CiAaH/Q5eLK3mjgNws5EZJmFkoVvhGFg2I93i04ewbGQGvRwTkwoA5fql+GxlQP 4QLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=od32XmaD; 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 d16-v6si5790769pll.210.2018.02.12.05.14.12; Mon, 12 Feb 2018 05:14:12 -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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=od32XmaD; 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 S935176AbeBLNOJ (ORCPT + 13 others); Mon, 12 Feb 2018 08:14:09 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:44198 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933035AbeBLNOG (ORCPT ); Mon, 12 Feb 2018 08:14:06 -0500 Received: by mail-wr0-f194.google.com with SMTP id v65so8338674wrc.11 for ; Mon, 12 Feb 2018 05:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=I9ARiRZjJe4w3Dvm+SaFssVf41svhxCNZAdY0Ruj7jg=; b=od32XmaDNJOw1n82+sfIga6Zgb2Vj8haTbfNU0KsJByjccxhHVYLi3FltIK7M0QQak m7UMGbDBCvDKa+gNxc3qie1SLcZGiTPkr/6kMiz9Va+SkVfGiL05bt0ujhifl9rQTWKF hYKw/+JZzU3rNY9SJ2iS03LxE56oxUM1z207a5TKcq+WKoX5SWZtxfWHgRMfDFFo+4Jg i96hlX3A8XrEmTT1UaLPqXqM+42bqfCNNp0kDHYVDfduDjmY8glRDOPSq4YZI88b81Ve 2JXg80x72005RVlJBn8O8j5BgxVeDh5vDruuA42zop3X5285GYVIZycFfgJjAas/cWmt FgxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=I9ARiRZjJe4w3Dvm+SaFssVf41svhxCNZAdY0Ruj7jg=; b=B3lb/W6pLkUfPTfgIXT6xjB3mziEkXzrQto1IwRcXxbhuq7Zzo8PyIljcqMf4xBVRh jxESaIs2AUEXios4eWDgNWohGAjx+QOo14rE3aipYuFNcSNBpR7vESF+BO0Ehn4BVXaX DKkzvxEXMHsegxzjtNqQzjG9s3OuStmkAn1ytmHKM0YcaIJc8p9Pg9d0Qr0lBqw8cZGx RkbdYlrAZPI0yxVgI4LwpFPurIu2CikAMQBD8o8krshAW8oqXONR/myrs2SDmTwYgvuR Zaobm/g/LrcRaL8JR+6Egm8I//NYlfT2UN6EEEdQXir49+gz/iNHuSFqvmi7iALMibIE SZHw== X-Gm-Message-State: APf1xPBKQOoYW9zVuv1OVuqSp3WrqGUOQF5aA7s2MLcJNVxDfW8W+uZj GZN8J5QtPTTr+3ddbriQBa0V/g== X-Received: by 10.223.197.13 with SMTP id q13mr9150534wrf.235.1518441245280; Mon, 12 Feb 2018 05:14:05 -0800 (PST) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id r189sm9187580wmd.39.2018.02.12.05.14.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 05:14:04 -0800 (PST) From: Jerome Brunet To: Ulf Hansson , Kevin Hilman , Carlo Caione Cc: Jerome Brunet , linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Revert "mmc: meson-gx: include tx phase in the tuning process" Date: Mon, 12 Feb 2018 14:13:59 +0100 Message-Id: <20180212131359.7741-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Jerome Brunet --- drivers/mmc/host/meson-gx-mmc.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) -- 2.14.3 diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 22438ebfe4e6..4f972b879fe6 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -717,22 +717,6 @@ static int meson_mmc_clk_phase_tuning(struct mmc_host *mmc, u32 opcode, 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); } @@ -763,9 +747,8 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) 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;