From patchwork Mon Jun 30 11:49:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 4447561 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BCE479F319 for ; Mon, 30 Jun 2014 11:49:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB45E2035D for ; Mon, 30 Jun 2014 11:49:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3CC020353 for ; Mon, 30 Jun 2014 11:49:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751788AbaF3Ltb (ORCPT ); Mon, 30 Jun 2014 07:49:31 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:28547 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbaF3Lt0 (ORCPT ); Mon, 30 Jun 2014 07:49:26 -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 <0N7Z00CPNCU9ECC0@mailout1.samsung.com>; Mon, 30 Jun 2014 20:49:22 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.112]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 17.62.24374.1CE41B35; Mon, 30 Jun 2014 20:49:21 +0900 (KST) X-AuditID: cbfee68d-b7fd46d000005f36-f2-53b14ec1553a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 3C.B5.04943.1CE41B35; Mon, 30 Jun 2014 20:49:21 +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 <0N7Z00M3ICU8GQ30@mmp1.samsung.com>; Mon, 30 Jun 2014 20:49:21 +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: [PATCHv2 5/5] mmc: dw_mmc: replace "disable-wp" from slot's quirk to host's quirk Date: Mon, 30 Jun 2014 20:49:19 +0900 Message-id: <1404128960-27225-6-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1404128960-27225-1-git-send-email-jh80.chung@samsung.com> References: <1404128960-27225-1-git-send-email-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsWyRsSkQPeg38Zgg/9PzC0mXN7OaDH/yDlW i+OXFjNb/H/0mtXixq82VoveBVfZLDY9vsZqceR/P6PFjPP7mCyWXr/IZPHh/kVmi+Nrwx14 PFr3TmDzWDNvDaPHnWt72Dw2L6n3uPFqIZNH35ZVjB7br81j9vi8SS6AI4rLJiU1J7MstUjf LoEr43J7K0tBD0/F3ocmDYyfObsYOTkkBEwkvh7ewgZhi0lcuLceyObiEBJYyijRvmoGC0zR mjsbGSESixglOg+/Z4Zw2pgkln36yARSxSagI7H923EwW0RAU6Jz+0qwUcwCV5gkzt7ZwtrF yMEhLBAjceOIKEgNi4CqxLb319lBbF4BN4njixYwgZRICChIzJlkAxLmFHCXaN4zjRnEFgIq md37CWykhMA1dol1W1tYIOYISHybfIgFoldWYtMBZoijJSUOrrjBMoFReAEjwypG0d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Ehdn5mz1nG9ZSL377b7fDVvdVWa9t3MfdO7Dcf+mTIFL0o22Btxs/aynfvXNuFvldnTeX5K TPi26O3vGnUhhyv7HvS8Oag2T9NlZWTFj+jDCzNvXTBU4e8w9HJc+C3m3JMziiuYvvnWng/9 Ontvfq+Z3tGs7QtrLqWoP2w+s09gcelrJZbijERDLeai4kQAjST1KN0CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 1ac227c..6c5d696 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -994,10 +994,11 @@ static int dw_mci_get_ro(struct mmc_host *mmc) { int read_only; struct dw_mci_slot *slot = mmc_priv(mmc); + struct dw_mci_board *brd = slot->host->pdata; 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 (brd->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) read_only = 0; else if (!IS_ERR_VALUE(gpio_ro)) read_only = gpio_ro; @@ -2006,12 +2007,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 +2234,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, }, };