Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1023416ybe; Wed, 4 Sep 2019 11:17:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHDfO6RgvA4bZHGZbNRfFHIymhxr20fu7E+k8Z2VGZxM4kilYzEs92RPparpVa4S6v9e8I X-Received: by 2002:a62:4e52:: with SMTP id c79mr22743368pfb.28.1567621067056; Wed, 04 Sep 2019 11:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621067; cv=none; d=google.com; s=arc-20160816; b=v5pOVsfQZA0Qi8/zIPQy5vz9rRb3H2DDtNwPr6vdQN8OaAky0YX+38sg65RFk2OeR5 7cCUICwP0FpDHqgm4PT1NVQmKW5xlZnSlqlC8CeFD1Ib7lyIHw6Q0DQjlTCT5XSRSGo+ yYkRgbay5Rgo8My2vyclmaw2S3FhvtkvZbYAEK3cbFGsyShzkitzIDEmiGkXLxVG7xy+ XQTuxhZABZ7Q/Iyw6evQWbnqcGu1EZQYed6pIcupzyXdwFJdaLNOpZADDiADdC55GX/P VMBadi0/sqOGwiqa5h/Aw7MGqvwLdodUO52qCS0nIcGw3lZUwJntE6xvNZJ8U3NYVPME 9ZpA== 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=KCg0zsnaUzujkOP9H1tNSth/1nA/EQW3+EnW0R73sQk=; b=Jh9d0qA95Bhlc2TRiZjPaTuVjNGJufWVf2k0RdDVEXssPqrt1TvJQMGuROQITfK92H uiz+Iu2UugLRvKAMCPQ06t2MH1HgQ3GVxq42Rpwq8z6uIF/xMD/GsU4rXXdMHAQmHayu m2y/A1vaDnJHCTUSON6UhgPVo7/hZnomOtLcJPQ6w+KsYzBIjra9RiH90gTipn+WOYG3 R+SC5qLrMyJ86p2MW/hcADb5Qt0KhafmKalHaUzphezrYb+tsVsakmfPF5JG7WbnpjUc D2ZJ667DwtJ7x2O74FexwQOAVScf1eW1dSoM2Bk8f9pRu6obah0LvNEPfRdlXk/YNosl kxsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mb6+fTKY; 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 m4si2849313pjs.62.2019.09.04.11.17.31; Wed, 04 Sep 2019 11:17:47 -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=Mb6+fTKY; 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 S2390869AbfIDSOt (ORCPT + 99 others); Wed, 4 Sep 2019 14:14:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:60126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390861AbfIDSOr (ORCPT ); Wed, 4 Sep 2019 14:14:47 -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 E8FDF2087E; Wed, 4 Sep 2019 18:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620886; bh=BVH+rLpmZ6neUJNJuRdO+TPWnwygrLavAPvcbkHC5iQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mb6+fTKYUdxr7H88ZKVVOrM6/6Kf7KlCvvDFJqCfUlTPZ7HEspX7m03taCkA6/aXB gyoDPaiGY4D8wj/ug5mKjMMRLMtgnkGD4KhYmwYmoePU8yM/Mug9+Dk3BiARbHmIdI qnGZ7yngyNl4uWKkUOy7sStHhQOzOVTnwSlTKtPA= 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 131/143] mmc: sdhci-sprd: add get_ro hook function Date: Wed, 4 Sep 2019 19:54:34 +0200 Message-Id: <20190904175319.529783933@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 4eae8cbdff942a423926486be4e781a77d619966 ] sprd's sd host controller doesn't support write protect to sd card. 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 1c5e6b77ca641..fc892a8d882fd 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -291,6 +291,11 @@ static unsigned int sdhci_sprd_get_max_timeout_count(struct sdhci_host *host) return 1 << 31; } +static unsigned int sdhci_sprd_get_ro(struct sdhci_host *host) +{ + return 0; +} + static struct sdhci_ops sdhci_sprd_ops = { .read_l = sdhci_sprd_readl, .write_l = sdhci_sprd_writel, @@ -303,6 +308,7 @@ static struct sdhci_ops sdhci_sprd_ops = { .set_uhs_signaling = sdhci_sprd_set_uhs_signaling, .hw_reset = sdhci_sprd_hw_reset, .get_max_timeout_count = sdhci_sprd_get_max_timeout_count, + .get_ro = sdhci_sprd_get_ro, }; static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq) -- 2.20.1