From patchwork Mon Sep 30 11:18:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varada Pavani X-Patchwork-Id: 13816083 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (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 615D91917CD for ; Mon, 30 Sep 2024 12:19:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727698747; cv=none; b=M6ZUuswuQG8R14MgKFSJwbmDBbBET80Cwg12EpAj5D+6yBQmn43jUn1pqfl0nOI4bjsnKnGN4iu0yQSuC9ltmgmtofUkE7a6tzz22KIyxLCKqBTwrjdOtNxqcQNI24x8qqpfPo9phzK8tLwOg4jsTk6W1OfasqqFKEgnzbx36i4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727698747; c=relaxed/simple; bh=vBy7OFug84v0/K0Vd+HlF324zw+uJF9x+kHFONfOVqg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:Content-Type: References; b=jQ5PCHevkPn1O2aUsAz6s4tfSj4xvYztbixB1PBhu90iSO/m8AmpT4ZIIQcSzYEQDLqe8AF9/vl9WXUdUcxegQg8aBnubfk7+fgBH7jZfrtvjHEjOjnAf3dRxaMva9UW6edrTk/LcoGsKIsCFcnkedHpXuB6tEy6PL1KU1rFwR0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=gNwuM+EX; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="gNwuM+EX" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240930121858epoutp02d75a6c99f4459c49da19244a7db986f8~6BNlPUiv10257902579epoutp02I for ; Mon, 30 Sep 2024 12:18:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240930121858epoutp02d75a6c99f4459c49da19244a7db986f8~6BNlPUiv10257902579epoutp02I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1727698738; bh=sfSiZshNltBPyKbM7f8L8Q015QrPMyWEOljZ3sJgHEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gNwuM+EXvEKRw5E4bJrNQIYsztG+15o5EW5y3q+nBkcQGJNnLF5S3B4TPsJGw4fNO yfryurxmgs72FwPgugXUI10kJf/PGqq60zvmUdNLDeWmH99V0/C02Jcd5E/D3U6dt7 Tm67ty/70hYKxlmXElaWG7WyjveTo8A+8CO3D/cA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20240930121857epcas5p49237819634a1a4c2495b41604a0a0916~6BNkuReZ30681106811epcas5p49; Mon, 30 Sep 2024 12:18:57 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.181]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4XHKqh4z6pz4x9Q2; Mon, 30 Sep 2024 12:18:56 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 63.7D.18935.0379AF66; Mon, 30 Sep 2024 21:18:56 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20240930112135epcas5p2175ec81bb609da5b166d47341ece2f67~6AbeqYbyM2495924959epcas5p2O; Mon, 30 Sep 2024 11:21:35 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240930112135epsmtrp1743da13a16b4401159e1c7a8d98ca372~6AbepoOGR2631226312epsmtrp1W; Mon, 30 Sep 2024 11:21:35 +0000 (GMT) X-AuditID: b6c32a50-cb1f8700000049f7-2c-66fa973031bb Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id F8.57.08227.FB98AF66; Mon, 30 Sep 2024 20:21:35 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240930112133epsmtip2aabb8e0f2086f34c47bdb457a284a90e~6AbcoJIpt3034630346epsmtip2V; Mon, 30 Sep 2024 11:21:33 +0000 (GMT) From: Varada Pavani To: krzk@kernel.org, s.nawrocki@samsung.com, cw00.choi@samsung.com, alim.akhtar@samsung.com, mturquette@baylibre.com, sboyd@kernel.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: aswani.reddy@samsung.com, pankaj.dubey@samsung.com, gost.dev@samsung.com, Varada Pavani , stable@vger.kernel.org Subject: [PATCH 2/2] clk: samsung: Fixes PLL locktime for PLL142XX used on FSD platfom Date: Mon, 30 Sep 2024 16:48:59 +0530 Message-Id: <20240930111859.22264-3-v.pavani@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240930111859.22264-1-v.pavani@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkk+LIzCtJLcpLzFFi42LZdlhTQ9dg+q80g+V9ahYP5m1jszi0eSu7 xfUvz1ktbh7YyWRx/vw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Ipzkg01GIuKk4EAKHIgknQAgAA X-CMS-MailID: 20240930112135epcas5p2175ec81bb609da5b166d47341ece2f67 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240930112135epcas5p2175ec81bb609da5b166d47341ece2f67 References: <20240930111859.22264-1-v.pavani@samsung.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Add PLL locktime for PLL142XX controller. Fixes: 4f346005aaed ("clk: samsung: fsd: Add initial clock support") Cc: stable@vger.kernel.org Signed-off-by: Varada Pavani --- drivers/clk/samsung/clk-pll.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c index 4be879ab917e..d4c5ae20de4f 100644 --- a/drivers/clk/samsung/clk-pll.c +++ b/drivers/clk/samsung/clk-pll.c @@ -206,6 +206,7 @@ static const struct clk_ops samsung_pll3000_clk_ops = { */ /* Maximum lock time can be 270 * PDIV cycles */ #define PLL35XX_LOCK_FACTOR (270) +#define PLL142XX_LOCK_FACTOR (150) #define PLL35XX_MDIV_MASK (0x3FF) #define PLL35XX_PDIV_MASK (0x3F) @@ -272,7 +273,11 @@ static int samsung_pll35xx_set_rate(struct clk_hw *hw, unsigned long drate, } /* Set PLL lock time. */ - writel_relaxed(rate->pdiv * PLL35XX_LOCK_FACTOR, + if (pll->type == pll_142xx) + writel_relaxed(rate->pdiv * PLL142XX_LOCK_FACTOR, + pll->lock_reg); + else + writel_relaxed(rate->pdiv * PLL35XX_LOCK_FACTOR, pll->lock_reg); /* Change PLL PMS values */