Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5114863ybi; Tue, 4 Jun 2019 01:17:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyK9y3jjVoiT5+/jajUw9wNxUPqUxPJtjea5eezjxUri6JDo6yeNThcFfwCEjkx1ClWKO2p X-Received: by 2002:a17:90a:7147:: with SMTP id g7mr35484211pjs.42.1559636220351; Tue, 04 Jun 2019 01:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559636220; cv=none; d=google.com; s=arc-20160816; b=VoxjVXpMgSvySaHpbC5KnsqOuMqBUzWlZ8qDg9Yz87aIz05bH08hs5XfMkOjvicMeg 1uirNlX4jvqrxTMbebiZA+CQRadNN43cXpa/Dp8HvWLdFw5iOGqWxjHbKagOGjayHomP FHU4DSr9cylCd6wdPYed0p0nsTCApvycS+tBjc9fFqkNKmzx6VwxnQF3gXOC6+Wbd8Cn JnQYnFWL1tvO2jHc7giWlEKf4/jupghgzTsl4zYnKqHdoWCDf0141H2hf9HAwwHyaNhC SgDUMkRi5atcRm7baV0+iHVb/1Mzt3XibT0kEP9hS9iUoXVOdZEolVjGOueSnt+ZoCIy H9Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=628ZQKD9jdSHtWmvRCzFbwR4o1BOUbgB+F8276Myxy8=; b=kzCSzObos1tzh40AffqOYXVxKagE9LYudZrLI41HP5S4+3uf3GIkU2jXx0wRwWjOhn 5ifBbhYjDE3GSlOpMnYfmgJ521fEIOjbNGQTihxYJm1a0PSrhNFc3JaLdbjvPOs7T8AR 3dEBCA58LTX5craQp9UVDouD+CGzTR/Bxi9HHqogEBNWNbcGLNzV+aW3zL7S3PYlZMon Y6wS8/xg/ar06jzGjNqsW6MlS4jHheXjcudBvwZ04ckDKwKC3wJNm5+YNevu7YuXumvJ T+ALEbRZJPGwTaWFMbu3YiZaoqELXMg27k+r5FTOqmyPd06Wnub3LpR9mEWjZigTWpr0 E48w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gzhVSfX/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si21772345pgh.79.2019.06.04.01.16.43; Tue, 04 Jun 2019 01:17:00 -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=pass header.i=@linaro.org header.s=google header.b="gzhVSfX/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727122AbfFDIPK (ORCPT + 99 others); Tue, 4 Jun 2019 04:15:10 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40107 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbfFDIPI (ORCPT ); Tue, 4 Jun 2019 04:15:08 -0400 Received: by mail-pg1-f193.google.com with SMTP id d30so9892843pgm.7 for ; Tue, 04 Jun 2019 01:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=628ZQKD9jdSHtWmvRCzFbwR4o1BOUbgB+F8276Myxy8=; b=gzhVSfX/Bn6qb7Bn5lG6vK47YR/iVsd/HdMBg0jqihRl1oIgJUL0n2Rcr/GT6ZSNuc 1aRUNkfNasPsc40XFopW34wVB0wEY9EGrsslh+r78Eawvrq0LxdAUUimuOx4t+msvwLO uBqkjXbfx5Mxq2ZNzGt1nrr5C31jEDWO0kJeY6FO2Wj6WlshAoCOuxW1W0CrPlnaO526 4So3Zm816GJgnVCMXFd2e19o3Ri7YmIrdFWkj0M4eZv3qQDUzvU3oBm66fGUFJM2acQn My9WcvNPZLHe5Q0ufI3CEyUnhMO2419UK0hNaGZL5gajope7z52/G4Mpd9Wq0AWz0APz haGg== 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:in-reply-to:references; bh=628ZQKD9jdSHtWmvRCzFbwR4o1BOUbgB+F8276Myxy8=; b=s8ZfEGzo3pBAQ33fsMUXuGjVDIpBy6PKpKrF/ElY5+ysxIfK7UccCypZ+j0fwXPCUU bQjzlsuQzbn2GScIdJ6jNulfSlB+ef/Y1URd0mhg4l5C8+iS1vPGv0lKC7I8UPKlJhj6 eOZ28M9vRCb4FtfQHzoq0KnhCdWvXiVxspDRJwFMoZGt541ScT/mHTMJo49Q1n5AblZe p92w1aDvTkbgdsHW9p3cnMxgnM93MgfPsyIrHezp6SV6GDK6tTwU0bPu8P2urXFPrhWj w3nSLnjmKhOvSXU+aPW3oHLtTDrikAoaWU0UD6OJ45k9YjecUmfzzbGKOEqzteqIZ9bR KXpQ== X-Gm-Message-State: APjAAAXzP3axjnp6xySbFaMUstYnBJWecWjkr25NnrTyFdu4heoNMSZo 0xa2PwTF00gilcADvQpaOTv99Q== X-Received: by 2002:a17:90b:d83:: with SMTP id bg3mr21126762pjb.63.1559636107639; Tue, 04 Jun 2019 01:15:07 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id j4sm14818804pgc.56.2019.06.04.01.15.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Jun 2019 01:15:06 -0700 (PDT) From: Baolin Wang To: adrian.hunter@intel.com, ulf.hansson@linaro.org, zhang.lyra@gmail.com, orsonzhai@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net Cc: baolin.wang@linaro.org, vincent.guittot@linaro.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 4/9] mmc: sdhci-sprd: Implement the get_max_timeout_count() interface Date: Tue, 4 Jun 2019 16:14:24 +0800 Message-Id: <37b15ac756f9fca7c1f9382deb57648890bb141c.1559635435.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Implement the get_max_timeout_count() interface to set the Spredtrum SD host controller actual maximum timeout count. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 31ba7d6..d91281d 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -285,6 +285,12 @@ static void sdhci_sprd_hw_reset(struct sdhci_host *host) usleep_range(300, 500); } +static unsigned int sdhci_sprd_get_max_timeout_count(struct sdhci_host *host) +{ + /* The Spredtrum controller actual maximum timeout count is 1 << 31 */ + return 1 << 31; +} + static struct sdhci_ops sdhci_sprd_ops = { .read_l = sdhci_sprd_readl, .write_l = sdhci_sprd_writel, @@ -296,6 +302,7 @@ static void sdhci_sprd_hw_reset(struct sdhci_host *host) .reset = sdhci_reset, .set_uhs_signaling = sdhci_sprd_set_uhs_signaling, .hw_reset = sdhci_sprd_hw_reset, + .get_max_timeout_count = sdhci_sprd_get_max_timeout_count, }; static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq) -- 1.7.9.5