From patchwork Wed Jul 31 20:29:17 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: 170226 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp4462447ile; Wed, 31 Jul 2019 13:29:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKpj4gYH6jxjFfTpqayemV/wsy+fdkZ+b02PC+2VROY+55IGYbJYlKYvHhpvLqwBDE0QyK X-Received: by 2002:a17:90a:7788:: with SMTP id v8mr4817335pjk.132.1564604982623; Wed, 31 Jul 2019 13:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564604982; cv=none; d=google.com; s=arc-20160816; b=K8axcUXj5j4sVHS9flbvjZuEaw0+Z76aglWcZzhZQza3sRn9UvH+ptdanRjLebJrF7 KYB7EHu17G1u4zdaI7rvOAdsB/8/LxHdAVcyrog8oGUkBgnCOABwTD1mVLnmpbgGOEGe 9coKD7JUAqcQErrd6VA8PRozVP7uw6m5DztAYRaUJ0SKiQ/4dzppjsyYs+v85bsuvSOh SIryw3lFrQxXItHAExUhTeI9Vev16EgUDIYphTEOJe3shJPg71XBGBswsA4aGratjTel 7tzbcL0lEZT14lprml/rwjPjmHJHFkTulAvdWPxu97B3eM/2Wlq5jfBf1pbTC1d7VjAa JvJQ== 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=6UZkyijByMpuxE0Xbsk6WcUcxOmUbJF19dsM5QH8BkY=; b=a64xUO23bqlA2lxl0UG/WipBiB+KE3SfqgrrhJz2zSf2WZwjDsAs/Dey4r3D+tAuDN uxnPtPaA2lGOVScMXM2bO3Fc6a4J3tRJbmP7+s7mfkRPFSo5E0RZO6KrJtX/cXUcnGct 8Vx5ZDF3hBmiqyNXDvYiuo5fQYKCsOmoTXuQMqStEYds7qn34Pm7oqqj4N5YF3iTtNjB BOS6eLY30jH4vsWs2a4ALr7ubYLJPSI0ANfQUKLosA2VKQ0LMcelskacpjufvxzIPWRi pxin4CutD2KFndv4swRgyPca5HWzx07XUS03tpPqtlVwGy/YthmgG37j1qDD9hofW9FV xhag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xZevYhhz; 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 v20si2238422pjn.27.2019.07.31.13.29.42; Wed, 31 Jul 2019 13:29:42 -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=xZevYhhz; 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 S1730611AbfGaU3k (ORCPT + 29 others); Wed, 31 Jul 2019 16:29:40 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52161 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729730AbfGaU3i (ORCPT ); Wed, 31 Jul 2019 16:29:38 -0400 Received: by mail-wm1-f66.google.com with SMTP id 207so62181746wma.1 for ; Wed, 31 Jul 2019 13:29:37 -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=6UZkyijByMpuxE0Xbsk6WcUcxOmUbJF19dsM5QH8BkY=; b=xZevYhhz/KWW804fwxTCRJYZrjrhd2ux0NAhpibY7RniDQTM2Xc5Nupcd/skVMUyU7 29Df1ZK1VoZAXcIPtispxhZ19rQLny647TX3/OkH04BMHAtTl370i3cIsF7HOrMWBMU/ 3Qp3gs8F1H7ZHaXzjC1LDvhDKOk1uxraJZBbTciSG4ORbVxCfJwPZiyXWJkZM/KO8the UeMBPPfrDS/zFvFaKI4/IJN3z5rI4TvBLhzee0AK9fA7HZJ1CSheeXR3xDVbu6fBrkB/ IhkTlK0mP+PXftXZ4eLqdj6WJZ2Yswfnej+JLPBKkYaaJyfOuBpV/NoWLmV8UJXprARs EC3w== 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=6UZkyijByMpuxE0Xbsk6WcUcxOmUbJF19dsM5QH8BkY=; b=sWE6mhjMevSYw7K/JocWGaqzbh5PL94mrw1RVN7Zfe3EWb8qHBGGW8Fy1MsutHywAZ NT8DFwxJQoHvq8JsC9VmdmaqwW5AG+s1JUNhAI0F+otp7i+5ajHZQj4KNLO/ac+zJtTw Eob6c+1054vbZU9cG6xFo7YhhAyGvRvrIH/dCNoTj9u+KrizdTp0iiIUERzLQf3s50SA 5khaYilOkj624qso8WziIbmX/bkZYsXw8r0i/QvD6iSCTjznkQSN8ZuVj+iWN42jgLxp o4pjQusJwg9GRdz1lR/FQ9vXkDSlVga3CeA2AeZJRB/NkdbWth7NeJzUZOkYUqTA/nl9 NZtA== X-Gm-Message-State: APjAAAXY74FDCZd9ID9esv5UdCKoFE6kTGXiyZzzrF0shY/JOVZsXrkQ 48h3OGd1xEetsWdy48nD1zb9jQ== X-Received: by 2002:a1c:ca06:: with SMTP id a6mr14944909wmg.48.1564604976566; Wed, 31 Jul 2019 13:29:36 -0700 (PDT) Received: from localhost.localdomain (19.red-176-86-136.dynamicip.rima-tde.net. [176.86.136.19]) by smtp.gmail.com with ESMTPSA id i18sm91905591wrp.91.2019.07.31.13.29.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jul 2019 13:29:36 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, bjorn.andersson@linaro.org, sboyd@kernel.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 v4 01/13] clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Date: Wed, 31 Jul 2019 22:29:17 +0200 Message-Id: <20190731202929.16443-2-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190731202929.16443-1-jorge.ramirez-ortiz@linaro.org> References: <20190731202929.16443-1-jorge.ramirez-ortiz@linaro.org> MIME-Version: 1.0 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(-) -- 2.22.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, }, }, };