From patchwork Thu Jul 10 09:48:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 4522571 Return-Path: X-Original-To: patchwork-linux-mmc@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 185B1BEEAA for ; Thu, 10 Jul 2014 09:49:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AC2F2037A for ; Thu, 10 Jul 2014 09:49:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64D462010E for ; Thu, 10 Jul 2014 09:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752997AbaGJJsx (ORCPT ); Thu, 10 Jul 2014 05:48:53 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:41628 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752600AbaGJJss (ORCPT ); Thu, 10 Jul 2014 05:48:48 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8H009YKPX4XY80@mailout1.samsung.com>; Thu, 10 Jul 2014 18:48:40 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 87.70.24374.7716EB35; Thu, 10 Jul 2014 18:48:40 +0900 (KST) X-AuditID: cbfee68d-b7fd46d000005f36-13-53be6177cc92 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2E.E1.04943.7716EB35; Thu, 10 Jul 2014 18:48:39 +0900 (KST) Received: from localhost.localdomain ([10.252.81.186]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8H001N4PX3ZN30@mmp1.samsung.com>; Thu, 10 Jul 2014 18:48:39 +0900 (KST) From: Jaehoon Chung To: linux-mmc Cc: Chris Ball , Ulf Hansson , tgih.jun@samsung.com, devicetree@vger.kernel.org, heiko@sntech.de, dinguyen@altera.com, Mark Rutland , kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jaehoon Chung Subject: [PATCHv4 5/5] mmc: dw_mmc: replace "disable-wp" from slot's quirk to host's quirk Date: Thu, 10 Jul 2014 18:48:38 +0900 Message-id: <1404985718-12203-6-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1404985718-12203-1-git-send-email-jh80.chung@samsung.com> References: <1404985718-12203-1-git-send-email-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsWyRsSkRLcicV+wQVuOxYTL2xkt5h85x2px /NJiZov/j16zWtz41cZq0bvgKpvFpsfXWC2O/O9ntJhxfh+TxdLrF5ksPty/yGxxfG24A49H 694JbB5r5q1h9LhzbQ+bx+Yl9R43Xi1k8ujbsorRY/u1ecwenzfJBXBEcdmkpOZklqUW6dsl cGXsPzKfqWAud0Vr62+WBsZZnF2MHBwSAiYS3y8KdzFyApliEhfurWfrYuTiEBJYyigx7+8k VoiEicSp1ZOYIBKLGCX2vXvNDuG0MUnsXb+aBaSKTUBHYvu340wgtoiApkTn9pVgo5gFrjBJ nL2zBWyUsECMxJHGm+wgNouAqsTTtceYQWxeATeJVRPWs0KcpCAxZ5INSJhTwF1i4ftrYDOF gEr2T53MDHHRNXaJB8c0IcYISHybfIgFolVWYtMBqBJJiYMrbrBMYBRewMiwilE0tSC5oDgp v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Z5m95+e3ZM8dcaZNe8kj090+Mv3TiXvyYWX57TVgu+VSW8IPrTdwnCq+C/j +O8n3lSc7+6de+2/Bi/fdbMJbKvV7uYG33GXY2pftrl0NWOH/+LPx+L1evfPfviOJfTp9DU1 1lzljT0VDEFPls2eyPakeHF2tsuxtoi1SizFGYmGWsxFxYkA25VKX98CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 --- 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, }, };