From patchwork Mon Jan 28 18:32:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 156861 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3748474jaa; Mon, 28 Jan 2019 10:33:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN4GXxVadR1bRXx375HOcfQz83bsaEqHPFD7gmyAaZq6KGA3dbx/PwZsJMNAyuBkbnQ2ZqDj X-Received: by 2002:a17:902:48:: with SMTP id 66mr22178220pla.68.1548700404595; Mon, 28 Jan 2019 10:33:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548700404; cv=none; d=google.com; s=arc-20160816; b=fj8Csh42qbK0xmOraQx5Ro7Yj6W01D4deDGAZQkeeTT9r0hQYmAO6IfaN/qzjCfqxs 2vrGcH14P1yFtjnvkTXN2QWgU4751EnGkbFAXUB1JQiTfUrtJxXAL/N/t8UFL8xveccl ZsrSS+ZLkL4u6/OF6xO9oUcgPuKdy+nEsfaMJAOudRcjMhS3cTiijqoLNVoTHsnZ3vUz ajd1sh2b9hItGvpqej4+oCKX5ANnJm0SCLYNAU99TtJfWuvCPx2NPRn+i5SCf3Y+xODh OlJqMYZ0UJlAuFDYE8SjM1Tq0jvR7VNrC8oDcuNRsv/CmpNrxRqCXHu3mQoQNrD/bjFY S1AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=g60ZjpL7981mWpyGrLVdtBfYDiHQgHKtcJ+DI6e0xyM=; b=AgbbMx8bZc4XH8kyp9V8NB57/JkI4oRbwwMpufdTi1JvEUZqtCTnrJCVc1CYiAX1T1 pBDalUCYM9A0SwjPDDl7zs7YDsGtFHuOvYIcD85p3eFbc7zcyWLPI0jl6bazWXokPFm3 rkEZD8wrKpBQfkfgv3fdNFRXKT+xL31iMDbGp6nbd0AfDO36jQV6JaXz2iJ5bvXfhUpE gzXXEcTy+c24fE0I/Flevms2V7lGAvDa6glW3Ry10qBITIbbXKo2AJycmolv68hWQB5A 9BjGBEEI127QV98QoCQwo+i+m6ULFheOHzd1Q0qTXWo5e6lVY/hAKLUmkiENRmR0Oznn PN5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F+uqjAbn; 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 h7si1272754pls.326.2019.01.28.10.33.23; Mon, 28 Jan 2019 10:33:24 -0800 (PST) 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=F+uqjAbn; 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 S1727824AbfA1SdW (ORCPT + 31 others); Mon, 28 Jan 2019 13:33:22 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33121 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727772AbfA1SdT (ORCPT ); Mon, 28 Jan 2019 13:33:19 -0500 Received: by mail-wr1-f68.google.com with SMTP id p7so19288000wru.0 for ; Mon, 28 Jan 2019 10:33:18 -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; bh=g60ZjpL7981mWpyGrLVdtBfYDiHQgHKtcJ+DI6e0xyM=; b=F+uqjAbnKbzSB8lfWnOU2J3SGhkWEVCMLZC3sUtR3HXaCnr1T3kqZPUPHf/YumVdKC Sq6oGx60KrbI/cxgTud27xWXcH66R026zdPHMhZ40kP5o8pcYYEGX0Plh5TLzLpm/0pn y2E4NXreMTTrwKoHhHrk3QbTvRY2WfofqEXz8= 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; bh=g60ZjpL7981mWpyGrLVdtBfYDiHQgHKtcJ+DI6e0xyM=; b=Ig9mVC9kbi516LUHLG5CsFu84hwRT4AfPPnIlJPUbqyK+XhLnFenmDsQaAw3H0MBWj Fo0SjbJHHzB8nLnAs64A41mCJjFwozFVhQO4hL6Pr/Er72NsEy50GquUNMYFqzQ3Vgu8 OJz/86Px1+MAbT75Lux2FK+cSkhm663/Qv6pSsuTh83XNVJbOItk2mDwuO1tkNtyQkux bLyCypmtqfQ4Z2rMFg4qbfDWN6G6tfSflMJ6yBawgT71szpQsTlYAcQEJ5yxHKFAtLH1 pVLP8agD+yjDkpVQhZF6/4/pzMmnpQC29z68pH2w2ZSyxP04S+Hpnusy0Pdd0SS987WT yuig== X-Gm-Message-State: AJcUukeYZguMne7WFYlPwRBvmKZ9FxjTIKdqjBRsnEdaOqR40OgvREBs ysQy4dS5kX7B3uww4BpCDcCBjQ== X-Received: by 2002:adf:cd0e:: with SMTP id w14mr23694468wrm.218.1548700397788; Mon, 28 Jan 2019 10:33:17 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:17 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 01/14] clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Date: Mon, 28 Jan 2019 19:32:48 +0100 Message-Id: <1548700381-22376-2-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> 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 --- drivers/clk/qcom/clk-alpha-pll.c | 8 ++++++++ drivers/clk/qcom/clk-alpha-pll.h | 1 + drivers/clk/qcom/gcc-qcs404.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 0ced4a5..ef51f30 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 66755f0..6b4eb74 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 64da032..7de4fcf 100644 --- a/drivers/clk/qcom/gcc-qcs404.c +++ b/drivers/clk/qcom/gcc-qcs404.c @@ -304,6 +304,7 @@ static struct clk_alpha_pll gpll0_out_main = { }, }; + static struct clk_alpha_pll gpll0_ao_out_main = { .offset = 0x21000, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], @@ -316,7 +317,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, }, }, };