Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp924657imm; Fri, 29 Jun 2018 08:31:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeqYwTCzJv1PdX3HDfAHeSmgmed4EIByBXeUB6icsMJJgDFQnXe/s1g5y17GgvroqR8HJUH X-Received: by 2002:a65:6411:: with SMTP id a17-v6mr9297066pgv.287.1530286319848; Fri, 29 Jun 2018 08:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530286319; cv=none; d=google.com; s=arc-20160816; b=PohcVm+mlb6nrqLNy3FMurfTYUozuCxkWGLHN5tB2kPPhlrptI8XDxQt0hrIJ0jxrv 7PBaODbE4Uxd/6B1MdcnmYXJMJqtLeycjPbJ+4/6Sm1iQ9w9aW/rZKWB48R4dxrnCRB4 v3fdItn4Qf+ZKTMCMV8TFp1GQhZHdL6Nd15dOh16vWJgDqSLqtJPBtmi9iD5OQf6cTnR nQxFsHfFJ11Qnw8F3TlN2vQgII5ajAvJgtdMOGhqK+CM0GUd2h5uaOnhwiI8/CctA+Fu MN873ScrfLyPvthxuIoQXcjIgdtSgGubzxe5XLwj5tCfI78I+QSiW2fzJduvxGFU+9K7 yBwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature:arc-authentication-results; bh=CwwCqRFbHEyTqMqzFXWl2I8yfslqawjsUSw9GGxjSdc=; b=i2wUdi9QkREdGhL1tQbbnhWLRa2h5AsQXnZo1K9q31dLkk7lRtOg8b1+Urq/ji99vq JvPSYK5Co4aGsiBi7vqBVrqjj5bbO0XrAuha5DN6dFA2mxCdxsmgGh2n6w3OpobCKCmT emkg701ZkjjonYi3sHnUmVb4b7p+iSzXWEe6/hOx+WagUWWBZ/b8p+PyMuKPjLUjasJX XjKAgRtUgCuXnaciex2T8Te32sdUBUMZJh4wgngCr7zjruKZAWjO5zfFCJAeW3Eqatas Xf9XfiAS++ZExBH/7U3d7GvlcFcIKZiO7b0CpflaTM2mCBGmxUZAJBpTZ64NT1GLicMh 3F4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PhETt8bn; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4-v6si9262020plp.219.2018.06.29.08.31.44; Fri, 29 Jun 2018 08:31:59 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20161025 header.b=PhETt8bn; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936643AbeF2OB6 (ORCPT + 99 others); Fri, 29 Jun 2018 10:01:58 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41698 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932529AbeF2OB5 (ORCPT ); Fri, 29 Jun 2018 10:01:57 -0400 Received: by mail-pf0-f195.google.com with SMTP id a11-v6so4278281pff.8; Fri, 29 Jun 2018 07:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=CwwCqRFbHEyTqMqzFXWl2I8yfslqawjsUSw9GGxjSdc=; b=PhETt8bnLUePWB4sJrggreiv8AX2KpntpeWWvIn9D2hGGow8FzjDbtWbmp6iRN9/uZ bq967hdcoQVrpL4Bo9KGA6XKcQvcG1ZYXvaqQi9FYIgA6o3836y/ByRPVQZq/ASsWJyH Mn9zTeETdVH3C/PS8PQIruKZx6WFXxx1uD1NHa0yga2g2TZZIpXWjtIc4k51/v4xGiSC A5iEnnj2FScjeGGrUcQIOG8+/6UtpTOfbX7quTOH3XOwUOkbLRjuG18x/sC1oArqWmqW 75nDwJqfK+YP9kOdHDDXxQbHpRUC7EtKp62gIar3OKMWdwIdhkBBDvAJ5yHoTV3rrTSP NVXg== 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=CwwCqRFbHEyTqMqzFXWl2I8yfslqawjsUSw9GGxjSdc=; b=m3xecRqVRdoXjlz/zLZB9jNDCxmfwcTcT024dhOK57lH4Ye9LJPNxHZN+/jxhXsW1K l6qO2DVnlr3TnDaKhib6FcuP/sxfbsOPuq06JUY3NBtVYqnlvlDxmHqR1h5DVcxZZHFb nSdrdKDLCJw+B6YhSYWR02gBugxd26BidF9qGPajQtGG1PldpZWBDek8A3lyg33NrcHZ 8+KxY0Ss73YcoD8ldehZMY2/89mtVtuj8EvCajICUCc6L9UnTwioH+gCGGkGdhAC3s5I 5pq2iOkL3lvxjSgrWvBb6hovLULkrg+OiT80YJFpC4QqbloFuKIXZ5dIR0CQavYuOMGM vLuA== X-Gm-Message-State: APt69E1VgZsgI95GGQeNiBARHYMfVTZHwcTKBUdw8FApqD+uF2ueL5qT PLaqrf8vXoO3qy1NL6LrLRk= X-Received: by 2002:a62:ca99:: with SMTP id y25-v6mr14502171pfk.187.1530280914730; Fri, 29 Jun 2018 07:01:54 -0700 (PDT) Received: from localhost.localdomain (outboundhk.mxmail.xiaomi.com. [207.226.244.123]) by smtp.googlemail.com with ESMTPSA id k186-v6sm24705029pgk.94.2018.06.29.07.01.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 07:01:53 -0700 (PDT) From: "Huanlin.Ke" X-Google-Original-From: "Huanlin.Ke" Cc: kehuanlin@pinecone.net, zhangbo_a , Jaehoon Chung , Ulf Hansson , linux-mmc@vger.kernel.org (open list:SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] mmc: dw_mmc: fix errors to use card read/write threshold for HS400 mode Date: Fri, 29 Jun 2018 21:59:29 +0800 Message-Id: <1530280769-14114-1-git-send-email-kehuanlin@pinecone.net> X-Mailer: git-send-email 2.7.4 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The card write threshold is applicable for HS400 mode only, so it should return back except HS400 timing mode. The card read threshold is also required for HS400 mode as the host controller incorrectly samples the data if the card clock stops within a block transfer. Signed-off-by: Huanlin.Ke Signed-off-by: zhangbo_a --- drivers/mmc/host/dw_mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 623f4d2..d4e6983 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1065,7 +1065,7 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data) * It's used when HS400 mode is enabled. */ if (data->flags & MMC_DATA_WRITE && - !(host->timing != MMC_TIMING_MMC_HS400)) + (host->timing != MMC_TIMING_MMC_HS400)) return; if (data->flags & MMC_DATA_WRITE) @@ -1074,6 +1074,7 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data) enable = SDMMC_CARD_RD_THR_EN; if (host->timing != MMC_TIMING_MMC_HS200 && + host->timing != MMC_TIMING_MMC_HS400 && host->timing != MMC_TIMING_UHS_SDR104) goto disable; -- 2.7.4