Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4414337ybl; Mon, 26 Aug 2019 10:04:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2NCH5RsOm8DdaTwaqCz2ZVFniwJddYz+bxj6uj6YFKsThr0/VZvYo7ssNo4Ro6Vs+7rDf X-Received: by 2002:a17:90a:cd03:: with SMTP id d3mr20979910pju.117.1566839093078; Mon, 26 Aug 2019 10:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566839093; cv=none; d=google.com; s=arc-20160816; b=Zn+t8SXogvOqfEab0Z0OZHiTbJeLL/GHP21cF4bcoa8tk+674MFwEw9SjJN1+JqicX kAM+2A9gi0tO9Jtb8ld6lUckscr8k5I67j21XdQVhHy/BLvE39E5m0E4Hd+f9jBHMcxG iCk006qt/unfARDWSFodStTEMvnDZRUqxlEetAtnaYeGQ5Dpi746mDKKJWS/9pBXqcOz 3Y2crBhY24IhnvOdx/BjlOcxAONNsOvrm91LMA+SWTjdZen3FQL7Xb89nGr+XQs4MBmQ Oc2jVMC5Dj0Pbkqbr1YjVhzponyZJm+xSy2w3YzhQKDvl6WHefMzQRyH5skHFHimSZKd RdZg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=40OiuM1nuJAlvKWfMTtKgR/XOwSSjLB8LuDFl5DKXzY=; b=lKaU/7JwccmaDDTB1yyCH8quJ5+dbVtE5CW82U6bX8cnAuAuyS24VzgkKTHC6TjQrG gGA8SNrMUo107pEj4vXQGYMHw652+gshs9hGq9vSIAj5v3EDxCbs9++lKyxoTJrwU+zH PvoqMfpqnmokhH3XK00DcsS9oStwdRoRnUkppw7+yG+JAjEDDGE7DkK/8gDmSuA93lne iwk9Qpz679KtsEr2tXZXEuiW74hNC2D8pkwiHH0Qm4SAcYbilZbmBK/PNUnTucV4eceF yoJJuAkTiV3O+e1gqwghKXDJnb+ALAnGCilb0rwn/Zll9ljO2gBui+NB8fyE9NtTt43P BHBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GN6MYYYH; 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 y10si86422pjy.34.2019.08.26.10.04.37; Mon, 26 Aug 2019 10:04:53 -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=GN6MYYYH; 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 S1732921AbfHZQpR (ORCPT + 99 others); Mon, 26 Aug 2019 12:45:17 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38803 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732610AbfHZQpQ (ORCPT ); Mon, 26 Aug 2019 12:45:16 -0400 Received: by mail-wm1-f67.google.com with SMTP id m125so176251wmm.3 for ; Mon, 26 Aug 2019 09:45:15 -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:mime-version :content-transfer-encoding; bh=40OiuM1nuJAlvKWfMTtKgR/XOwSSjLB8LuDFl5DKXzY=; b=GN6MYYYHB3XQKR+KiwiVIeeM+2G4bD2QVjJ0i4C+/s4CBPD92zJDGewr9zJsWAgCRN /z45GHS5Uf1w6DWI8hlpFtkeIsMSlftBpG6gJ22S3dI3X7s70ELcZ3mclie1tUmUtfX+ 7pSX+Q9Ic4LZ2i1TtIGatlciKeYIMHfq2cQGn4RqSdKevBITEYAnSgSL0AQOZhdJWE2V K4U7eHqz160iQTcPGp/97QN/v6FHd0Pu3PPD505UezV34nYhvf/t7bezKlDgHDu/HOHj P+1lnPj6hPWhzZ0P3jWvjG75//1tON4d5jP/dlA5EzYpFSW+CUy/Z5vD3LS+Y++h62OC fYyw== 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:mime-version :content-transfer-encoding; bh=40OiuM1nuJAlvKWfMTtKgR/XOwSSjLB8LuDFl5DKXzY=; b=ROdPMu4Gp6mntdMldvwTZmXA2VsjB/DC++Sos+wUxETPDoEZTc2BA/Sl1EmZ66AmuG ywGaH/rSMjft2EBWQgq547E0CldrLvIO4Bo561Wc/NPSaPxUDeRLY5aeW6crYUKlUGY+ 4BfJ/a2LkpAfyqZG5QXc/j4ZVgLkSnFLTJ06UdPWAhMpFIYK5zwJ6Ria2+3jbd0u4GyW YDja6vOfs0kro5w5y+VRwWfYE4hDWaMbCfwt0WlnaebchQnuChtwKVzmZomQG0Fv2Ry0 j4zOpfAWIkHWR+uvAeHeNPBRYUoqScZy4RtlzLMngHhSS+7ndUZHScF/nbj2PjGep/Fp iqaQ== X-Gm-Message-State: APjAAAXudsQrhQFViWK+aGTEGYRLZ7JvTI7Tft2m3870+XH0wwRDfML/ tnaI8jEUVBnxN1ttYsJyiKSW7w== X-Received: by 2002:a7b:c4c6:: with SMTP id g6mr23832612wmk.52.1566837914285; Mon, 26 Aug 2019 09:45:14 -0700 (PDT) Received: from localhost.localdomain (124.red-83-36-179.dynamicip.rima-tde.net. [83.36.179.124]) by smtp.gmail.com with ESMTPSA id l62sm77872wml.13.2019.08.26.09.45.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Aug 2019 09:45:12 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, agross@kernel.org, mturquette@baylibre.com Cc: bjorn.andersson@linaro.org, niklas.cassel@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Date: Mon, 26 Aug 2019 18:45:06 +0200 Message-Id: <20190826164510.6425-1-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.22.0 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 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 e12c04c09a6a..567140709c7d 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.22.0