From patchwork Wed Aug 29 15:50:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10580595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33087139B for ; Wed, 29 Aug 2018 15:51:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 246FC2B6A7 for ; Wed, 29 Aug 2018 15:51:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 227442B658; Wed, 29 Aug 2018 15:51:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A60F82B657 for ; Wed, 29 Aug 2018 15:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729217AbeH2Tsi (ORCPT ); Wed, 29 Aug 2018 15:48:38 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:35929 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729202AbeH2Tsh (ORCPT ); Wed, 29 Aug 2018 15:48:37 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155103euoutp02f686bc34bf34a64d92be67586afa6966~PZb2cluW42538325383euoutp02G; Wed, 29 Aug 2018 15:51:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180829155103euoutp02f686bc34bf34a64d92be67586afa6966~PZb2cluW42538325383euoutp02G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557863; bh=Q9uhlE382LBHHSiqnvSM3mlLkFzoBC4lKxDmhF6BdmM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=sbyd0vcJjFKXDG0de4Te8oyeGvzTGNCQAdeQMZJBWDu83QrRhZRBHCnMo8D9ja+Qg IQPwWuiuokDp6IHBH2JpdVlh976LnF3MFGRmHEe2x+WA1WpDTzLsjul+XHwb1QRvJB kPjPSCQ4CCZwPcJrDosmn29ScPyXE17o4OiEJ6xQ= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155102eucas1p1472a299b057bac3008af1bb98efd69e1~PZb1sAIKp1725217252eucas1p1C; Wed, 29 Aug 2018 15:51:02 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id FD.FA.04806.5E0C68B5; Wed, 29 Aug 2018 16:51:01 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155101eucas1p2f6ecb6ad0eb37fa725ac950cad73c423~PZb0t62ZX1894418944eucas1p2I; Wed, 29 Aug 2018 15:51:01 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-3a-5b86c0e57a86 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id E1.37.04284.5E0C68B5; Wed, 29 Aug 2018 16:51:01 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PE800FCUC0UPL60@eusync4.samsung.com>; Wed, 29 Aug 2018 16:51:01 +0100 (BST) 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 Subject: [PATCH 06/10] clk: samsung: s5pv210: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:42 +0200 Message-id: <20180829155046.29359-7-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180829155046.29359-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAIsWRmVeSWpSXmKPExsWy7djP87pPD7RFG9zqNrLYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CV0XHxE1PBMqGKnps9TA2MK/m7GDk5JARMJN63z2YBsYUEVjBKvNki18XIBWR/ZpR4 dX0PM0zRjF37GCESyxglHn1/yA7hNDBJbH81AaydTcBQouttFxuILSLgIPH502uwDmaBx4wS W09+BRslLBAnse7oNCYQm0VAVeLIkUtgcV4BW4mH3++zQ6yTl1i94QBYnFPATuLF8V5WiPhH Vonzb6DudpGYP2kbI4QtLPHq+BaoXhmJzo6DTCCLJQSaGSXaZ8xih3B6gK6Ys4MNospa4vDx i2BTmQX4JCZtmw60jQMozivR0SYEUeIh0XahixXizYmMEt2nXzNOYJRcwMiwilE8tbQ4Nz21 2DgvtVyvODG3uDQvXS85P3cTIzDeTv87/nUH474/SYcYBTgYlXh4L8xoixZiTSwrrsw9xCjB wawkwrt3IVCINyWxsiq1KD++qDQntfgQozQHi5I4L59WWrSQQHpiSWp2ampBahFMlomDU6qB sXSNyu65+0KWsc1wX+H89PxWfe/T+zxKPoV7Gz2YN0VoH5td0Bx78w/ex7xf3PAMt0liz/57 0fTmXVY5yXvV9izhi+V/KuSxT1smMO/TwbSNIb/dQ6/mm4tx6FTaRXq9ilvNkyv+uI5TNlLR skKX8fTj0mW3T/o/zXQ+8dV+K7fO/CAps/MvlViKMxINtZiLihMB83vAnbMCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xa7pPD7RFG/Q2MFtsnLGe1eL6l+es FufPb2C3+Nhzj9Vixvl9TBZrj9xlt2h/+pLZgd1j06pONo++LasYPT5vkgtgjuKySUnNySxL LdK3S+DK6Lj4ialgmVBFz80epgbGlfxdjJwcEgImEjN27WPsYuTiEBJYwigxZ0ITlNPEJPFw yQN2kCo2AUOJrrddbCC2iICDxOdPr8GKmAUeM0qcW7yBFSQhLBAnse76abAGFgFViSNHLjGD 2LwCthIPv99nh1gnL7F6wwGwOKeAncSL471gvUJANQvvfGecwMizgJFhFaNIamlxbnpusaFe cWJucWleul5yfu4mRmCobDv2c/MOxksbgw8xCnAwKvHwXpjRFi3EmlhWXJl7iFGCg1lJhHfv QqAQb0piZVVqUX58UWlOavEhRmkOFiVx3vMGlVFCAumJJanZqakFqUUwWSYOTqkGRpkyV8bo ki3WnP6LvOdt7f3EHleq9+N9cFpZ2FtWS85lS45MO8X6X8zkFsfz4NXpoUsd/ndzfTh69BbX sQIn9eBl0u+lhc1PP/52+mnnAt/m38vniyjMtJNtto++XVfzSeYE+9ElSbN9s9d0bruzVn39 2423+i6k9CvJvSgq/1nzwtT9UHzCeyWW4oxEQy3mouJEAC34BIARAgAA X-CMS-MailID: 20180829155101eucas1p2f6ecb6ad0eb37fa725ac950cad73c423 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155101eucas1p2f6ecb6ad0eb37fa725ac950cad73c423 References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski --- drivers/clk/samsung/clk-s5pv210.c | 41 ++----------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/drivers/clk/samsung/clk-s5pv210.c b/drivers/clk/samsung/clk-s5pv210.c index fd2725710a6f..41d2337fe030 100644 --- a/drivers/clk/samsung/clk-s5pv210.c +++ b/drivers/clk/samsung/clk-s5pv210.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "clk.h" #include "clk-pll.h" @@ -83,9 +82,6 @@ enum { static void __iomem *reg_base; -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *s5pv210_clk_dump; - /* List of registers that need to be preserved across suspend/resume. */ static unsigned long s5pv210_clk_regs[] __initdata = { CLK_SRC0, @@ -132,40 +128,6 @@ static unsigned long s5pv210_clk_regs[] __initdata = { CLK_OUT, }; -static int s5pv210_clk_suspend(void) -{ - samsung_clk_save(reg_base, s5pv210_clk_dump, - ARRAY_SIZE(s5pv210_clk_regs)); - return 0; -} - -static void s5pv210_clk_resume(void) -{ - samsung_clk_restore(reg_base, s5pv210_clk_dump, - ARRAY_SIZE(s5pv210_clk_regs)); -} - -static struct syscore_ops s5pv210_clk_syscore_ops = { - .suspend = s5pv210_clk_suspend, - .resume = s5pv210_clk_resume, -}; - -static void s5pv210_clk_sleep_init(void) -{ - s5pv210_clk_dump = - samsung_clk_alloc_reg_dump(s5pv210_clk_regs, - ARRAY_SIZE(s5pv210_clk_regs)); - if (!s5pv210_clk_dump) { - pr_warn("%s: Failed to allocate sleep save data\n", __func__); - return; - } - - register_syscore_ops(&s5pv210_clk_syscore_ops); -} -#else -static inline void s5pv210_clk_sleep_init(void) { } -#endif - /* Mux parent lists. */ static const char *const fin_pll_p[] __initconst = { "xxti", @@ -822,7 +784,8 @@ static void __init __s5pv210_clk_init(struct device_node *np, samsung_clk_register_alias(ctx, s5pv210_aliases, ARRAY_SIZE(s5pv210_aliases)); - s5pv210_clk_sleep_init(); + samsung_clk_sleep_init(reg_base, s5pv210_clk_regs, + ARRAY_SIZE(s5pv210_clk_regs)); samsung_clk_of_add_provider(np, ctx);