From patchwork Thu Jul 31 05:35:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 4653511 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 60E52C0338 for ; Thu, 31 Jul 2014 05:38:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95EBD20158 for ; Thu, 31 Jul 2014 05:38:48 +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 CB3FC2012B for ; Thu, 31 Jul 2014 05:38:47 +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 1XCj2I-0004SC-Pn; Thu, 31 Jul 2014 05:36:18 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XCj1e-0003fM-0g for linux-arm-kernel@lists.infradead.org; Thu, 31 Jul 2014 05:35:38 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9K00HUMA6LQ480@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 31 Jul 2014 14:35:09 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.116]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id C1.4C.15745.D85D9D35; Thu, 31 Jul 2014 14:35:09 +0900 (KST) X-AuditID: cbfee691-b7f306d000003d81-0a-53d9d58dbe5a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 15.8D.05196.C85D9D35; Thu, 31 Jul 2014 14:35:08 +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 <0N9K000QWA6KS901@mmp1.samsung.com>; Thu, 31 Jul 2014 14:35:08 +0900 (KST) From: Jaehoon Chung To: linux-mmc Subject: [PATCHv9 1/5] mmc: dw_mmc: Slot quirk "disable-wp" is deprecated. Date: Thu, 31 Jul 2014 14:35:03 +0900 Message-id: <1406784907-26349-2-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1406784907-26349-1-git-send-email-jh80.chung@samsung.com> References: <1406784907-26349-1-git-send-email-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsWyRsSkRLf36s1gg6srOSyaNxVbTLi8ndHi 5SFNi/lHzrFaLNi+ksni+KXFzBb/H71mtbjxq43VonfBVTaLTY+vsVoc+d/PaDHj/D4mi6XX LzJZfLh/kdni+NpwB36P1r0T2DzWzFvD6LFgU6nHnWt72Dw2L6n3uPFqIZNH35ZVjB7br81j 9th8utrj8ya5AK4oLpuU1JzMstQifbsErozVq66zF6wQrHj9YBNTA+Mavi5GTg4JAROJCQef skDYYhIX7q1n62Lk4hASWMoo8f/pB0aYoiOTzzNBJBYxShzomwjltDFJvFp9mAmkik1AR2L7 t+NgtoiApkTn9pVgo5gFTjJL3P/RygaSEBbwkli9rQ3MZhFQldg75yQziM0r4CYxYdNp9i5G DqB1ChJzJtmAhDkF3CXerO0Bu0IIqOR3ezs7xEUf2SV+P5SCGCMg8W3yIRaIVlmJTQeYIUok JQ6uuMEygVF4ASPDKkbR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mpqQWoRTB8TB6dUA6P6XumNOrKeObX/RJnUw5U7lBJ0vGVnFGqdOrywSjt78q/K2pU6 N8+crj2/qWJuljBr4huJMuGdF38ULA7htJ1r2/Jw2uH9ORpS2dnOH3eFy8ZPmT9TPHzqM9Ha FX0LV/B8fpy7mj9Sb0bGvtthatYthukvwjUisrSz31VLr56pN++gl43OciWW4oxEQy3mouJE AK6vFub0AgAA 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-20140730_223538_270583_A6B9F527 X-CRM114-Status: GOOD ( 12.93 ) 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 , Doug Anderson , Jaehoon Chung , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, cpgs , =?UTF-8?q?Andreas=20F=E4rber?= , 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 Slot quirks "disable-wp" is deprecated. Instead, use the host quirk "disable-wp". (Because the slot-node is removed in dt-file.) Signed-off-by: Jaehoon Chung Tested-by: Sachin Kamat Acked-by: Seungwon Jeon Reviewed-by: Doug Anderson Tested-by: Doug Anderson --- drivers/mmc/host/dw_mmc.c | 11 +++++++++-- include/linux/mmc/dw_mmc.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 1ac227c..47b52cc 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -997,7 +997,8 @@ 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->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) || + (slot->host->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT)) read_only = 0; else if (!IS_ERR_VALUE(gpio_ro)) read_only = gpio_ro; @@ -2021,8 +2022,11 @@ static int dw_mci_of_get_slot_quirks(struct device *dev, u8 slot) /* get quirks */ for (idx = 0; idx < ARRAY_SIZE(of_slot_quirks); idx++) - if (of_get_property(np, of_slot_quirks[idx].quirk, NULL)) + if (of_get_property(np, of_slot_quirks[idx].quirk, NULL)) { + dev_warn(dev, "Slot quirk %s is deprecated\n", + of_slot_quirks[idx].quirk); quirks |= of_slot_quirks[idx].id; + } return quirks; } @@ -2238,6 +2242,9 @@ static struct dw_mci_of_quirks { { .quirk = "broken-cd", .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION, + }, { + .quirk = "disable-wp", + .id = DW_MCI_QUIRK_NO_WRITE_PROTECT, }, }; diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index babaea9..29ce014 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -213,6 +213,8 @@ struct dw_mci_dma_ops { #define DW_MCI_QUIRK_HIGHSPEED BIT(2) /* Unreliable card detection */ #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) +/* No write protect */ +#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4) /* Slot level quirks */ /* This slot has no write protect */