From patchwork Fri Oct 25 09:02:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 177714 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp3309563ocf; Fri, 25 Oct 2019 02:02:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz1qZhQagXvkDLyFgSphHxI4q3v4EytQ+UH6FhvIqI36lEzsc60mxGQbetXYykA2dqtMWD X-Received: by 2002:a50:b2c4:: with SMTP id p62mr2642409edd.128.1571994135678; Fri, 25 Oct 2019 02:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571994135; cv=none; d=google.com; s=arc-20160816; b=yFL9tMwEF01on3gA2iFQAP1bbH9+XnKLyMDhP6hC2wlpnVoYdAg64M4qfOZ0UGSx2Z 3Mr0gh4c1FTj6ORJ9Fmqq7X1JpZfqV83BVxE/yaHIwAumdjzVUeLACMw5PSi4TKxicdX loZk2SClz5q38YPe6JvW5kaDISZJEhzZaZHafhfjArW/ioKb7XxiL2lZZl9S1SK0xY2y fpGGI/a0T6Uq1FTrOIgIMlNMPwbS6aik0SJaqtDyPuGAVaO92j/v1DqT4UL0HmOjwQwP XxKRcnpoIv9RYYuI0rkdj4T/ao+9Sd5Ref3mHi+g12mMAjK8EPGVD8o7ALGXcNFiquXC eOfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=FYT2QZtALNZsHIRM0dwYVe/iO/f0eMf0dbLJRE5epa8=; b=qbviCrnzH+0SresGSPFNjM0NRySUEtpSd6YylWSFYDFYu/3r3vjVUmdIjNbcLkxMWB xqqFhlQvAMpuGRJB2k5uvczmUsLzfmz+z1rMT5bIpxKzjv/vpBGFFJz5AqVXXitL1Lu3 PBPYxQ2KzDrXxAw/i2AI6vl2JywsvJzHCYToe5tzrhKttDyXwuAz+WAYNVRNs340E0fS X00bTLupDBoJ4WZWv4ypdzE2JVE2uBS3/rKLwZTzcLTODLgO5OekpDxqWWRB1lSqdzaE EscXA3twWdqkaxFIeukanKp90A7yV3ISIZmbU3Z4N+D7vpUVSCsCMDC7CdKqz+eq+RNH C4ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=gPk3Tl1j; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w32si806824edc.443.2019.10.25.02.02.15; Fri, 25 Oct 2019 02:02:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=gPk3Tl1j; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408647AbfJYJCP (ORCPT + 3 others); Fri, 25 Oct 2019 05:02:15 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:36698 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408064AbfJYJCO (ORCPT ); Fri, 25 Oct 2019 05:02:14 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20191025090212euoutp012f70e2fbf7518c98e2688ecc8552e352~Q2FW-dCLr0419704197euoutp01B for ; Fri, 25 Oct 2019 09:02:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20191025090212euoutp012f70e2fbf7518c98e2688ecc8552e352~Q2FW-dCLr0419704197euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1571994132; bh=FYT2QZtALNZsHIRM0dwYVe/iO/f0eMf0dbLJRE5epa8=; h=From:To:Cc:Subject:Date:References:From; b=gPk3Tl1jvPxfO6OWNTbow3q2SUFsYDv/xD7JBSQBdSbEjKcmBh40O3qWnW7wWzSR8 T+EnPUZsqBjSUegyPxC20crjEf+1sNtsq13B72Uh/l2ogWeFV93sXodRBoKDa3dJwu U4rKixnTtUY2DPfgzM8wHKAYNo7ureU0lZBi8w+U= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20191025090212eucas1p1a8b8295706f9eb158685ddf0bc27bdac~Q2FWreziq0790207902eucas1p1i; Fri, 25 Oct 2019 09:02:12 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 87.95.04469.41AB2BD5; Fri, 25 Oct 2019 10:02:12 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20191025090212eucas1p10ef782af07e01470b185e4fb190d3ce6~Q2FWasBZZ1933219332eucas1p1H; Fri, 25 Oct 2019 09:02:12 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20191025090212eusmtrp2cdfe7cf3fdbd973d89658b0f08c2f31d~Q2FWaBXM_0078000780eusmtrp2G; Fri, 25 Oct 2019 09:02:12 +0000 (GMT) X-AuditID: cbfec7f2-569ff70000001175-36-5db2ba14b0a4 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C1.76.04117.41AB2BD5; Fri, 25 Oct 2019 10:02:12 +0100 (BST) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20191025090211eusmtip1b623e75260a2589aad1c657a84124369~Q2FWDD8Si0234802348eusmtip1L; Fri, 25 Oct 2019 09:02:11 +0000 (GMT) From: Marek Szyprowski To: linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Marian Mihailescu Subject: [PATCH] clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume Date: Fri, 25 Oct 2019 11:02:01 +0200 Message-Id: <20191025090201.30246-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsWy7djP87oiuzbFGlz5L26xccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3WL9tJ+sFu1PXzI7cHjsnHWX3WPTqk42j74tqxg9Pm+S C2CJ4rJJSc3JLEst0rdL4MpoXP2FpeAmZ8WPe0+YGhgncXQxcnJICJhILLy2jb2LkYtDSGAF o8Sldb2sIAkhgS+MEm/XhUEkPjNKzDvYzAbT8fbUblaIxHJGiTVntrBAOEAd3d/bwKrYBAwl ut52gdkiAg4Snz+9ZgQpYhboZ5Lo67vKDJIQFoiVmHv9Ntg+FgFViRtn3wM1cHDwCthK3NiS ALFNXmL1hgPMEPZ1NokXdyogbBeJd1+3sEPYwhKvjsPYMhL/d85nAtklIdDMKPHw3Fp2CKeH UeJy0wxGiCpricPHL7KCLGMW0JRYv0sfIuwose35DRaQsIQAn8SNt4IgYWYgc9K26cwQYV6J jjYhiGo1iVnH18GtPXjhEtSZHhKdN9pYIKEYKzH94EbGCYxys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c8/cOkc7F43s3vUoblBUm1VVMjHmc+E+rdHPJw DV+kYMRx0fB16zQjzixsMUyQ81wX28nNVimpdv74i+Mt+teeRjYosRRnJBpqMRcVJwIAiuiP DlgCAAA= X-CMS-MailID: 20191025090212eucas1p10ef782af07e01470b185e4fb190d3ce6 X-Msg-Generator: CA X-RootMTR: 20191025090212eucas1p10ef782af07e01470b185e4fb190d3ce6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20191025090212eucas1p10ef782af07e01470b185e4fb190d3ce6 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Properly save and restore all top PLL related configuration registers during suspend/resume cycle. So far driver only handled EPLL and RPLL clocks, all other were reset to default values after suspend/resume cycle. This caused for example lower G3D (MALI Panfrost) performance after system resume, even if performance governor has been selected. Reported-by: Reported-by: Marian Mihailescu Fixes: 773424326b51 ("clk: samsung: exynos5420: add more registers to restore list") Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-exynos5420.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index d2e06ce58fb5..0aca98492029 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -165,12 +165,18 @@ static const unsigned long exynos5x_clk_regs[] __initconst = { GATE_BUS_CPU, GATE_SCLK_CPU, CLKOUT_CMU_CPU, + CPLL_CON0, + DPLL_CON0, EPLL_CON0, EPLL_CON1, EPLL_CON2, RPLL_CON0, RPLL_CON1, RPLL_CON2, + IPLL_CON0, + SPLL_CON0, + VPLL_CON0, + MPLL_CON0, SRC_TOP0, SRC_TOP1, SRC_TOP2,