From patchwork Wed Aug 28 12:08:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuvaraj CD X-Patchwork-Id: 2850710 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 2C968BF546 for ; Wed, 28 Aug 2013 12:09:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2F9B2044A for ; Wed, 28 Aug 2013 12:09:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A3B6320444 for ; Wed, 28 Aug 2013 12:09:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753741Ab3H1MJ0 (ORCPT ); Wed, 28 Aug 2013 08:09:26 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:50964 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753285Ab3H1MJZ (ORCPT ); Wed, 28 Aug 2013 08:09:25 -0400 Received: by mail-pa0-f45.google.com with SMTP id bg4so6124633pad.18 for ; Wed, 28 Aug 2013 05:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R7vtaV2IiS6WEFzpI4cSFz4EqiJ3M3b0r/vUzFhmo6U=; b=V3RLxBMiAYyJoM5PaRAp9FFpJ5BWcS5L5P2UUhhB/mvCeG1Af+Yu0WMK5q95ju55h3 Zei6Pqtk795SUoYFMQUeXz3ydiuv/sThNKiYC/WPSgrKVRF2/HsjDAY8cILpua38qJse wnPdwi4rnQSaUZcwr0FKL22xcl1vmEuKdE50ik9NkXpho7j5LWjL1pieF6AFP0+ufa0s TPEzoSIDtT2So/GIUvj9CMBWXQiNGstMLvab68OhWMB/PWnk2U8YTxC662q8yRPDp3Am Z6FQFYQxxFchcnBb6wNBxb4VU852KKm7HeOP0JwcHVwrHoux0s2VjvUNkPVAwtjuX+g0 oTRg== X-Received: by 10.68.252.135 with SMTP id zs7mr1807188pbc.194.1377691765030; Wed, 28 Aug 2013 05:09:25 -0700 (PDT) Received: from yuvaraj-ubuntu.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id fy4sm2986328pbb.1.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 05:09:24 -0700 (PDT) From: Yuvaraj Kumar C D To: linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, cjb@laptop.org, jh80.chung@samsung.com, tgih.jun@samsung.com Cc: ks.giri@samsung.com, t.figa@samsung.com, alim.akhtar@samsung.com, Yuvaraj Kumar C D Subject: [RFC V3 3/4] mmc: dw_mmc: move the platform specific init call Date: Wed, 28 Aug 2013 17:38:50 +0530 Message-Id: <1377691731-7226-4-git-send-email-yuvaraj.cd@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1377691731-7226-1-git-send-email-yuvaraj.cd@samsung.com> References: <1377691731-7226-1-git-send-email-yuvaraj.cd@samsung.com> 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=-9.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Current platform specific private data initialisation call dw_mci_exynos_priv_init can be used to do platform specific initialisation of SMU and others in future.So the drv_data->init call has moved to dw_mci_probe. changes since V2: none changes since V1: none Signed-off-by: Yuvaraj Kumar C D --- 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 beafb4c..0edec01 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2221,6 +2221,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) {