Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1022209ybe; Wed, 4 Sep 2019 11:16:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoiiqqyZbmHhXGe3o6taQF7lidPYb99vIEv7/b0pFujvrxma42rxHdaK46VBbGdXdiOqQ8 X-Received: by 2002:a62:e802:: with SMTP id c2mr12215491pfi.212.1567620994695; Wed, 04 Sep 2019 11:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567620994; cv=none; d=google.com; s=arc-20160816; b=olcI8jmY9p+L1WMEmh5I+DkUZA64hR9edUj40yPccI6hOLrs6T3HwbBWWzGB3wl0Nl AvrVa7YNvUmXxHRLdgUEcoUEdQOyJdfkmkQGeRl27Wnq9SJF2MfUEJLUzzijhNxuuZhH dThOokc8bnsc/wyUJpafqSQw1u4sr26ZnwXdGxCp8SpWj3KdUyysN6edL3AHPYf0/Ym8 D11zT/PFM7YJDjc4JFf1KKIwiIZ2Bvi+p0ALOBeiNxa8eps4AR29YdNafPjTt2/kl9d6 TitJpJnXBB9TOdklVLq6bHtZyqf4w0No+gfMReebCla/LDI1aBUQysdzTr155pL2xqk2 CcQQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Oyq1mCMZX8ovDLPv6fH9OHCYiGd/IoEurjfn+XeAAtI=; b=MLVcTDPCAn9sngJoPV1ioIHNNdzFZ2wR8qTY3gAIzV05wLhQXSYnuDj/l2t0JqDEB9 YZgh/DQgdgE4h3x+VC3C+XtT7hXjak+d6d4Olim7+a2jEsXqbNZf4cHJQZ8oqXGYU+An BmBKpi/os2595jv4ojk/qdPz3u/kiaL1ADfoGDcIJL1e2hFllg0Og3dPkiHtF7W6cDXZ fNELg8UZ/1fn/xr0KaF7t9GpyuD+wflycgY14/D9E9McJ9fep4hQ+ck1zZ3xMFgWBvC0 3wJIhfG/6llVhPpffsxDs67vnuVLIaIn3yW6rXWrew6/ryDddSh43S5tWdQBhX7mB/3E WX1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RC1Vp6dn; 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 s18si2796033pjq.43.2019.09.04.11.16.19; Wed, 04 Sep 2019 11:16:34 -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=@kernel.org header.s=default header.b=RC1Vp6dn; 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 S2390562AbfIDSOp (ORCPT + 99 others); Wed, 4 Sep 2019 14:14:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390568AbfIDSOm (ORCPT ); Wed, 4 Sep 2019 14:14:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B8F38208E4; Wed, 4 Sep 2019 18:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620881; bh=2yoVyZHUw19o1kpTAXlMkoYYOYXEkWT1PtvYSd40/5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RC1Vp6dnuiCEE5kf4Juga0VnWi4NS2AFiA07slEp1C4MBDJVTDNmkthFJFP876gxi cSArSQOOpHZa8hPp1xDUPqeDpQU6GCdTx5AAqX2ILJmWxVwSOqEorSdMiWRIE0OVAP Dtq3S53m4ZBFy7ZQRajIxZ2H5avrz1NaKiny7O9M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chunyan Zhang , Chunyan Zhang , Baolin Wang , Ulf Hansson , Sasha Levin Subject: [PATCH 5.2 129/143] mmc: sdhci-sprd: clear the UHS-I modes read from registers Date: Wed, 4 Sep 2019 19:54:32 +0200 Message-Id: <20190904175319.453014946@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 2f765c175e1d1acae911f889e71e5933c6488929 ] sprd's sd host controller supports SDR50/SDR104/DDR50 though, the UHS-I mode used by the specific card can be selected via devicetree only. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Chunyan Zhang Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-sprd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index dee30aa23cf72..9d0f58a665276 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -320,7 +320,8 @@ static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq) static const struct sdhci_pltfm_data sdhci_sprd_pdata = { .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | - SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, + SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | + SDHCI_QUIRK_MISSING_CAPS, .quirks2 = SDHCI_QUIRK2_BROKEN_HS200 | SDHCI_QUIRK2_USE_32BIT_BLK_CNT | SDHCI_QUIRK2_PRESET_VALUE_BROKEN, @@ -389,6 +390,16 @@ static int sdhci_sprd_probe(struct platform_device *pdev) sdhci_enable_v4_mode(host); + /* + * Supply the existing CAPS, but clear the UHS-I modes. This + * will allow these modes to be specified only by device + * tree properties through mmc_of_parse(). + */ + host->caps = sdhci_readl(host, SDHCI_CAPABILITIES); + host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1); + host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 | + SDHCI_SUPPORT_DDR50); + ret = sdhci_setup_host(host); if (ret) goto pm_runtime_disable; -- 2.20.1