From patchwork Fri Aug 30 15:12:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 2852115 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 949ACC0AB5 for ; Fri, 30 Aug 2013 15:12:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECD6E2049E for ; Fri, 30 Aug 2013 15:12:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B12362018D for ; Fri, 30 Aug 2013 15:12:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755636Ab3H3PMp (ORCPT ); Fri, 30 Aug 2013 11:12:45 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:47185 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755770Ab3H3PMo (ORCPT ); Fri, 30 Aug 2013 11:12:44 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MSC00E8VNKJ1260@mailout1.samsung.com> for linux-mmc@vger.kernel.org; Sat, 31 Aug 2013 00:12:19 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.51]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id B5.2E.31253.356B0225; Sat, 31 Aug 2013 00:12:19 +0900 (KST) X-AuditID: cbfee690-b7f3b6d000007a15-53-5220b653eec3 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 49.DB.05832.356B0225; Sat, 31 Aug 2013 00:12:19 +0900 (KST) Received: from DOTGIHJUN01 ([12.23.118.161]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MSC002VLNKJ4300@mmp1.samsung.com>; Sat, 31 Aug 2013 00:12:19 +0900 (KST) From: Seungwon Jeon To: linux-mmc@vger.kernel.org Cc: 'Chris Ball' , 'Jaehoon Chung' References: In-reply-to: Subject: [PATCH 07/22] mmc: dw_mmc: move the platform specific init call Date: Sat, 31 Aug 2013 00:12:19 +0900 Message-id: <000a01cea593$51e8f440$f5badcc0$%jun@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac03z3aCvVFr8FaITt2vKVQKst76fw3OcIrwS9fJ1BAByUIdcA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsVy+t8zY93gbQpBBlMbVC22v97IZnHjVxur xZH//YwOzB6Hrqxl9OjbsorR4/MmuQDmKC6blNSczLLUIn27BK6MaUfvsxZs5K+4deYTYwPj dZ4uRk4OCQETicmTtrJD2GISF+6tZ+ti5OIQEljGKPH+ZCcrTFHLho1QiUWMEntuXGeHcP4w Sty8vZ8ZpIpNQEvi75s3YLaIgKzEzz8X2EBsZgFviVfz1zB2MXIANXBLrG4OAglzCvBIrPvT CVYuLOAhMeP1dLBlLAKqElNO3gOzeQVsJX4uvccOYQtK/Jh8jwVkDLOAusSUKbkQ0+UlNq95 ywwSlgAKP/qrC3GAk8TZpoOMECUiEvtevGMEuVhCYBe7xIGVq5kgVglIfJt8iAWiV1Zi0wFm iHclJQ6uuMEygVFiFpLFsxAWz0KyeBaSDQsYWVYxiqYWJBcUJ6UXmegVJ+YWl+al6yXn525i hETfhB2M9w5YH2JMBto+kVlKNDkfGL15JfGGxmZGFqYmp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m1+mfj0WLv00rX3XDed7AWfuKuQuujOvs75UxivHhKOMe9IHiRkuiSzR GTn5SizFGYmGWsxFxYkAGiI+ajEDAAA= 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=-9.0 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 From: Yuvaraj Kumar C D Current platform specific private data initialization call dw_mci_exynos_priv_init() can be used to do platform specific initialization of SMU and others in future. So the drv_data->init call has moved to dw_mci_probe(). Signed-off-by: Yuvaraj Kumar C D Tested-by: Alim Akhtar Tested-by: Jaehoon Chung Acked-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc-pltfm.c | 7 ------- drivers/mmc/host/dw_mmc.c | 9 +++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 2089752..5c49656 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -39,7 +39,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev, { struct dw_mci *host; struct resource *regs; - int ret; host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL); if (!host) @@ -59,12 +58,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev, if (IS_ERR(host->regs)) return PTR_ERR(host->regs); - if (drv_data && drv_data->init) { - ret = drv_data->init(host); - if (ret) - return ret; - } - platform_set_drvdata(pdev, host); return dw_mci_probe(host); } diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index b5bf6eb..52d7731 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2227,6 +2227,15 @@ int dw_mci_probe(struct dw_mci *host) host->bus_hz = clk_get_rate(host->ciu_clk); } + if (drv_data && drv_data->init) { + ret = drv_data->init(host); + if (ret) { + dev_err(host->dev, + "implementation specific init failed\n"); + goto err_clk_ciu; + } + } + if (drv_data && drv_data->setup_clock) { ret = drv_data->setup_clock(host); if (ret) {