From patchwork Thu Aug 11 13:52:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 9275323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 261D860CDC for ; Thu, 11 Aug 2016 13:53:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 169A228683 for ; Thu, 11 Aug 2016 13:53:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AF3528680; Thu, 11 Aug 2016 13:53:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0D9028680 for ; Thu, 11 Aug 2016 13:53:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932222AbcHKNx0 (ORCPT ); Thu, 11 Aug 2016 09:53:26 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59488 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932174AbcHKNx0 (ORCPT ); Thu, 11 Aug 2016 09:53:26 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 797C8613A5; Thu, 11 Aug 2016 13:53:25 +0000 (UTC) Received: from rharjani-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: riteshh@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6929F613A3; Thu, 11 Aug 2016 13:53:20 +0000 (UTC) From: Ritesh Harjani To: shawn.lin@rock-chips.com, ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com Cc: linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org, alex.lemberg@sandisk.com, mateusz.nowak@intel.com, Yuliy.Izrailov@sandisk.com, asutoshd@codeaurora.org, kdorfman@codeaurora.org, david.griego@linaro.org, stummala@codeaurora.org, venkatg@codeaurora.org, Ritesh Harjani Subject: [PATCH 08/10] mmc: sdhci-msm: Add get_clk_div callback definition Date: Thu, 11 Aug 2016 19:22:54 +0530 Message-Id: <1470923574-411-3-git-send-email-riteshh@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1470923574-411-1-git-send-email-riteshh@codeaurora.org> References: <1470923574-411-1-git-send-email-riteshh@codeaurora.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP MSM controller does not use the div, instead needs the base clock and the driver controls the base clock (MCLK) at GCC directly. Signed-off-by: Sahitya Tummala Signed-off-by: Ritesh Harjani --- drivers/mmc/host/sdhci-msm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index cfd0209..f148c96 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -570,6 +570,16 @@ static unsigned int sdhci_msm_get_min_clock(struct sdhci_host *host) return msm_host->pdata->clk_table[0]; } +/* + * MSM SDHC controller HW recomendation is to not use + * clock divisor hence return 0 from here. + * Driver directly controls the clk-rate at GCC. + */ +static int sdhci_msm_get_clk_div(struct sdhci_host *host, int div) +{ + return 0; +} + static const struct of_device_id sdhci_msm_dt_match[] = { { .compatible = "qcom,sdhci-msm-v4" }, {}, @@ -586,6 +596,7 @@ static const struct sdhci_ops sdhci_msm_ops = { .set_bus_width = sdhci_set_bus_width, .set_uhs_signaling = sdhci_msm_set_uhs_signaling, .voltage_switch = sdhci_msm_voltage_switch, + .get_clk_div = sdhci_msm_get_clk_div, }; static const struct sdhci_pltfm_data sdhci_msm_pdata = {