Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1324294lqt; Sat, 20 Apr 2024 09:48:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvI2I5DQcSZyW7TPDa+uIff5yktrsZd+6wSqxDWWl+R0QJJB1JdXL6uXGcKF5yKlBuTTez/yuZXsoJVWE7pB1KH7Vudwl5KTJTMY0/nQ== X-Google-Smtp-Source: AGHT+IEU5Y58Q3OmGfWE9TrD1dOfpQSD/uHDCH+Fjib5atnDV2eGsaRR6XuGt6gbA7oWpd6A/aQl X-Received: by 2002:a05:6830:4781:b0:6eb:be38:3848 with SMTP id df1-20020a056830478100b006ebbe383848mr6309044otb.29.1713631734870; Sat, 20 Apr 2024 09:48:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713631734; cv=pass; d=google.com; s=arc-20160816; b=B0Pyx0yjf84hymXwU+yXsQbUaVCnXDHjbDzk4RAfgS9uf+gCyBb25Xb988Ua+FCtWt wp4h/zu33XdNO6O6ERd4nlNfoe4e1LC7PKgeocX5jUzRKNIv5Qeci8bHQdrKTxVtY8g5 UzP76y0JO9Z7k/fsQ2Mn0hFc569Tg3zKnbXgfrFxaRibFEoSvkF7kkJb27fe3vrkxgmZ miixnL0qP/0Eowi6KNj3jlf6hJ+KJG51LXXgD63Dj3Q7aJ/lLCyKBKMEsUpMOcwmZ6Jv 54pKWypV+eCxOZNIZQGc1WJbMjCSbLPm3DKfaUE5x4w06nuiu8cwSFZ50Z9Ak9MdLJoq ugGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/BxdyweFtkhbviDqDPfkUiu8s8XrSW8GsU85TWCDrsw=; fh=cjDpnZUisFzVK8dj6isC8jZxZJE+0yOPhG3aF2MrTAo=; b=yDw65k+gRb/tSYwGncIG2B0E9FmZ6uBSSqBQluG7O3udfV/0c1L5XJI9b1BThDGOtk fhCOlss1NT5wvGQ8/yNyKDotPxYL2G1GyGi42TA0LNhhpg8nxP+eMcnxXG0hAMtcZd1K erPt6iXWhY7B9XwLKLSPNsgIeDsJs/poGOlzjxqduby/joTrE1AdBAXJYJ4sKVWCWUMc Rj6Z9fP+/qY555sT0RPc8AABiH9wlAe/ECddAg40sUG9vPTQnIZox8c4IBCb4cv9uJuo dHYji6Pf52g0PZ634Di7XWikFpGor4tRnSpbjF9f268BfkWE75QG0Y05ruo/ikR8t7h7 3eig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iHus5nNJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-152329-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i19-20020a63e913000000b005e84b855f9fsi5051057pgh.728.2024.04.20.09.48.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 09:48:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152329-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iHus5nNJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-152329-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0A3B12817CC for ; Sat, 20 Apr 2024 16:48:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D33F29CF3; Sat, 20 Apr 2024 16:48:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iHus5nNJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7A04DF5C; Sat, 20 Apr 2024 16:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713631727; cv=none; b=On63VgMLIb0/LlSMwB80dezAQf6j+dIUFTUevATqfR1WyNjeNl0FjmKUub8rLQYl3UVpItF/sXCCWV00N2BgtREjWh+PPr7UnEY4woj6csa9bwmsFmGku3bc6azySV9UBsS1oWxiFmnxApXVoMdXori36pd/OKBw8ZFC1E4f5zc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713631727; c=relaxed/simple; bh=adGRPe4RnRaos7wZCZDN9oz8Xef/g/CeoQIkxG6QljE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g8+oPuJuz84x1m0YGFY4z5wrG4hherMgK+b21KYcj1VtxVMv+Fuzzd9rEKA+NyxRfYXq8X5cnumP71zJPbqBgsE5ZXOOrVxCwSmIR+UaAIX5A/81QrJt6vC8n83tEsD75spOrc/IUTk5GvdYQ8huOz2CBxATlv7/CLyac0hhIzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iHus5nNJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E9FCC072AA; Sat, 20 Apr 2024 16:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713631727; bh=adGRPe4RnRaos7wZCZDN9oz8Xef/g/CeoQIkxG6QljE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iHus5nNJAIV/On5Hdc2TnfC11WYHDpVSbIAtZCzq0ikA1WUnnY1WGIYMpFG5iUDF6 qiIRXAqVAyfwV7sbJplufNF40p4Vp4Fg4OFZmOuG+3IDuwSnjWylzLp55slZkTFMah M8YPSw3AqLGGBg7igIogiv4SF5fEEYB/q3YAGtvGKe9oB4/HmdBMQTih8EKaJfUZCt 0G/B5einO6/zHCLQvNRMy2RNLPi//hifdfAYL4oLATh6iV0OtrigxvbWkA3YwCRYzg PmxFg7exUGHFEbt/IuXPbjgIXjTHK3l1CoNJb3FzZHbkEkzc8KZRNcKYFZrSCMNSME 584sEsX9Cfnvg== Date: Sat, 20 Apr 2024 11:48:44 -0500 From: Bjorn Andersson To: Abel Vesa Cc: Michael Turquette , Stephen Boyd , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: qcom: clk-alpha-pll: Skip reconfiguring the running Lucid Evo Message-ID: References: <20240418-clk-qcom-lucid-evo-skip-configuring-enabled-v1-1-caede5f1c7a3@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240418-clk-qcom-lucid-evo-skip-configuring-enabled-v1-1-caede5f1c7a3@linaro.org> On Thu, Apr 18, 2024 at 04:41:32PM +0300, Abel Vesa wrote: > The PLL0 is configured by the bootlader and is the parent of the > mdp_clk_src. The Trion implementation of the configure function is > already skipping this step if the PLL is enabled, so lets extend the > same behavior to Lucid Evo variant. > :set spell > Signed-off-by: Abel Vesa Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/clk/qcom/clk-alpha-pll.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c > index 8a412ef47e16..4c5aeccff0ef 100644 > --- a/drivers/clk/qcom/clk-alpha-pll.c > +++ b/drivers/clk/qcom/clk-alpha-pll.c > @@ -2114,6 +2114,15 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma > { > u32 lval = config->l; > > + /* > + * If the bootloader left the PLL enabled it's likely that there are > + * RCGs that will lock up if we disable the PLL below. > + */ > + if (trion_pll_is_enabled(pll, regmap)) { > + pr_debug("Lucid Evo PLL is already enabled, skipping configuration\n"); > + return; > + } > + > lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT; > clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval); > clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); > > --- > base-commit: 4eab358930711bbeb85bf5ee267d0d42d3394c2c > change-id: 20240418-clk-qcom-lucid-evo-skip-configuring-enabled-711b7e7835b0 > > Best regards, > -- > Abel Vesa >