From patchwork Fri Aug 16 13:47:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuvaraj CD X-Patchwork-Id: 2845687 Return-Path: X-Original-To: patchwork-linux-mmc@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 828479F271 for ; Fri, 16 Aug 2013 13:48:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6413B2028F for ; Fri, 16 Aug 2013 13:48:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34C2020237 for ; Fri, 16 Aug 2013 13:48:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754520Ab3HPNsB (ORCPT ); Fri, 16 Aug 2013 09:48:01 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:37092 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754517Ab3HPNsA (ORCPT ); Fri, 16 Aug 2013 09:48:00 -0400 Received: by mail-pd0-f172.google.com with SMTP id z10so2286049pdj.17 for ; Fri, 16 Aug 2013 06:48:00 -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=NsY4yIIiz/4zvIsZcD8UxP3dG20lvJZCfseXj+HYick=; b=woxMjoLXDIGObBb11gZ1DAYYCDMARoEBFDS+6eBk0vXeBp+C5QQwXBdKkbDRrSIWes +bbyNLVJkz5SYwe3BzCMBJRsHmtUWXmVzmKbpaegRRZdwp4Y89TYShAOS2TLm8cUcCXf hWIRUux3KfAW1N2kEGa+9GLZU1OEjgw7U2A/k7TBSaPoa7JtdX61aDgL2/KR2HTs9x56 MkQMqR/SaK32tV6MIgOQyvHKX/fMLzwRmFuLEjyo4Kr1RJ0zB8z+MOMk/vvR9aYGJSj/ qE8ORwlOGm0B3fUkKqDSagiuuf2y9ABCx3j2tfQv0fGARQEpctHzNPs1R2lK8BWoH/aa naBw== X-Received: by 10.68.5.228 with SMTP id v4mr1729318pbv.117.1376660880454; Fri, 16 Aug 2013 06:48:00 -0700 (PDT) Received: from yuvaraj-ubuntu.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id s6sm3523590pan.12.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 06:47:59 -0700 (PDT) From: Yuvaraj Kumar C D To: cjb@laptop.org, jh80.chung@samsung.com, tgih.jun@samsung.com, linux-mmc@vger.kernel.org, thomas.ab@samsung.com Cc: Yuvaraj Kumar C D Subject: [RFC 2/3] mmc: dw_mmc: move the platform specific init call Date: Fri, 16 Aug 2013 19:17:41 +0530 Message-Id: <1376660862-387-2-git-send-email-yuvaraj.cd@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376660862-387-1-git-send-email-yuvaraj.cd@samsung.com> References: <1376660862-387-1-git-send-email-yuvaraj.cd@samsung.com> 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.5 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. 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 ee52556..a570da4 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -38,7 +38,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) @@ -58,12 +57,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 ee5f167..0c0cada 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2222,6 +2222,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) {