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: 55324 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 3B53122EA2 for ; Tue, 20 Oct 2015 16:59:00 +0000 (UTC) Received: by lffy185 with SMTP id y185sf7689984lff.2 for ; Tue, 20 Oct 2015 09:58:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=UzGz0xTYwmAK+Ak1amctX1kkHnT11iR8nXTzfpV/AY4=; b=Vly6VCszLPY4ym9aUFVEAYn+TSmKcZh5uFmjVwgNUnn2mgu8+dKicekV7dMZ5PB+WA zqbjV3xRRVBlTVwemrP+vEkQHIYvqYsXiwXl6Ul1GrFxfBIul7aRiKfeWGLt1dtsW4I0 4WAYx8qCdB1PbCAfVGw2KOz7dYtPqqs8d6PJJ08v+pfXpUbelHx7n7el9hvSGZgOQl6G +L4GGi9MkP35V+6Sz+uSSC5JZU9od+RHQ0KtDZqFRqSmA3cpNnYKP3zbgKq+2zJ4iHXZ K+bJXkJwG7JQK8Bs9YeWBZcOYmAfRxPY4nCPMluNNdpDZ+AilUKqo4nNo5iolDGTEbx3 cg2w== X-Gm-Message-State: ALoCoQkcbCP7MvAHAV6/aDQEJXLxdQcKhS76l5DU++twgNQ7BxCd37/X8wackqvukOPljG6mY3Zp X-Received: by 10.194.118.65 with SMTP id kk1mr893638wjb.5.1445360339132; Tue, 20 Oct 2015 09:58:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.90.85 with SMTP id o82ls91784lfb.98.gmail; Tue, 20 Oct 2015 09:58:58 -0700 (PDT) X-Received: by 10.25.28.73 with SMTP id c70mr1381260lfc.76.1445360338943; Tue, 20 Oct 2015 09:58:58 -0700 (PDT) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com. [2a00:1450:4010:c04::233]) by mx.google.com with ESMTPS id sy6si2987614lbb.146.2015.10.20.09.58.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 09:58:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::233 as permitted sender) client-ip=2a00:1450:4010:c04::233; Received: by lbbec13 with SMTP id ec13so17705027lbb.0 for ; Tue, 20 Oct 2015 09:58:58 -0700 (PDT) X-Received: by 10.112.161.168 with SMTP id xt8mr2498827lbb.88.1445360338831; Tue, 20 Oct 2015 09:58:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2197634lbq; Tue, 20 Oct 2015 09:58:57 -0700 (PDT) X-Received: by 10.68.227.227 with SMTP id sd3mr5157358pbc.116.1445360337734; Tue, 20 Oct 2015 09:58:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hg4si6419588pac.145.2015.10.20.09.58.57; Tue, 20 Oct 2015 09:58:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752811AbbJTQ6w (ORCPT + 6 others); 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) 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: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Original-Sender: georgi.djakov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::233 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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); }