Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26926a35 authored by Taniya Das's avatar Taniya Das
Browse files

clk: qcom: clk-alpha-pll: Update support for FSM legacy mode



The Lucid PLL could require the FSM legacy mode bit to be set for the
PLL to be operational, thus set the same when the flag is set.

While at it also update the Zonda disable function to remove the
additional offset usage.

Change-Id: I3ed4b6c38a1769c5021f17e0115215eab615ab62
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 28f55296
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2016, 2018-2020, The Linux Foundation.
 * Copyright (c) 2015-2016, 2018-2021, The Linux Foundation.
 * All rights reserved.
 */

@@ -1532,10 +1532,10 @@ static int clk_zonda_pll_enable(struct clk_hw *hw)
static void clk_zonda_pll_disable(struct clk_hw *hw)
{
	struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
	u32 val, mask, off = pll->offset;
	u32 val, mask;
	int ret;

	ret = regmap_read(pll->clkr.regmap, off + PLL_MODE(pll), &val);
	ret = regmap_read(pll->clkr.regmap, PLL_MODE(pll), &val);
	if (ret)
		return;

@@ -2677,6 +2677,9 @@ void clk_lucid_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,

	clk_alpha_pll_custom_configure(pll, regmap, config);

	if (pll->flags & SUPPORTS_FSM_LEGACY_MODE)
		regmap_update_bits(regmap, PLL_MODE(pll), PLL_FSM_LEGACY_MODE,
						PLL_FSM_LEGACY_MODE);
	regmap_update_bits(regmap, PLL_MODE(pll),
				 PLL_UPDATE_BYPASS,
				 PLL_UPDATE_BYPASS);