From patchwork Mon Nov 25 13:59:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 180156 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3187872ilf; Mon, 25 Nov 2019 05:59:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwH8Kl/W5S0CfWOoKF9M2H7bemLEidH+yjf7nb0wppNRh8SsiCQR25Lq+2CP7rMnoti7JVM X-Received: by 2002:a17:906:d052:: with SMTP id bo18mr37768348ejb.128.1574690361645; Mon, 25 Nov 2019 05:59:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574690361; cv=none; d=google.com; s=arc-20160816; b=kyB4dIU2acSfgnK9iIT0xvS4BpmN4fREmih02Mw+MvjGijLm0BG2W0E2s718IeIFVO xkv0qRm0njrVw1iIaUy+JX5Ur3HARhsMTSmYiH6qacCKECBSikAblJQWdhHUnuRPeo+V 4LsbkcSNokogINzW9UehQAhzIrEtOlkL+b3iUrWfpwUmSZoj7oywjsv964xqJK83oQhd Jkg0rqTdw9GI2KXHc3yLLq7bdBpT28xF1N3DlI3YpKvNz+fK1aNgi8KgJl1GpSLrw/qg 2JF7/+XyXYquDYKIi7v8gLw29RgijCraL7F3QlIS116aebtFcOJI1ObU7i/2S6ncL6s5 9qVg== 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=UyfsDOjViaLy31rOpDuIJP2/tnh70uuMePmLyotTbkw=; b=ei52gQGeroroFSlp8+WSuA1fgRBEOjwpteldoXrrckcAWrPsTyo5WsOI9i43mKzhy+ G81s96bSh0Y2ZHe+ciKtA/P+g/UXFCE2vlQNV9y/fDFGOdHls0zmhlsiBZyZxCMfr6ZS /sSaT6aXO8kD9vgnSNz4GHA3I1lfqHqmLAMXwxC8X51ygyjhxbc6SfayLBy2bqKwg+hw VS1kHmIyidK1HEh1iFxbM8AgBKFSMQyibAkMaKaFTaY08WviaOnZj9FfY6dcDHZeCRMG TxGjZKXK5mm2i/PtxIrR2ThCtLZZd68mmp/cAB/g4prjWX4Jj5TVEBx8A94kS6evjjFs kcCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MHDvRHjk; 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) smtp.mailfrom=linux-arm-msm-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 hh7si4535772ejb.57.2019.11.25.05.59.21; Mon, 25 Nov 2019 05:59:21 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MHDvRHjk; 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) smtp.mailfrom=linux-arm-msm-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 S1727869AbfKYN7S (ORCPT + 15 others); Mon, 25 Nov 2019 08:59:18 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:39039 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727666AbfKYN7R (ORCPT ); Mon, 25 Nov 2019 08:59:17 -0500 Received: by mail-lf1-f68.google.com with SMTP id f18so11087613lfj.6 for ; Mon, 25 Nov 2019 05:59:16 -0800 (PST) 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=UyfsDOjViaLy31rOpDuIJP2/tnh70uuMePmLyotTbkw=; b=MHDvRHjkJIFUfMfGegrgrKlpv2zmfBLohiOLgx4UIyE3n0riOQHx0+AxlRvu1q3eHT S1AtdURFgmdpIPgJ7Jt2UK95EnVyTpKWD53sQMm4saA3p1Wd5XW65dWl0j69khJJ1x9w W3AJkht1Xclp90KZZRtanNu5SNy5FKDpU+cJ+uWbUVsQM8mqJ5IVJPinTI6v52fySDiO dai+VItWn95ik4QZJvLT+WpGGcVYcJ3aMFL9evIZC+FN1iXfnmBCM3ll1SEkcmRChedn kSv3FSkifhhu9wjRMdYpeegX9xx5TwfRxzlTzj06ZGM1K6bBInBBg+H0jNENGb4a+fxH AZpw== 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=UyfsDOjViaLy31rOpDuIJP2/tnh70uuMePmLyotTbkw=; b=c5galsTK7qp3/7Pxk6h4rr4Z4hSHQxdlFmL7Fprnc4oey3qMsHysuOMzucTRNLBq9V T6cgpPr8czgSbxrRi2Wy3JU0Mq5ZgtBckH7h9W0mTCCAgzEu+E8wlSkE9WZ22qL1A0WW K/QsqzojhXiMKh+1ldV4s1ABeNQviv3BXJwg/eLE9AVfVqpb9D8gCjHY+5bxhBzQBo83 9R0aX4cJ1lvINkVrqp1Wd6LfPeDALKQGOQQOwKjNjLZM7w+R8SCIxebkOlh/sG4yjeAu EZiR1F3fHrhKHGUvR9dw9GrbuECk7ajBj0Rn21VOSqmqqGzwBa6RC0R76BQRowKA2i1D Ouew== X-Gm-Message-State: APjAAAWt/Rzt4wp6bYPKP+SltLu1sPkLwFEn0TMAn4owSFpu9zMnOiYT /lUdC7/XifGnj0Ok0fEAAk3lllb87KLl3A== X-Received: by 2002:a19:520b:: with SMTP id m11mr20364369lfb.77.1574690355801; Mon, 25 Nov 2019 05:59:15 -0800 (PST) Received: from centauri.lan (ua-84-217-220-205.bbcust.telenor.se. [84.217.220.205]) by smtp.gmail.com with ESMTPSA id w71sm4189705lff.0.2019.11.25.05.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 05:59:15 -0800 (PST) From: Niklas Cassel To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, amit.kucheria@linaro.org, sboyd@kernel.org, Jorge Ramirez-Ortiz , Niklas Cassel , Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/7] clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Date: Mon, 25 Nov 2019 14:59:04 +0100 Message-Id: <20191125135910.679310-3-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191125135910.679310-1-niklas.cassel@linaro.org> References: <20191125135910.679310-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Jorge Ramirez-Ortiz 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 --- Changes since v2: -None 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(-) -- 2.23.0 diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 055318f97991..9228b7b1f56e 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -878,6 +878,14 @@ static long clk_trion_pll_round_rate(struct clk_hw *hw, unsigned long rate, return clamp(rate, min_freq, max_freq); } +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 15f27f4b06df..c28eb1a08c0c 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -109,6 +109,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 9b0c4ce2ef4e..46d314d69250 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, }, }, };