From patchwork Thu Sep 26 14:45:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varada Pavani X-Patchwork-Id: 13813476 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CE55CDE016 for ; Thu, 26 Sep 2024 15:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Reply-To:MIME-Version: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sfSiZshNltBPyKbM7f8L8Q015QrPMyWEOljZ3sJgHEM=; b=BEmHuxH3ISrZG5cxSqOdaZ49AF YlvXFPehTXy/bPn2goCTA+OAi0K2rMzNg7dWBsYYvJB3nevVAw3J5aFiCo1N88c1SmOQOdk6LbrLA laP4ncIYuZ0ZJJzghyArSVrqFNcRhhNgnlb4oG5Ne9+CAPD3QXmkE0bo/4SrTVgqggFLwkeUJ+TST RAUJPQPuLlbNqU+Kn/rG8Qa4Y9jp/XdVzNQnJQo+992cC34aSfv389jWSMZnEVo3rLYGUWGIUy7iC ThK65aM1+28XtjIzdfEqduF/DwqLXOEQ9dSsZvbSXGIFQ4KmyF53ubtrOgXPaCmGrHdSGyztK44u6 oS6aWwiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stqZb-00000008l05-3H8o; Thu, 26 Sep 2024 15:38:31 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stqV9-00000008kLS-2YU3 for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 15:33:57 +0000 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20240926153353epoutp034f65fc7bd4ffbcbd5bfc5f75c9452c5d~41SoDvupj1730117301epoutp03K for ; Thu, 26 Sep 2024 15:33:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20240926153353epoutp034f65fc7bd4ffbcbd5bfc5f75c9452c5d~41SoDvupj1730117301epoutp03K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1727364833; bh=sfSiZshNltBPyKbM7f8L8Q015QrPMyWEOljZ3sJgHEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G0gY/3KF8nTo8NdaGCkvM8DI5uwIH8CSK9gi2PNEeEkrDNIe4TKta9kM2dJ4B/0vD pdcbB4qjOJDba51gitUi3Vpk5sIHVam94uz/DMlItZe4ocNkA2OmxV7rujwMJt6bvr blPtutntFlwKyzkSHfvbx9wVoHFLKieSjgM2ak8M= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20240926153353epcas5p4240c7cc9f029c2ea1399802f17fbb5d2~41SnovrrP1931019310epcas5p4_; Thu, 26 Sep 2024 15:33:53 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.176]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4XDyLR6Mqyz4x9Pp; Thu, 26 Sep 2024 15:33:51 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 8A.7E.19863.FDE75F66; Fri, 27 Sep 2024 00:33:51 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20240926144743epcas5p2047d01217bf90d6d52ec97c9b3094c82~40qUQ3poA0768307683epcas5p2s; Thu, 26 Sep 2024 14:47:43 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240926144743epsmtrp18cdee3eada09707edfebfe34e564a663~40qUPXza90487704877epsmtrp1V; Thu, 26 Sep 2024 14:47:43 +0000 (GMT) X-AuditID: b6c32a50-c73ff70000004d97-7c-66f57edfe441 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 16.EF.19367.F0475F66; Thu, 26 Sep 2024 23:47:43 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240926144741epsmtip1a45675997190fef8c60891441d978414~40qSJO4m81883918839epsmtip1x; Thu, 26 Sep 2024 14:47:41 +0000 (GMT) From: Varada Pavani To: krzk@kernel.org, aswani.reddy@samsung.com, pankaj.dubey@samsung.com, 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: 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: Thu, 26 Sep 2024 20:15:13 +0530 Message-Id: <20240926144513.71349-3-v.pavani@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240926144513.71349-1-v.pavani@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphk+LIzCtJLcpLzFF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 ddOHc/vemy7b179++163hqv/L6Ywvu2Yme27zbrC7+h10cPv9dX2v5V729657+RNubm6SizF GYmGWsxFxYkAfL4ykswCAAA= X-CMS-MailID: 20240926144743epcas5p2047d01217bf90d6d52ec97c9b3094c82 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240926144743epcas5p2047d01217bf90d6d52ec97c9b3094c82 References: <20240926144513.71349-1-v.pavani@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_083356_007466_143CEB99 X-CRM114-Status: GOOD ( 15.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 */