From patchwork Wed Jan 17 16:28:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 124846 Delivered-To: patch@linaro.org Received: by 10.46.62.1 with SMTP id l1csp106833lja; Wed, 17 Jan 2018 08:39:31 -0800 (PST) X-Google-Smtp-Source: ACJfBosZ6jAnep5348FLwn4ctVaLBVDuZvUUlNu7UzHPtGwCSwN8ZpcC8Q08e+1mmMF22wj0sNsJ X-Received: by 10.84.196.131 with SMTP id l3mr8451476pld.382.1516207170965; Wed, 17 Jan 2018 08:39:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516207170; cv=none; d=google.com; s=arc-20160816; b=oq00WxjdNodEzPjG1LjC05kMQXaejAflvLyzE22Z4/Uf0XsxTvkXGa4LL5fRucbI9t kxUk+EUAdpg4Yeny8Tj1xjGcD4sO8/H+Vw0qriWhCMbDDvtKbXbDioupOiRcc5HP8C2x 8W8izTsC/zkU364iClGpO/pjfu7STO5NrX+OU8h2Bpzgo+9zaZ7Xjl0tu6JuBP0hkRd4 Mt62Q3atUKZjwy842C4AZYR6T2vgaqB5UfuCFRhmlnihYb5i7HAs9aqcKe9jUrJ8kXi7 VthGx8FH98FlX+fCbAGLaelGLBvtQ6IqlazXETc7z2lnDdi29hHhmbcKGtH6E/SKe0Lv ICMA== 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:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=lPTU6SyAcJ6Jm+4pQS3P7yGMXNesMRfvtAEaltWy+Is=; b=MAnemAtQ5aKjlAbh5W2hxpeg6+OQJ0IKe0TGbxFenOmsPMjjdTOFcmCaFkhhWwMm0O b/QVlZx5cCByVh87SDpcq9ghcsEhzrGLdp80cGUHsekHR3e+ra07axsAAUbr2W4OuHub 8XitdQkupCgDFASSZYZeY4AvstLHvZtbVG5eA56g3wtrnK27UD/EY242Wy2+eHD5lw0E JlVM8/qbfKenp70cH1Rb50PUDXKRnqMQ7B3urrSlAKnBuV7Hc7Bkkck6SW2kBjQYtCtJ cY3s5ZiF3BHFTUvptvSiexQ1YFJ8/+PVhlkgCgrwkSfDG6TXGc5//ymEtg3WdQ2UI558 meFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Cbr0SyTy; 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 i2si4582395plk.291.2018.01.17.08.39.30; Wed, 17 Jan 2018 08:39:30 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=Cbr0SyTy; 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 S1754384AbeAQQj3 (ORCPT + 28 others); Wed, 17 Jan 2018 11:39:29 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:36725 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753875AbeAQQ3e (ORCPT ); Wed, 17 Jan 2018 11:29:34 -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 w0HGSIKs014790; Thu, 18 Jan 2018 01:28:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w0HGSIKs014790 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516206506; bh=lPTU6SyAcJ6Jm+4pQS3P7yGMXNesMRfvtAEaltWy+Is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cbr0SyTykBF/fd+t7acHZp+BMH+ZUozsfGsnAqD7YAFYsy8+NLipyifZwc3HnPbDb /b82qbmKIsDAgHK8MMSd2LS7cvDBKi/YmLkAJH49XWBJdJLw2JqeK5WRJLuorLdzPS R8r9ZmYgSx3Ce+sS1Yt0eVcC4y7yGlcoaLbGRtS3nfShfWymJrsD2ZKWETX/b7U/C6 hON7iUdsfUz01RyzoXANDG/EBzJO6DuADikkOkuVnJ6dvpfXt4MKczku3spYPRUbRC 2Ak/684fvdqaD54UETAjR1HX/b0oir6ZjYiwWLV5FrhC+uryRnp4bK4robyR6GQLNf ZTO8YsQzAsGIg== 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 , Yoshinori Sato , Rich Felker , linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org Subject: [PATCH v3 08/16] sh: kfr2r09: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag Date: Thu, 18 Jan 2018 01:28:08 +0900 Message-Id: <1516206496-16612-9-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TMIO_MMC_WRPROTECT_DISABLE is equivalent to MMC_CAP2_NO_WRITE_PROTECT. The flag is propagated as follows: tmio_mmc_data::capabilities2 -> mmc_host::caps2 Only the difference is the TMIO_... makes tmio_mmc_get_ro() return 0 (i.e. it does not affect mmc_gpio_get_ro() at all), while MMC_CAP2_... returns 0 before calling ->get_ro() hook (i.e. it affects both IP own logic and GPIO detection). The TMIO MMC drivers do not set-up gpio_ro by themselves, so gpio_ro is obviously unused by legacy boards like this. So, this conversion should be safe. Signed-off-by: Masahiro Yamada --- Changes in v3: - newly added Changes in v2: None arch/sh/boards/mach-kfr2r09/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index 5deb2d8..6af7777 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c @@ -375,8 +375,8 @@ static struct resource kfr2r09_sh_sdhi0_resources[] = { static struct tmio_mmc_data sh7724_sdhi0_data = { .chan_priv_tx = (void *)SHDMA_SLAVE_SDHI0_TX, .chan_priv_rx = (void *)SHDMA_SLAVE_SDHI0_RX, - .flags = TMIO_MMC_WRPROTECT_DISABLE, .capabilities = MMC_CAP_SDIO_IRQ, + .capabilities2 = MMC_CAP2_NO_WRITE_PROTECT, }; static struct platform_device kfr2r09_sh_sdhi0_device = {