From patchwork Tue Jun 25 16:47:20 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: 167734 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp5779255ilk; Tue, 25 Jun 2019 09:47:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSd7DtTsRjINOPRyYkBC0f0l6xxIfNKxttLL58KdSrjjxfEUTzavkPuXVozTB2Mqsg2IEU X-Received: by 2002:a63:f14:: with SMTP id e20mr40234443pgl.227.1561481263461; Tue, 25 Jun 2019 09:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561481263; cv=none; d=google.com; s=arc-20160816; b=cuihRvO0BJqRqLtgd96QAXx1KPDrokoiT4ic7YIljfPOao0+yVU/0HEoH5Lsj5ongH Nn4R40ShX9rb15gadgzUmIJPKYgG9zMLiE5gDxVuSEhKa3ra9EsXoZyLNg1dshH5Ielh w5NJAcnloFtVhvlLEug8Z5B8M1qjqOzIoopsjjWRAgENxBDjf95DOyjZ6t3kiFHyteFf 0VbFiIFE9NcXUZhZHbAUEsWfBFp5iboIOzArANx4KIEoJz4ZWPO0paax00gE3rL14kTj l5+LXMWx22b0JB+6a0ja/vO1IDvcDpfWIFczYQgpoOTnYbEAF6pspivQy7FOHVrHZYE7 OIgw== 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=Xx1EmDNUL6NrJs1zybeQYATP7BtRS3ZxfHrchYlbb1w=; b=ivuuepuBZDQx7TH1Xwqm3mxPKOmOSvZiqCIohLSQNWRn+/e4auMvj4z1XNJnrTnhq7 krxHyGvlI0BOTnjTZWUnqS0oJe0mBd5+9O/tmF5zlqNmlzTn6cGJJfu3Itjz2hbsGO3B GQCgUUDE+mT5NDQ8idsWzbOgnJBbT749tDjmtkmRCFwyvRpXriXmb+ssULM1F5ta+HdD /FakUhqHFdaUa5HVncX4ywLXDjjwDpZlUFwV/inOLVnNRSjacALP/EpvJeVdoeT1oYXK wk4ZyvfEBvfOxyjZaMCr3I0CS+JliGObYMRfnvl080m0QddxkBaDqP4zOsxDEMyuBDYw EvtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ehQo1iJY; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 d5si13319197pgv.584.2019.06.25.09.47.43; Tue, 25 Jun 2019 09:47:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=ehQo1iJY; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1728187AbfFYQrm (ORCPT + 8 others); Tue, 25 Jun 2019 12:47:42 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:50220 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728255AbfFYQrk (ORCPT ); Tue, 25 Jun 2019 12:47:40 -0400 Received: by mail-wm1-f68.google.com with SMTP id c66so3571448wmf.0 for ; Tue, 25 Jun 2019 09:47:40 -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=Xx1EmDNUL6NrJs1zybeQYATP7BtRS3ZxfHrchYlbb1w=; b=ehQo1iJYS9sB9JFN2Xa22OZs9vsDho+0SpTjnu+gLJrGOR91YDeDq/PPd81moyZ2sY 0FyU9t0jreva8jyV04sH4pWQ70l6pRHZJbBWvSULWQngBX+Z9EdPpp8VUtNT8LxcsAHh vDjKzTSGbPyFTth0SxzDdo/EeN3U2FXuXRuyJ3TxRvy0pEcSXC+KKU2wL+Z5fIRO2H+P d9Vits6jzByP971MXaDurZbFM8FOV/kvXPKitcFxzyjSvvlNu2YsdbbzQjdSN7vX566V qamvc45X6PPKW9gW0tctAb3tSHNSMZYpqHHqaWFj/NT0HYHWhFqZhwRFbJsoHe1X8UJn kUjw== 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=Xx1EmDNUL6NrJs1zybeQYATP7BtRS3ZxfHrchYlbb1w=; b=qaDCJORgd302N2ye8V3nRm+A7o82EsNmz7hY0H9H2sgMM7CTO/g0N6MAxbIG2Q91iu OwpkJV659mnEQ59k3YP7KiKmegHmhEjm5kKinRYbddZKC/x2foARv8J+ucTqt+RY478S CMVRxesZYohkgUzA+/FnnEimymofka004QKYsUPsnY7Qa7Cz7jivvJLEloIF47d/5NhU jzcQyi+i/J/P2YzXpgl3JE8y+VC1lA+abVwgXn/fu91yjhpo4QQVgimoHeO9XyJ6ZPfh AFjZTky1zmNKc4Kn2a91iF3/HTHDDrCc3MihSFd59H2J9R7AIeytBMXkaojeASoDFTzf nwJA== X-Gm-Message-State: APjAAAXT4jYOWZq0rVyvOF6gtay3eD+p92rjoO7e/5CadUAqYOGDZGOu KX3Y0/YaiiLLbNAvrxD7v0B+fQ== X-Received: by 2002:a1c:cfc3:: with SMTP id f186mr19048286wmg.134.1561481259356; Tue, 25 Jun 2019 09:47:39 -0700 (PDT) Received: from localhost.localdomain (30.red-83-34-200.dynamicip.rima-tde.net. [83.34.200.30]) by smtp.gmail.com with ESMTPSA id d18sm42594476wrb.90.2019.06.25.09.47.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Jun 2019 09:47:38 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@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 v3 01/14] clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Date: Tue, 25 Jun 2019 18:47:20 +0200 Message-Id: <20190625164733.11091-2-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190625164733.11091-1-jorge.ramirez-ortiz@linaro.org> References: <20190625164733.11091-1-jorge.ramirez-ortiz@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 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(-) -- 2.21.0 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, }, }, };