Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2525238ybe; Thu, 12 Sep 2019 10:41:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4h3AJYvQ9FKtZ7k+PShGyqggUjnQ9cB3xwBK4Sy2WbPse9I5zu12GQ7dQ9o5U8rb2fJDL X-Received: by 2002:a17:906:7fc1:: with SMTP id r1mr740690ejs.301.1568310083802; Thu, 12 Sep 2019 10:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568310083; cv=none; d=google.com; s=arc-20160816; b=gyX6BozF6DYV0b3yQurmEPRXoKr5wCcozVBibLkjk8WclrjBfabTaOJVE4tsaZMLZF c802hQHlOyVnly+f15NNPf3yqRFTPjjoEwtHk3w/cYcBKbwDcSWOTLFLGPlA45Csk1Em ZXXp0G3vHj/j3+HvmTBkUtbuDGtEyM067YEOZXe9Ywk96ackormuY3wen1f02WTjnvTo qXWzOgE72q0epSxJtBey47SUuvoks+BYQN+G0giFSJgqqEVBnwcYS6Q/Vb9FHSOdUIja HEIl4F1siiS5RpGZThIcMW4d95aRCeRtkPkzdrRt1siW1MNlsvOI/Qrly4iRweHWYiEq kgoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z05c2SbQyHgmdiyuA9SdCH+TDRrblP4cUHUsGoERNgM=; b=HhF56TtJuu6lBX+EoYBPB5DLS8rDuQFnCeDCwE1KFCmNumXpcVjOsaMDLh/9wKgy0R qBXOwgT4ywJ6+3kySkaAH+qb54zocmYbLsHPljV4McGtZhtbBNN2tLStOOqPhGCRvq6Z rIBzkQbdm/xhTh5cuAXpHRAo6DGudB0LYyZZzwYTjX5MN8UyB7oHgvH9nQOBuhSHiIVj xuQopex7kt0EpzgFnQjv92xvSCtAjJAQOppA0aHMbZ3nSWm5P6Pzatiw3HRJAuRMx0tA IoYnmRdHZJnAC8bZQ9namgyd6Y/FwGngTGm2Rq3o0aSIoTeehyx7vO+V7+GhGfzhsMAV lPDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PUmIQ5HD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si1759819ejp.178.2019.09.12.10.40.59; Thu, 12 Sep 2019 10:41:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PUmIQ5HD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732574AbfILOPo (ORCPT + 99 others); Thu, 12 Sep 2019 10:15:44 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43516 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732492AbfILOPn (ORCPT ); Thu, 12 Sep 2019 10:15:43 -0400 Received: by mail-wr1-f66.google.com with SMTP id q17so23956571wrx.10 for ; Thu, 12 Sep 2019 07:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z05c2SbQyHgmdiyuA9SdCH+TDRrblP4cUHUsGoERNgM=; b=PUmIQ5HDdUAHPqQqa2qkOdoCcTkoTOmHBainGMaiWInzyotClK6/EvL+Lr5NX2w2pn /51IqSxwmwlUB11nQJO51XWYrN1f8TZQrQSR+nsWJc0ru1KXHDZtduvWYvTLNImSiWba 7cylqwtEiPEzC/LQD+1vb9adi8MeFrOafQpA9S3CfQnT0t7TGUegUPHp6wPAMTNF7bZD ZUtzngU4q3yceUwhcFiPt9gur5UX4H86SzjybcQgVnzuwzmBElqZv9deF+wovJ22gHWO VjAx1hVSxrAkSivUMHqHJC1XKXjrUr7xm7sWTtPFJJg3KJAZZvqj+Vf5T2pWyEVVv3bX O/vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z05c2SbQyHgmdiyuA9SdCH+TDRrblP4cUHUsGoERNgM=; b=qKZuvB0v2N+RIkWgecsekgN3gaxsyFJzGTN//NDDmKt7DONAwiL39/wLURrFMUcth/ +3qNH+WFvKFe18geWDZzYZDvmW4LJ0vU7FSsqDGgVJKC1Qw4fTrNLg2eGV4Aif4eSoNr qD/K31JICHg/jYuEfAO/vxxtb/y4QTwyhgnDXtXZcNd22i3MJjCzpjyoM97VTx0yuxTR y0la+DHrz1M82HtvQrM90sIEv1U8c7Fon4a1OeIDOebJl8ebCHo1XRXFI4jmiQpXk2t8 ThDmcF7bWcqaQ8VS7oxKY0iWvhyiLgN1gtePmZPNEDPWGlbazvXcDs8KVEuznjzQJV1u Ilrg== X-Gm-Message-State: APjAAAXf7CvNGpRJw7avNshzx0aM/LZb2grazG9r1yv4I428UJTbruNv Zc0qwaGUSRD3FZkUcAmUbkP2Bg== X-Received: by 2002:a5d:650d:: with SMTP id x13mr2334646wru.37.1568297741707; Thu, 12 Sep 2019 07:15:41 -0700 (PDT) Received: from localhost.localdomain (69.red-83-35-113.dynamicip.rima-tde.net. [83.35.113.69]) by smtp.gmail.com with ESMTPSA id p23sm137599wma.18.2019.09.12.07.15.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Sep 2019 07:15:41 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, agross@kernel.org, mturquette@baylibre.com, bjorn.andersson@linaro.org Cc: niklas.cassel@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Date: Thu, 12 Sep 2019 16:15:30 +0200 Message-Id: <20190912141534.28870-2-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190912141534.28870-1-jorge.ramirez-ortiz@linaro.org> References: <20190912141534.28870-1-jorge.ramirez-ortiz@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Limit the GPLL0_AO_OUT_MAIN operating frequency as per its hardware specifications. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Acked-by: Stephen Boyd --- drivers/clk/qcom/clk-alpha-pll.c | 8 ++++++++ drivers/clk/qcom/clk-alpha-pll.h | 1 + drivers/clk/qcom/gcc-qcs404.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 0ced4a5a9a17..ef51f302bdf0 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -730,6 +730,14 @@ static long alpha_pll_huayra_round_rate(struct clk_hw *hw, unsigned long rate, return alpha_huayra_pll_round_rate(rate, *prate, &l, &a); } +const struct clk_ops clk_alpha_pll_fixed_ops = { + .enable = clk_alpha_pll_enable, + .disable = clk_alpha_pll_disable, + .is_enabled = clk_alpha_pll_is_enabled, + .recalc_rate = clk_alpha_pll_recalc_rate, +}; +EXPORT_SYMBOL_GPL(clk_alpha_pll_fixed_ops); + const struct clk_ops clk_alpha_pll_ops = { .enable = clk_alpha_pll_enable, .disable = clk_alpha_pll_disable, diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index 66755f0f84fc..6b4eb74706b4 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -104,6 +104,7 @@ struct alpha_pll_config { }; extern const struct clk_ops clk_alpha_pll_ops; +extern const struct clk_ops clk_alpha_pll_fixed_ops; extern const struct clk_ops clk_alpha_pll_hwfsm_ops; extern const struct clk_ops clk_alpha_pll_postdiv_ops; extern const struct clk_ops clk_alpha_pll_huayra_ops; diff --git a/drivers/clk/qcom/gcc-qcs404.c b/drivers/clk/qcom/gcc-qcs404.c index 29cf464dd2c8..18c6563889f3 100644 --- a/drivers/clk/qcom/gcc-qcs404.c +++ b/drivers/clk/qcom/gcc-qcs404.c @@ -330,7 +330,7 @@ static struct clk_alpha_pll gpll0_ao_out_main = { .parent_names = (const char *[]){ "cxo" }, .num_parents = 1, .flags = CLK_IS_CRITICAL, - .ops = &clk_alpha_pll_ops, + .ops = &clk_alpha_pll_fixed_ops, }, }, }; -- 2.23.0