From patchwork Thu Jul 10 07:08:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 4521301 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 5C1279F26C for ; Thu, 10 Jul 2014 07:09:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 996AA2024C for ; Thu, 10 Jul 2014 07:09:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A6A16202F0 for ; Thu, 10 Jul 2014 07:09:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751553AbaGJHIy (ORCPT ); Thu, 10 Jul 2014 03:08:54 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:63278 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751551AbaGJHIo (ORCPT ); Thu, 10 Jul 2014 03:08:44 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8H00BGLIII7010@mailout3.samsung.com>; Thu, 10 Jul 2014 16:08:43 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.114]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 32.18.24374.AFB3EB35; Thu, 10 Jul 2014 16:08:42 +0900 (KST) X-AuditID: cbfee68d-b7fd46d000005f36-ee-53be3bfa3206 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id C5.80.05196.AFB3EB35; Thu, 10 Jul 2014 16:08:42 +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 <0N8H00B7PIIH4WS1@mmp2.samsung.com>; Thu, 10 Jul 2014 16:08:42 +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: [PATCHv3 5/5] mmc: dw_mmc: replace "disable-wp" from slot's quirk to host's quirk Date: Thu, 10 Jul 2014 16:08:39 +0900 Message-id: <1404976119-10777-6-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1404976119-10777-1-git-send-email-jh80.chung@samsung.com> References: <1404976119-10777-1-git-send-email-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsWyRsSkSPeX9b5gg//nVSwmXN7OaDH/yDlW i+OXFjNb/H/0mtXixq82VoveBVfZLDY9vsZqceR/P6PFjPP7mCyWXr/IZPHh/kVmi+Nrwx14 PFr3TmDzWDNvDaPHnWt72Dw2L6n3uPFqIZNH35ZVjB7br81j9vi8SS6AI4rLJiU1J7MstUjf LoErY/rasywFc7gr+i+cYGxgnMXZxcjJISFgIvHw8k4WCFtM4sK99WxdjFwcQgJLGSVmreli himavGUbE4gtJDCdUeLVSTkIu41J4vcfPRCbTUBHYvu342A1IgKaEp3bV4INYha4wiRx9s4W VpCEsECMROuPNWwgNouAqsSJ0+vA4rwCbhKzD25k72LkAFqmIDFnkg1ImFPAXWLJnG42iF1u Egd6VrOCzJQQOMcu0XbnMjPEHAGJb5MPsUD0ykpsOgB1s6TEwRU3WCYwCi9gZFjFKJpak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hx/tVJ9O6X+7Iyb1SnFPt/Ikhbt+TO9veJ75vMlJduTYgNLhXaMm3bSJO78Q4hK2+mr8t Yhdc1nP43NF5IT/WSAac2V/EOjf6pnHaqdVf7MQFFZiPvTu4Y5fs3PbEW/+2Sk/86vJJ55mt YtrXm2oXVobxee376xHts1vkqxJLcUaioRZzUXEiAFGslAHdAgAA 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=-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..a3ccd07 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, }, };