From patchwork Fri Jul 11 03:49:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 4529991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EAF2BBEEAA for ; Fri, 11 Jul 2014 03:52:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 262B0201EC for ; Fri, 11 Jul 2014 03:52:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 44F04201D5 for ; Fri, 11 Jul 2014 03:52:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X5RrF-0000ma-Or; Fri, 11 Jul 2014 03:50:49 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X5Rql-0007qG-OV for linux-arm-kernel@lists.infradead.org; Fri, 11 Jul 2014 03:50:20 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8J00AR63Z1ARC0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 11 Jul 2014 12:49:49 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 81.C1.14704.DDE5FB35; Fri, 11 Jul 2014 12:49:49 +0900 (KST) X-AuditID: cbfee68f-b7fef6d000003970-8f-53bf5edda244 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 40.DE.04943.DDE5FB35; Fri, 11 Jul 2014 12:49:49 +0900 (KST) Received: from localhost.localdomain ([10.252.81.186]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8J009YR3Z090Z0@mmp2.samsung.com>; Fri, 11 Jul 2014 12:49:48 +0900 (KST) From: Jaehoon Chung To: linux-mmc Subject: [PATCHv5 5/5] mmc: dw_mmc: replace "disable-wp" from slot's quirk to host's quirk Date: Fri, 11 Jul 2014 12:49:47 +0900 Message-id: <1405050587-5577-6-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1405050587-5577-1-git-send-email-jh80.chung@samsung.com> References: <1405050587-5577-1-git-send-email-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsWyRsSkUPdu3P5gg2Nf1CwmXN7OaDH/yDlW i+OXFjNb/H/0mtXixq82VoveBVfZLDY9vsZqceR/P6PFjPP7mCyWXr/IZPHh/kVmi+Nrwx14 PFr3TmDzWDNvDaPHnWt72Dw2L6n3uPFqIZNH35ZVjB7br81j9vi8SS6AI4rLJiU1J7MstUjf LoEro/nqE+aCRp6KTwtuszUwfuHsYuTkkBAwkXj4so0JwhaTuHBvPRuILSSwlFFi4Y5MmJr9 bd1ANVxA8emMEpPP/WWBKGpjkuhfoAJiswnoSGz/dhxskIiApkTn9pVsIA3MAleYJM7e2cIK khAWiJE4tPgmM4jNIqAqMWfDK7A4r4CrxLXV04FsDqBtChJzJtmAhDkF3CSW73rACrHLVaKj cQMzyEwJgUvsEkffNbNBzBGQ+Db5EAtEr6zEpgPMEEdLShxccYNlAqPwAkaGVYyiqQXJBcVJ 6UXGesW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5Dkh5oqtFuZhCQnerLzF1v8Osyh6bciNk+Ge8iPcpOpd2U/f yXM8WuJ/7WbudA3q9GF3qbF9Ubzfu0TLeuL37vUCh964dkStTTr65XvEq0VXg10yatrnLXye cV9bS33rIZtSjXMhM2cFBr+2M2PZpMRSnJFoqMVcVJwIAAiuBWjeAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140710_205019_979158_FC0F3778 X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: -5.7 (-----) Cc: Mark Rutland , devicetree@vger.kernel.org, Ulf Hansson , kgene.kim@samsung.com, heiko@sntech.de, tgih.jun@samsung.com, Chris Ball , Jaehoon Chung , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dinguyen@altera.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replaced the "disable-wp" into host's quirks. (Because the slot-node is removed at dt-file.) Signed-off-by: Jaehoon Chung Tested-by: Sachin Kamat Acked-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 1ac227c..aa29dc4 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -997,7 +997,7 @@ static int dw_mci_get_ro(struct mmc_host *mmc) int gpio_ro = mmc_gpio_get_ro(mmc); /* Use platform get_ro function, else try on board write protect */ - if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) + if (slot->host->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) read_only = 0; else if (!IS_ERR_VALUE(gpio_ro)) read_only = gpio_ro; @@ -2006,12 +2006,7 @@ static struct device_node *dw_mci_of_find_slot_node(struct device *dev, u8 slot) static struct dw_mci_of_slot_quirks { char *quirk; int id; -} of_slot_quirks[] = { - { - .quirk = "disable-wp", - .id = DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT, - }, -}; +} of_slot_quirks[] = {}; static int dw_mci_of_get_slot_quirks(struct device *dev, u8 slot) { @@ -2238,6 +2233,9 @@ static struct dw_mci_of_quirks { { .quirk = "broken-cd", .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION, + }, { + .quirk = "disable-wp", + .id = DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT, }, };