From patchwork Wed May 28 05:35:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 4252671 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 A3FB7BF90B for ; Wed, 28 May 2014 05:36:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC41E20138 for ; Wed, 28 May 2014 05:36:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE0CE20166 for ; Wed, 28 May 2014 05:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751264AbaE1Ff5 (ORCPT ); Wed, 28 May 2014 01:35:57 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:37439 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbaE1Ff4 (ORCPT ); Wed, 28 May 2014 01:35:56 -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 <0N6900I8ZRJT2L00@mailout3.samsung.com>; Wed, 28 May 2014 14:35:53 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.115]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 33.C6.24374.9B575835; Wed, 28 May 2014 14:35:53 +0900 (KST) X-AuditID: cbfee68d-b7fd46d000005f36-59-538575b900e5 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 62.2A.07139.9B575835; Wed, 28 May 2014 14:35:53 +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 <0N6900AUBRJSSIB0@mmp2.samsung.com>; Wed, 28 May 2014 14:35:52 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: chris@printf.net, ulf.hansson@linaro.org, ludovic.desroches@atmel.com, tgih.jun@samsung.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Jaehoon Chung Subject: [PATCHv3 2/4] mmc: dw_mmc: use the __mmc_of_parse to parse the slot node Date: Wed, 28 May 2014 14:35:49 +0900 Message-id: <1401255351-17653-3-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1401255351-17653-1-git-send-email-jh80.chung@samsung.com> References: <1401255351-17653-1-git-send-email-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsWyRsSkWHdnaWuwwaetwhYTLm9ntJh/5Byr xY1fbawWR/73M1rMOL+PyeLQzGSLD/cvMlscXxvuwOGx4NdWFo871/awedx4tZDJo2/LKkaP z5vkAlijuGxSUnMyy1KL9O0SuDIaj1xiLjjCX/Hy3gSmBsYbPF2MHBwSAiYSD59LdDFyApli EhfurWfrYuTiEBJYyigxbeUsFoiEicTxXd9ZIRLTGSXutm6HctqYJFZMWcgKUsUmoCOx/dtx JhBbREBW4uefC2CjmAVOMUr0dnSBFQkLBEucWbsezGYRUJVY/LcDzOYVcJO41P+EFeIkBYk5 k2xAwpwC7hLrp01mBrGFgEqO3jgKNlNCYBG7RM+WThaIOQIS3yYfYoHolZXYdIAZ4mpJiYMr brBMYBRewMiwilE0tSC5oDgpvchQrzgxt7g0L10vOT93EyMw2E//e9a7g/H2AetDjMlA4yYy S4km5wOjJa8k3tDYzMjC1MTU2Mjc0ow0YSVx3qSHSUFCAumJJanZqakFqU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ldQZHcO88t0+nO+siqkr5OiaU4I9FQi7moOBEAQ5VF X+oCAAA= 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.5 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 dw-mmc controller has the multiple slot. Then it needs to parse the property for each slot. Signed-off-by: Jaehoon Chung Acked-by: Seungwon Jeon --- Changelog V3: - Fix typo. - Maintained the dw_mci_of_quirks(). Changelog V2: - None drivers/mmc/host/dw_mmc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 1ac227c..3285bdd 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1015,12 +1015,11 @@ static int dw_mci_get_cd(struct mmc_host *mmc) { int present; struct dw_mci_slot *slot = mmc_priv(mmc); - struct dw_mci_board *brd = slot->host->pdata; struct dw_mci *host = slot->host; int gpio_cd = mmc_gpio_get_cd(mmc); /* Use platform get_cd function, else try onboard card detect */ - if (brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION) + if (slot->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION) present = 1; else if (!IS_ERR_VALUE(gpio_cd)) present = gpio_cd; @@ -2010,6 +2009,9 @@ static struct dw_mci_of_slot_quirks { { .quirk = "disable-wp", .id = DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT, + }, { + .quirk = "broken-cd", + .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION, }, }; @@ -2088,7 +2090,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) if (host->pdata->caps2) mmc->caps2 = host->pdata->caps2; - mmc_of_parse(mmc); + __mmc_of_parse(mmc, dw_mci_of_find_slot_node(host->dev, slot->id)); if (host->pdata->blk_settings) { mmc->max_segs = host->pdata->blk_settings->max_segs; @@ -2234,12 +2236,7 @@ static inline bool dw_mci_ctrl_all_reset(struct dw_mci *host) static struct dw_mci_of_quirks { char *quirk; int id; -} of_quirks[] = { - { - .quirk = "broken-cd", - .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION, - }, -}; +} of_quirks[] = {}; static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host) {