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: 10170061 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 F2D39605FC for ; Wed, 17 Jan 2018 16:43:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF14828474 for ; Wed, 17 Jan 2018 16:43:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD5C42860B; Wed, 17 Jan 2018 16:43:00 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 B05EC286C7 for ; Wed, 17 Jan 2018 16:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932159AbeAQQms (ORCPT ); Wed, 17 Jan 2018 11:42:48 -0500 Received: from condef-01.nifty.com ([202.248.20.66]:46778 "EHLO condef-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932173AbeAQQmr (ORCPT ); Wed, 17 Jan 2018 11:42:47 -0500 X-Greylist: delayed 480 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Jan 2018 11:42:47 EST Received: from conuserg-08.nifty.com ([10.126.8.71])by condef-01.nifty.com with ESMTP id w0HGTbRL029350 for ; Thu, 18 Jan 2018 01:29:38 +0900 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-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Wolfram Sang --- Changes in v3: - newly added Changes in v2: None arch/sh/boards/mach-kfr2r09/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = {