From patchwork Wed Apr 17 20:43:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 162426 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5955685jan; Wed, 17 Apr 2019 13:44:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyylV+toodqofExQCp5wUxw55LhekNg490D0IUR9XkIw+FZLVAYZypt2MZyAVgo9Hx6RqGP X-Received: by 2002:a17:902:3e5:: with SMTP id d92mr87109400pld.11.1555533875570; Wed, 17 Apr 2019 13:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555533875; cv=none; d=google.com; s=arc-20160816; b=eVRyAn4Z5VeIkthxKMVwvXzPpQsc+pucSJzkW2ACWgj5UPkvXKh7YRnCYQp7x7iMM9 pb17PkDtk5vsCISrsfjN2mXimpNOGmuBJ0lPCYGhjbzYjt/t6x5gYs003eo0Bt0Jtyi5 wKThnkbYIfjSMNsv/F8X/2Vch4KdAhvTBfztFaZZ6OPi7wfMoDt5x1hvTuP8ry1BlWEw Q581N6eE7kif7dHgdYLo6Iw0N4cuqLzD728d0/rC0+7+4Tb0UJLehXu7pnRefb2Uo4h3 OQaov5tGdWlv8ErkFMlbwDPJpuuzChBng4jIxaJR0Iq48P4L5qZTeKXaBoxDeREkmXsZ jMWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Lh/dg7Ph5gI3fwf6VslQBt0/ChaA/QQP0d5LUMjUu4Y=; b=QjCzF9Ohy59mEUUECnkcYoA15E+mmyfG69B82ftxF38c5vJZj1bQVeAENcKsax2oHb Y2mxMJEPoJTWw0TyrQBMCt5IJhUK51ORayDcOdGCBtx8sjUz0P4Lj0OAiDXlnLv5VX0v YibF1zXn01+NXdP6iP+ZaQM1MpU3sbF6SUQyhko0Hb1MOmu3TegMdbEhQkitJ3iMRnQu lDI7cNj1iGQygjxKZTXJDLPUel3nHL96EFOwWYmHjNLm2EyLxhMmPd1ii1HdZzf691QY wJQTTKpqCEVQ+aXXnXdnAzw/ZPzAQWr5YUbCG6apK8uKjZPAzyUjwPi5uVsQogck50Ac 76XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=1mPpeghD; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 v24si50992635pgi.286.2019.04.17.13.44.35; Wed, 17 Apr 2019 13:44:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=1mPpeghD; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733151AbfDQUoN (ORCPT + 5 others); Wed, 17 Apr 2019 16:44:13 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38537 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733102AbfDQUoN (ORCPT ); Wed, 17 Apr 2019 16:44:13 -0400 Received: by mail-wr1-f67.google.com with SMTP id k11so93708wro.5 for ; Wed, 17 Apr 2019 13:44:11 -0700 (PDT) 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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lh/dg7Ph5gI3fwf6VslQBt0/ChaA/QQP0d5LUMjUu4Y=; b=1mPpeghD3+pEqAmcuNDF7gqDFMo758uoBAud5UHWZIUDtRk8EjnSryUQy3VJHxY4MU FKz6W+RMZjKwMLDJgxlVOUSNX54BW4Ce1y6FcXZqfgiXH99tLHDoEfH5iK4lAAUXlao4 2JDLy83rqkypIHa8CnAINKxYgU8w6FWfZIRRg8acw8dwGpYrRAtlFpDe9JwOUGm2OyJA qP0caZxUs0ivVIhNXdfXM50LKf9gan5hMB3RIYiowUH10Ubv94nQa7SQxG3AAAEvEVqw 1x9jk61VkNsP+DKjek9Mds2fAVoyxjeOAIiObHA67mtw7wNfE2lLGJyJjS5YN1MwMegy PZ7g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Lh/dg7Ph5gI3fwf6VslQBt0/ChaA/QQP0d5LUMjUu4Y=; b=CO+KhaGfwtpzoMGZc3PrFfaMjGPrILHNFAaBYbYDJ6hO5kqFt0DIHDlD2UZAQb2Z0p fZenUdVyyUz+/X4Jo8F5BRPCf6BFidxE+4PT+z8lexAsX/1u40yLMwmhbjZtNOCxl1pC U2a14pi7u2A4+C+Qy2BvKv3BIpUdLZ/N6+o5oHOW7uQtoLNStUi3jsLvjd/kR/e+8DS3 /5HOGmVzfJHWtn9pjG6IBA+I/oDjIjDpnMHWfHiP8WPn1Yzd7RHV1HiOCMEGbDVxdqZb 4TLZPF2HtjEEg4bhuZ6S98P8g5ZIDqs4/+rIARo91NItIOu7LUWdmw2Db/uEoBSwqCvV 97sw== X-Gm-Message-State: APjAAAXXlGB4A52byFJzn02Ww125MACe/NgjKfdbdzYJa7vYeWQY0dP0 J9Z5tYZSwBYjn8o5sZXIxPZEow== X-Received: by 2002:a5d:6889:: with SMTP id h9mr34623582wru.12.1555533851257; Wed, 17 Apr 2019 13:44:11 -0700 (PDT) Received: from boomer.lan (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.googlemail.com with ESMTPSA id c20sm98716866wre.28.2019.04.17.13.44.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 13:44:10 -0700 (PDT) From: Jerome Brunet To: Ulf Hansson , Kevin Hilman Cc: Jerome Brunet , linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] mmc: meson-gx: disable HS400 Date: Wed, 17 Apr 2019 22:43:52 +0200 Message-Id: <20190417204355.469-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190417204355.469-1-jbrunet@baylibre.com> References: <20190417204355.469-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org At the moment, all our attempts to enable HS400 on Amlogic chipsets have been unsuccessful or unreliable. Until we can figure out how to enable this mode safely and reliably, let's force it off. Signed-off-by: Jerome Brunet --- drivers/mmc/host/meson-gx-mmc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 3df50b53f834..118f09da8dfb 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -823,10 +823,6 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (meson_mmc_timing_is_ddr(ios)) val |= CFG_DDR; - val &= ~CFG_CHK_DS; - if (ios->timing == MMC_TIMING_MMC_HS400) - val |= CFG_CHK_DS; - err = meson_mmc_clk_set(host, ios); if (err) dev_err(host->dev, "Failed to set clock: %d\n,", err); @@ -1339,6 +1335,13 @@ static int meson_mmc_probe(struct platform_device *pdev) mmc->max_segs = SD_EMMC_DESC_BUF_LEN / sizeof(struct sd_emmc_desc); mmc->max_seg_size = mmc->max_req_size; + /* + * At the moment, we don't know how to reliably enable HS400. + * From the different datasheets, it is not even clear if this mode + * is officially supported by any of the SoCs + */ + mmc->caps2 &= ~MMC_CAP2_HS400; + /* data bounce buffer */ host->bounce_buf_size = mmc->max_req_size; host->bounce_buf =