From patchwork Wed Jan 17 16:28:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10170009 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA8E16055D for ; Wed, 17 Jan 2018 16:39:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABFBA27B81 for ; Wed, 17 Jan 2018 16:39:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A07A72852D; Wed, 17 Jan 2018 16:39:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54F8928450 for ; Wed, 17 Jan 2018 16:39:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753722AbeAQQ3r (ORCPT ); Wed, 17 Jan 2018 11:29:47 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:36774 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753956AbeAQQ3g (ORCPT ); Wed, 17 Jan 2018 11:29:36 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-08.nifty.com with ESMTP id w0HGSIKv014790; Thu, 18 Jan 2018 01:28:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w0HGSIKv014790 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516206509; bh=XYPu294s8qyDvmRfGBk/gcCCTNRSfPizMk5gfBwKU5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X1T6nQrWruR8xOOUjy3Yl80G/4UnWNP/1T+1MWEqfEwoMYR9NzmR6EHKZdJq6xImN f0svsgxk+RfIg+LVfiYa+Olbg043x1V6/h5HtFiHP1MsE24wqSxnPK7KtdrA89LDcZ IfZZylAUdsDa0tasBnfpGV9rR51W2AOMG/zagdtOhm7HcOOfn0dIMyYPg3fbiT5LN0 3laspDAYf2CBJEvjOgUuptIXq70gqrOgDVW4VgALPfbjO6TOUHabunneD8f25ErJfF 60IGcqob0Sjbv5JQ99GA8Z7/yMLUI/Fc4uu6G0M5MtklSfE1A6NNScTuQx8wuAnG+6 0AhaY/5V/+AvA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-mmc@vger.kernel.org, Wolfram Sang Cc: Ulf Magnusson , Geert Uytterhoeven , Simon Horman , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, Masahiro Yamada , devicetree@vger.kernel.org, Rob Herring , linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , Ulf Hansson Subject: [PATCH v3 11/16] mmc: tmio: deprecate "toshiba, mmc-wrprotect-disable" DT property Date: Thu, 18 Jan 2018 01:28:11 +0900 Message-Id: <1516206496-16612-12-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516206496-16612-1-git-send-email-yamada.masahiro@socionext.com> References: <1516206496-16612-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This property is equivalent to "disable-wp" defined in Documentation/devicetree/bindings/mmc/tmio_mmc.txt The TMIO MMC core calls mmc_of_parse(), and it sets MMC_CAP2_NO_WRITE_PROTECT if "disable-wp" property is present. We do not need a vendor-specific property to do the same thing. Let's remove the description from the dt-binding to prevent new boards from using it. I am keeping the driver code for existing DT files, but added comments that this is deprecated. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Reviewed-by: Wolfram Sang --- Changes in v3: - newly added Changes in v2: None Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 - drivers/mmc/host/tmio_mmc_core.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt index 3c67624..cb7d40e 100644 --- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt +++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt @@ -49,7 +49,6 @@ Required properties: 2: R7S72100 Optional properties: -- toshiba,mmc-wrprotect-disable: write-protect detection is unavailable - pinctrl-names: should be "default", "state_uhs" - pinctrl-0: should contain default/high speed pin ctrl - pinctrl-1: should contain uhs mode pin ctrl diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 7ad3433c..f30ac69 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1134,6 +1134,11 @@ static void tmio_mmc_of_parse(struct platform_device *pdev, if (!np) return; + /* + * DEPRECATED: + * For new platforms, please use "disable-wp" instead of + * "toshiba,mmc-wrprotect-disable" + */ if (of_get_property(np, "toshiba,mmc-wrprotect-disable", NULL)) mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT; }