From patchwork Tue Oct 20 16:57:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 7448961 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D84D1BEEA4 for ; Tue, 20 Oct 2015 16:59:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECD1A207A1 for ; Tue, 20 Oct 2015 16:58:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19D8C2082F for ; Tue, 20 Oct 2015 16:58:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752811AbbJTQ6w (ORCPT ); Tue, 20 Oct 2015 12:58:52 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38499 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752791AbbJTQ6p (ORCPT ); Tue, 20 Oct 2015 12:58:45 -0400 Received: by wicll6 with SMTP id ll6so38082033wic.1 for ; Tue, 20 Oct 2015 09:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aIGcTqMhitwDxGD6KF3m0z+yaos4C5kpP4S5ljqhLwo=; b=Xy2d7ZSInNudWyr2KfoGd8j/4F/cPkt7f3U2YyuzChNGDPlsLq5mltSn9P63x19QD+ 9PFloMH2ZafgeFQMJOvW/3Esfen10a5PT5+cjFAWUmS8EwGW+jmEPABIM/nyPwNEOu7U H7AngylA+P3fzs4RR0C7aeysnbhPng6jU6Mde0dGzu40XbrEfm8xa9hs6ic2H2fuBsvG q6QCsaK9uL/gbloBj4ioeuVatBKIBrC5eZu2FyXYd8Iw+AZjXp54K7PSuxE22u118kjD TuLkF5U8Ms5WyJcmv5BuH1a3e/B4dycv+DHWO7W09ePWdIx/+cJpCvAQnQXzbwgCDWB3 8UgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aIGcTqMhitwDxGD6KF3m0z+yaos4C5kpP4S5ljqhLwo=; b=BTaFUW2y0xnp3ijG0jkiTcCFNJKA3pz69YLsDYt8SDB7qhAJOJ6JIN+1197k0yGzyq QcsduOhHKTJOXoPNJXlyN6fkLzhUD+O6Rl1EQn8m+h2q2LLJBzWkmGkgB7cIJ2/rSWKs KPvjvO1vvRdlpOOM/IV651woP8UfTMfmUFcvDoEPg1jroz0gASSyvXq8bxLyyPIb7G0U aOmoEUI6nOH8YKl9LmleFtEHS7QooPK8Lfb0WorFY/gyIwL5Ha5JtjGOz60/l/gNK4/y NZoN7wqbTqVBhxfWca+c6AGWylLhKyr16i0o3QlTiA1qws2Q+Y92xhceQ03J6ZsDpnRq MYhw== X-Gm-Message-State: ALoCoQlGmGZhMv+jPxPjCuObHNCzfwBqUinT0Y33FhSv5wSIZ0XN9sYNYOzOj5kK/3/zOXoiy4XK X-Received: by 10.194.173.42 with SMTP id bh10mr6046876wjc.141.1445360323998; Tue, 20 Oct 2015 09:58:43 -0700 (PDT) Received: from mms.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id ex17sm20092069wid.23.2015.10.20.09.58.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 09:58:42 -0700 (PDT) From: Georgi Djakov To: sboyd@codeaurora.org, agross@codeaurora.org Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org, bjorn.andersson@sonymobile.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v3 7/8] clk: qcom: msm8916: Use RPMCC if it is enabled Date: Tue, 20 Oct 2015 19:57:59 +0300 Message-Id: <1445360280-2347-8-git-send-email-georgi.djakov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1445360280-2347-1-git-send-email-georgi.djakov@linaro.org> References: <1445360280-2347-1-git-send-email-georgi.djakov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 The RPM clock controller driver takes care of registering the xo clock. Do not register it in this driver if RPM is enabled. Signed-off-by: Georgi Djakov --- drivers/clk/qcom/gcc-msm8916.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/qcom/gcc-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c index 4bb7d8415ba7..3e1062fed230 100644 --- a/drivers/clk/qcom/gcc-msm8916.c +++ b/drivers/clk/qcom/gcc-msm8916.c @@ -3359,13 +3359,15 @@ static int gcc_msm8916_probe(struct platform_device *pdev) struct clk *clk; struct device *dev = &pdev->dev; - /* Temporary until RPM clocks supported */ - clk = clk_register_fixed_factor(dev, "xo", "xo_board", 0, 1, 1); - if (IS_ERR(clk)) - return PTR_ERR(clk); - - clk_register_fixed_rate(dev, "sleep_clk_src", NULL, - CLK_IS_ROOT, 32768); + if (!IS_ENABLED(CONFIG_QCOM_RPMCC)) { + /* RPM clocks are not enabled */ + clk = clk_register_fixed_factor(dev, "xo", "xo_board", 0, 1, 1); + if (IS_ERR(clk)) + return PTR_ERR(clk); + + clk_register_fixed_rate(dev, "sleep_clk_src", NULL, + CLK_IS_ROOT, 32768); + } return qcom_cc_probe(pdev, &gcc_msm8916_desc); }