From patchwork Wed Aug 29 15:50:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145447 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831234ljw; Wed, 29 Aug 2018 08:51:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY/66Rx3SLnvHkRURygRrgxPEvJK2APODnAQkanq93hgRixygGrurLJSeMGEgnd8fmdZqBv X-Received: by 2002:a63:4a09:: with SMTP id x9-v6mr6070188pga.34.1535557863726; Wed, 29 Aug 2018 08:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557863; cv=none; d=google.com; s=arc-20160816; b=ngIAc+xCCfGBuB7tY8Id8AJF8BUUTG5elxqvFEMreTtNSWBiFzd0r80xKetz6H3HGX VnZNE/mUzcikW6APkhmiXF56lloxQLRn64kYEyH1sFG1KnJD0gCEcDbFQV58GSk12GYd V9l9ydxler+E5Nm4thUhCEpj0O+HUZ9OJ6V63GufkehnZLkLvANrCuGmKJ0Ltoqlr34R Rv/IK+0/LZTG7cxJdtLdLh4shTG0vqzPeEWlT+qpM+w/0wBnzhJZyzpt5/zXW295MV7t v+vkAvVqpep7hIw7GoVykKBz7sgNwzewCVQ+xO+Y18NH3mKyGczVHf5DEsSbm1WPogCU QDVg== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=ML3DDn/6E1rXBqmKFRR0Ra895+pK63YB+7EMDu/KgEQ=; b=C/DTy+KhRk85yglZX2T54e0DfohvbQX/dsGY/7F1AjscC7NwE7V2h48FERogJMdTJC f9NvlMXFRu+r63VTJcvG2dCkX05ORaGepweDwFBH362gXn2Eyoo1lZf4N1vAq8ibIyO/ JaM5F2nGMd0foYAYKMCapmSKyOQmAi9APM4IUNNVVvkPtvCyLDQjso17/589HdISqYFD F7qKlEdeprt68zhb8iar1tlOETkOBKNQkvX8Th1sAF8yUrStdscbJJfWO62NrXs1rxe1 cLP6zucSYzjPMDmbeCMqVYitpZOyFptww+jDjZFZWL3A1MhsQFIEgY+uKvK9g+nlLrTg xIMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=cSqdG8th; 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 32-v6si4160278pgk.59.2018.08.29.08.51.03; Wed, 29 Aug 2018 08:51:03 -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=cSqdG8th; 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 S1729208AbeH2Tsf (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:35 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55840 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729200AbeH2Tsf (ORCPT ); Wed, 29 Aug 2018 15:48:35 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155100euoutp0109c879619b7fe997de027f5edb832f5f~PZb0SYO2N0242602426euoutp01Y; Wed, 29 Aug 2018 15:51:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180829155100euoutp0109c879619b7fe997de027f5edb832f5f~PZb0SYO2N0242602426euoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557860; bh=ML3DDn/6E1rXBqmKFRR0Ra895+pK63YB+7EMDu/KgEQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=cSqdG8thxTqskHM7LTZ7Pb/GYd6whLOyy6VTNUrcpbozrbVeDpZMpH0nkn3jeaCQa 9s1Z3UGJuQGHMCDoResJMfdz08V2DBZHs83CgpRqYSbAPWx1L2bhWhUkVU9zAb3n7I /LUwi2fwRwoMdok9D5To8fYdW2w3D6NLuhryW60g= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155100eucas1p1fc05ee4a7ff6a0c5b46b426d45a7ed51~PZbz0yI0d0107501075eucas1p1x; Wed, 29 Aug 2018 15:51:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id EC.FA.04806.3E0C68B5; Wed, 29 Aug 2018 16:50:59 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155059eucas1p28a20924521edaa4c9bd3d9683d0f2d0d~PZbzArxTu2602326023eucas1p2Z; Wed, 29 Aug 2018 15:50:59 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-36-5b86c0e3cb2c Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A0.37.04284.2E0C68B5; Wed, 29 Aug 2018 16:50:59 +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:50:58 +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 01/10] clk: samsung: Remove excessive include Date: Wed, 29 Aug 2018 17:50:37 +0200 Message-id: <20180829155046.29359-2-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+NgFlrIIsWRmVeSWpSXmKPExsWy7djPc7qPD7RFGzx4ZGixccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr48GLhewFVzkrfh68xd7AuJeji5GTQ0LAROL89ka2LkYuDiGBFYwSyxoeMkE4nxkl eu/dZYOpunX8MlRiGaPEjs7H7BBOA5PExbbVLCBVbAKGEl1vu8A6RAQcJD5/es0IUsQs8JhR YuvJr8wgCWEBW4lJN56C2SwCqhLHvrxmArF5geKzrx5ihVgnL7F6wwGwGk4BO4kXx3tZQQZJ CHxllTiwvY8doshF4v37TYwQtrDEq+NboOIyEp0dB5kgGpoZJdpnzGKHcHqAzpizA+oja4nD xy+CrWMW4JOYtG060DoOoDivREebEITpIXF7VSLEmxMZJW5/O8AygVFyASPDKkbx1NLi3PTU YuO81HK94sTc4tK8dL3k/NxNjMCIO/3v+NcdjPv+JB1iFOBgVOLhvTCjLVqINbGsuDL3EKME B7OSCO/ehUAh3pTEyqrUovz4otKc1OJDjNIcLErivHxaadFCAumJJanZqakFqUUwWSYOTqkG xh2p/XplbX1P/in/ckg7e57pqY4Bs0T5lg+1R7+KWmd6aiostyxu75RVqfvW+TfNeG+ScvuB 9bn2nRXJ06vtI+bPUg73aV/9dZWbp6fZnispu/84vlXdo2hXG7LUzuGS4oajF23PFD3W0Hju WG6QJDfjqGCHjIJ+1l3x494n1B0sH+jO1EtUYinOSDTUYi4qTgQAJVNHebQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xa7qPD7RFG8yfxGixccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr48GLhewFVzkrfh68xd7AuJeji5GTQ0LAROLW8ctMXYxcHEICSxglrn25wAzhNDFJ ND37zApSxSZgKNH1tosNxBYRcJD4/Ok1I0gRs8BjRolzizeAFQkL2EpMuvGUGcRmEVCVOPbl NROIzQsUn331ECvEOnmJ1RsOgNVwCthJvDjeCxYXAqpZeOc74wRGngWMDKsYRVJLi3PTc4sN 9YoTc4tL89L1kvNzNzECQ2XbsZ+bdzBe2hh8iFGAg1GJh/fCjLZoIdbEsuLK3EOMEhzMSiK8 excChXhTEiurUovy44tKc1KLDzFKc7AoifOeN6iMEhJITyxJzU5NLUgtgskycXBKNTDOtrjz PSPh2ErvgwmFz6e2+9XWBUStfsI39eKafId95q61K1ZV9vMHnpzoqHbgQvvKdfe4bjAfsPu8 4rNA9sxte9T0+KSkIkMvP43JyXTtMX3SrnW7X6m6+dnnOUwv2b/NnhWutKPoS8130WvRly22 xZupFBbV2T1/yWqXuPLzTc9XFlpxKSeUWIozEg21mIuKEwEbzhXmEQIAAA== X-CMS-MailID: 20180829155059eucas1p28a20924521edaa4c9bd3d9683d0f2d0d X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155059eucas1p28a20924521edaa4c9bd3d9683d0f2d0d References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Exynos Audio SubSystem and Exynos3250 clock drivers don't use any syscore function, so don't include linux/syscore_ops.h in their code. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-exynos-audss.c | 1 - drivers/clk/samsung/clk-exynos3250.c | 1 - 2 files changed, 2 deletions(-) -- 2.17.1 Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c index f659c5cbf1d5..8f8a0f9fc842 100644 --- a/drivers/clk/samsung/clk-exynos-audss.c +++ b/drivers/clk/samsung/clk-exynos-audss.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/clk/samsung/clk-exynos3250.c b/drivers/clk/samsung/clk-exynos3250.c index 27c9d23657b3..0e9a41a4cac8 100644 --- a/drivers/clk/samsung/clk-exynos3250.c +++ b/drivers/clk/samsung/clk-exynos3250.c @@ -12,7 +12,6 @@ #include #include #include -#include #include From patchwork Wed Aug 29 15:50:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145449 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831268ljw; Wed, 29 Aug 2018 08:51:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaTsks4/6xQ7LLkzX4jihhGx3HyC9s74tSM77NDPicNBrE5sdQ36hvQq1r4MTxdmTEhdTPn X-Received: by 2002:a17:902:8348:: with SMTP id z8-v6mr6601759pln.51.1535557865224; Wed, 29 Aug 2018 08:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557865; cv=none; d=google.com; s=arc-20160816; b=IbvgRrbr5ndpbpumVUvGLTzZorYKXEcoj4b1s9FHV1RKVHlN3P4WgT84UfjlaGvHan nNtYkDkuDW4dSRspSIviPW8Xuiul0mJu/Mm2F3boHXXjh8Io7Y3QKv9LiOMGDeB0B3uP uXoLGUSAVXHOrwxDFiqfIIaDygeZ7veBHHU11l4nDG+BVp7vAHo1U0Xhr9Z7VuA7GCWj +LnZhvaXWXOtyV49Kr/x91GP+Vnl6Lb+Dn4x7a5O2xLJY7MxiZeMOEl6bb0mehPp7eL1 4BVOG9vt6BX1ff0bTaM1ZgF3PaO1/Tz6lIhE4WHYCE586UZG2gj4KP3Bi5kQSw3pIWtW JJTw== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=ak4RGJp1vIijhetnQYtg6ixxodfuEf7895yWFHLuAiM=; b=SfGXrekHrW37VR8vP+QVHYWPPFfj/rw4HpDDqfj5GZapjXuXmHducsNLQgaaJwf23g mHkmOAofMXJ1hW3IaYtW1dCBOdrp8bsl95NwmFRHECtFgtkwe9IceqUkYL7zonVa55Ys lJWRc4f7BCElEwbPccePKo7J7fyI1wKQxenoMAYSabNrKTYZ4RoLF/Fv6B7GEBgm6VeZ W/ecRd0gt/YNbeYEay8Nzp8iUqCTGeuIB5c7rx7NAh0TI7vJk7QxDR9JmJIDXI1pf4h+ 9PX4XADd1bXo+/hmnWUmNoZ3fYt7KfiB51TLILQsz1VTaG8TRIBW4nR3VnZw8ZWDlucP LupA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=JN3qvX7t; 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 32-v6si4160278pgk.59.2018.08.29.08.51.05; Wed, 29 Aug 2018 08:51:05 -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=JN3qvX7t; 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 S1729216AbeH2Tsh (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:37 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55844 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729206AbeH2Tsg (ORCPT ); Wed, 29 Aug 2018 15:48:36 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155101euoutp01f69a95e6ce8aa883421a83d4021b1c5d~PZb0oeaUO0370903709euoutp01p; Wed, 29 Aug 2018 15:51:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180829155101euoutp01f69a95e6ce8aa883421a83d4021b1c5d~PZb0oeaUO0370903709euoutp01p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557861; bh=ak4RGJp1vIijhetnQYtg6ixxodfuEf7895yWFHLuAiM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=JN3qvX7tAPxf55UPb4DVODyQRo7sL7vTJFveeNSoV42+PiL4s68HWvaqs3I2y0YSq 847PP1st/IOGtpFtpWJLLiCixrCSmVXTS75VQ9LCp4ms7tXssgRtANHtncDzRRHSgc zqbM+i9BNsny1ofazG4EoY2GFCwLy42OGHX9oD8I= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155100eucas1p1ea5281f381827fc0859fcc5cb79ed8d9~PZb0EkBkW0665006650eucas1p1Z; Wed, 29 Aug 2018 15:51:00 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C8.DF.04441.4E0C68B5; Wed, 29 Aug 2018 16:51:00 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155059eucas1p26a0ea66a0fc96c73cdd60648b82bd23e~PZbzOm0O62215422154eucas1p2s; Wed, 29 Aug 2018 15:50:59 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-df-5b86c0e46241 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 41.37.04284.3E0C68B5; Wed, 29 Aug 2018 16:50:59 +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:50:59 +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 02/10] clk: samsung: s3c2410: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:38 +0200 Message-id: <20180829155046.29359-3-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+NgFprHIsWRmVeSWpSXmKPExsWy7djP87pPDrRFG7T+4LDYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CV0bJzEVPBLKGKP1+/MDcwzuHvYuTgkBAwkTjZydjFyMUhJLCCUWL+753sEM5nRokv Sz4DZTjBijbf+84CYgsJLGOU2DdFBaKogUni86y/YAk2AUOJrrddbCC2iICDxOdPr8HGMgs8 ZpTYevIrM0hCWCBOYt+Ma2ANLAKqEue2PmYDOYNXwFZi5ppaiGXyEqs3HAAr5xSwk3hxvJcV Iv6VVeLLd10I20Vi16UmZghbWOLV8S3sELaMRGfHQSaQvRICzYwS7TNmsUM4PUBHzNnBBlFl LXH4+EWwqcwCfBKTtk1nhoQFr0RHmxBEiYfE+QnbmCC+nAj08dEbbBMYJRcwMqxiFE8tLc5N Ty02zEst1ytOzC0uzUvXS87P3cQIjLXT/45/2sH49VLSIUYBDkYlHl6N2W3RQqyJZcWVuYcY JTiYlUR49y4ECvGmJFZWpRblxxeV5qQWH2KU5mBREufl00qLFhJITyxJzU5NLUgtgskycXBK NTBOjPiQtud2m90hx5IAT45nqeuXvIpvO9ujpG+abKcfpnLQmnXCKjk1wdrX0dOy/ut6Lwi/ 8PFd3jKxVe1z5N45NWrGPFjWkvfOdG7+VcmkiH2CXx/djfxo4DLPvpP7eeuBaqaTBVcv3Fu9 /d2H92WpPNcTVqbs/O10V5PFYaJ+z2U7I9G/OvxKLMUZiYZazEXFiQAfaPQBsQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLJMWRmVeSWpSXmKPExsVy+t/xa7qPD7RFG8xeLW2xccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEro2XnIqaCWUIVf75+YW5gnMPfxcjJISFgIrH53neWLkYuDiGBJYwSlya8YoJwmpgk nn9dyw5SxSZgKNH1tosNxBYRcJD4/Ok1I0gRs8BjRolzizewgiSEBeIk9vUfZgaxWQRUJc5t fQzUwMHBK2ArMXNNLcQ2eYnVGw6AlXAK2Em8ON4L1ioEVLLwznfGCYw8CxgZVjGKpJYW56bn FhvqFSfmFpfmpesl5+duYgQGyrZjPzfvYLy0MfgQowAHoxIP74UZbdFCrIllxZW5hxglOJiV RHj3LgQK8aYkVlalFuXHF5XmpBYfYpTmYFES5z1vUBklJJCeWJKanZpakFoEk2Xi4JRqYNQq Xvy00U9iikhA6DvOsocrzFoWH5S8x3Y75FqrutYv0Z0lj5+uLnQ6nbzphn/Rew72EwrTI1/t 6n2kd3RVS9f8nQvd/x+6p8Mh9mpvGdP5kFmuPoZLdnm1PnWV/a4qorl2frm6ITt3xhmHbr/L VwQLjy9a3uyzO09pRU1JhMmrr36WGjGLu5VYijMSDbWYi4oTAbksd0gQAgAA X-CMS-MailID: 20180829155059eucas1p26a0ea66a0fc96c73cdd60648b82bd23e X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155059eucas1p26a0ea66a0fc96c73cdd60648b82bd23e References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-s3c2410.c | 43 ++----------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) -- 2.17.1 Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-s3c2410.c b/drivers/clk/samsung/clk-s3c2410.c index a9c887475054..8cb868f06257 100644 --- a/drivers/clk/samsung/clk-s3c2410.c +++ b/drivers/clk/samsung/clk-s3c2410.c @@ -11,7 +11,6 @@ #include #include #include -#include #include @@ -40,9 +39,6 @@ enum s3c2410_plls { static void __iomem *reg_base; -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *s3c2410_save; - /* * list of controller registers to be saved and restored during a * suspend/resume cycle. @@ -57,42 +53,6 @@ static unsigned long s3c2410_clk_regs[] __initdata = { CAMDIVN, }; -static int s3c2410_clk_suspend(void) -{ - samsung_clk_save(reg_base, s3c2410_save, - ARRAY_SIZE(s3c2410_clk_regs)); - - return 0; -} - -static void s3c2410_clk_resume(void) -{ - samsung_clk_restore(reg_base, s3c2410_save, - ARRAY_SIZE(s3c2410_clk_regs)); -} - -static struct syscore_ops s3c2410_clk_syscore_ops = { - .suspend = s3c2410_clk_suspend, - .resume = s3c2410_clk_resume, -}; - -static void __init s3c2410_clk_sleep_init(void) -{ - s3c2410_save = samsung_clk_alloc_reg_dump(s3c2410_clk_regs, - ARRAY_SIZE(s3c2410_clk_regs)); - if (!s3c2410_save) { - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); - return; - } - - register_syscore_ops(&s3c2410_clk_syscore_ops); - return; -} -#else -static void __init s3c2410_clk_sleep_init(void) {} -#endif - PNAME(fclk_p) = { "mpll", "div_slow" }; static struct samsung_mux_clock s3c2410_common_muxes[] __initdata = { @@ -461,7 +421,8 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f, ARRAY_SIZE(s3c244x_common_aliases)); } - s3c2410_clk_sleep_init(); + samsung_clk_sleep_init(reg_base, s3c2410_clk_regs, + ARRAY_SIZE(s3c2410_clk_regs)); samsung_clk_of_add_provider(np, ctx); } From patchwork Wed Aug 29 15:50:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145455 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831320ljw; Wed, 29 Aug 2018 08:51:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZRGMkVIZN/QnkTdGOGRBZXqEyD99TGUru4ilCkeJJk6efn9mhJkpHGEO0lFLKFN37vTeQM X-Received: by 2002:a63:990a:: with SMTP id d10-v6mr6286176pge.80.1535557868634; Wed, 29 Aug 2018 08:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557868; cv=none; d=google.com; s=arc-20160816; b=oRU/2Gi8SVsrrQ9jZokfDUuPY7vBmGoLyIbw/pxwFe7N1pw7xBhc6efq+DxiR2ugeQ 1usKuMXQLyatscX0pTfjWNlA8i3PWz7u2TmOODycm5YyC2K2fsourEHXK7QD/0K2N7dn KbwsIDrc1OJBuImSjenh3WbejXP8J2p3YC0rn60xmleVqplA/21XsdfszySXNWYk9I0D bNHVhxDNHpWMsZN/oEzC2bjfqscVvZgKRv9gSWtb4M9YOyewzrlYOw3brv5dIQWp7qar F/fdypH0tO2Wl9kH7mnfnuQJp+BxGmFEuhIGECYdirImRZ3SPmff4AC6FHlrntOUkHJ7 idVg== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=u7ouEIbdPA0jpQSFbzOINyEQmSN+NmNxxnLK0fTpLfA=; b=SZ33d9KNnfjYaFjyOgvO4mcCDs6WbQckgMsXBEBk6P6ziYcBYw3a/jma+ANxtiEfQ2 5VixeqK4guaXLn9NnqjpPPUU6KmKQudfkd8VJrIzdrjxnToQwRSOO2J9Ejk7DfGBtqqr ku2fB8voEtlADd3YcVK6pmCGpD9oJKLCd2q5YruZf1ydmlxwhmnLq3CQ2HcRYbi4qBZ0 Z45v9kUOpOMT7waqnHArjN0qmrSMGoRsxsDMyFg1GT175tHA6ZO0fQeWUKaKszkih5ha BSk8XaauRxJF3S9l0ERpUuzmQ2yAnVZpi8Us61GJCIhR4vrGilelY9POhZzDFgJzaBKV jrVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=SqFmpG6z; 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 32-v6si4160278pgk.59.2018.08.29.08.51.08; Wed, 29 Aug 2018 08:51:08 -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=SqFmpG6z; 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 S1729046AbeH2Tsh (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:37 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:35923 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729200AbeH2Tsg (ORCPT ); Wed, 29 Aug 2018 15:48:36 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155101euoutp02b74e68714d39aa42c4f31b14b244d016~PZb08lD3P2539025390euoutp02E; Wed, 29 Aug 2018 15:51:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180829155101euoutp02b74e68714d39aa42c4f31b14b244d016~PZb08lD3P2539025390euoutp02E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557861; bh=u7ouEIbdPA0jpQSFbzOINyEQmSN+NmNxxnLK0fTpLfA=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=SqFmpG6zonWjgm8pBwTfK08+HtR4nYljKbnW/Ax/eAqxkkHPaWb2ZdPV2gEiEIAoT we87ZTwRZSvniV0pmFG0FgoEIS8cBs/SmhCt5fSqmRByi4dD+PUbdsFaKxfeyqwrlO O3eHTEVBF80RiTPmuDMjeRvvufbhXwZXgnrNj/SU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155100eucas1p2cbfdd3286626255a3eb61c114e1b6701~PZb0Smy0Q1893618936eucas1p2S; Wed, 29 Aug 2018 15:51:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 7D.FA.04806.4E0C68B5; Wed, 29 Aug 2018 16:51:00 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155059eucas1p16fecde00348e0a2e6707aaf2a76320be~PZbzf3eYq1660516605eucas1p1A; Wed, 29 Aug 2018 15:50:59 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-38-5b86c0e40c83 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 75.76.04128.3E0C68B5; Wed, 29 Aug 2018 16:50:59 +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:50:59 +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 03/10] clk: samsung: s3c2412: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:39 +0200 Message-id: <20180829155046.29359-4-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+NgFlrEIsWRmVeSWpSXmKPExsWy7djPc7pPDrRFG8ztFbXYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CVsXr9JeaC7UIVh671MDUwruHvYuTkkBAwkdiw9wNrFyMXh5DACkaJR9MXQzmfGSWe 9F1ihqna+ukKG0RiGaPEgo9/mCCcBiaJz7P+soBUsQkYSnS97WIDsUUEHCQ+f3rNCFLELPCY UWLrya9go4QF4iQWz3wIVsQioCpxd+M3sGZeAVuJjnsz2CDWyUus3nAArJ5TwE7ixfFesJsk BL6ySrQt+c8EUeQisbvxHDuELSzx6vgWKFtG4vLkbhaIhmZGifYZs9ghnB6gM+bsgFphLXH4 +EVWEJtZgE9i0rbpQOs4gOK8Eh1tQhAlHhKvtxxngfhzIqPEsWl72SYwSi5gZFjFKJ5aWpyb nlpsnJdarlecmFtcmpeul5yfu4kRGHOn/x3/uoNx35+kQ4wCHIxKPLwXZrRFC7EmlhVX5h5i lOBgVhLh3bsQKMSbklhZlVqUH19UmpNafIhRmoNFSZyXTystWkggPbEkNTs1tSC1CCbLxMEp 1cCYrP9AY4E51xkR+9NPHxi9astNqTXea3uzR2Xzj4i86cwrQze5qR87eOCo+pLzFaaxazcJ +Sm725yIiaj1N7OeEvAqrFu+XSJ4WfR3/SuX90vGfoqYucuocNr6pgdnHVZdO3F4yY43UUzT rZe3bCu1mpkTtJc7jGF5RWqyxfdN76IPHlfYtXiqEktxRqKhFnNRcSIAhoFoVLUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xa7qPD7RFGzy+YWSxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoErY/X6S8wF24UqDl3rYWpgXMPfxcjJISFgIrH10xW2LkYuDiGBJYwSDYeWMUI4TUwS z7+uZQepYhMwlOh628UGYosIOEh8/vQarIhZ4DGjxLnFG1hBEsICcRINRy8wgdgsAqoSdzd+ YwGxeQVsJTruzWCDWCcvsXrDAWYQm1PATuLF8V6wXiGgmoV3vjNOYORZwMiwilEktbQ4Nz23 2EivODG3uDQvXS85P3cTIzBUth37uWUHY9e74EOMAhyMSjy8BovaooVYE8uKK3MPMUpwMCuJ 8O5dCBTiTUmsrEotyo8vKs1JLT7EKM3BoiTOe96gMkpIID2xJDU7NbUgtQgmy8TBKdXAeKnr 3h17iYtxz1+kf9ybtN14/rpHN3ao/aoI/x70SniT4IU97HW1b42FOvNPVPSujA4Kva78u67U clv07u/v8qxjW19WZX3frRutPSPR1uPJhlMcj39deui3uXv+VoO2nNo9oY332XoLS2RqH5eK yNzaJNi7ry/j/DYpmW9Tu05G7wt5/vs/mxJLcUaioRZzUXEiAHQwzvYRAgAA X-CMS-MailID: 20180829155059eucas1p16fecde00348e0a2e6707aaf2a76320be X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155059eucas1p16fecde00348e0a2e6707aaf2a76320be References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-s3c2412.c | 43 ++----------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) -- 2.17.1 Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-s3c2412.c b/drivers/clk/samsung/clk-s3c2412.c index 6bc94d3aff78..dd1159050a5a 100644 --- a/drivers/clk/samsung/clk-s3c2412.c +++ b/drivers/clk/samsung/clk-s3c2412.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -29,9 +28,6 @@ static void __iomem *reg_base; -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *s3c2412_save; - /* * list of controller registers to be saved and restored during a * suspend/resume cycle. @@ -45,42 +41,6 @@ static unsigned long s3c2412_clk_regs[] __initdata = { CLKSRC, }; -static int s3c2412_clk_suspend(void) -{ - samsung_clk_save(reg_base, s3c2412_save, - ARRAY_SIZE(s3c2412_clk_regs)); - - return 0; -} - -static void s3c2412_clk_resume(void) -{ - samsung_clk_restore(reg_base, s3c2412_save, - ARRAY_SIZE(s3c2412_clk_regs)); -} - -static struct syscore_ops s3c2412_clk_syscore_ops = { - .suspend = s3c2412_clk_suspend, - .resume = s3c2412_clk_resume, -}; - -static void __init s3c2412_clk_sleep_init(void) -{ - s3c2412_save = samsung_clk_alloc_reg_dump(s3c2412_clk_regs, - ARRAY_SIZE(s3c2412_clk_regs)); - if (!s3c2412_save) { - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); - return; - } - - register_syscore_ops(&s3c2412_clk_syscore_ops); - return; -} -#else -static void __init s3c2412_clk_sleep_init(void) {} -#endif - static struct clk_div_table divxti_d[] = { { .val = 0, .div = 1 }, { .val = 1, .div = 2 }, @@ -278,7 +238,8 @@ void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f, samsung_clk_register_alias(ctx, s3c2412_aliases, ARRAY_SIZE(s3c2412_aliases)); - s3c2412_clk_sleep_init(); + samsung_clk_sleep_init(reg_base, s3c2412_clk_regs, + ARRAY_SIZE(s3c2412_clk_regs)); samsung_clk_of_add_provider(np, ctx); From patchwork Wed Aug 29 15:50:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145451 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831296ljw; Wed, 29 Aug 2018 08:51:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZv8PzU7GVKAoJS83rifuW4QzJknJODPCSD2mwMzwOLp0W2/b0n7yaE3ZBonjSxJbzcu5hq X-Received: by 2002:a63:9c5:: with SMTP id 188-v6mr6109090pgj.343.1535557866994; Wed, 29 Aug 2018 08:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557866; cv=none; d=google.com; s=arc-20160816; b=EQn5OgGR2brYfFHjJBjxg6UrgBTzPdiQxgkWP8FpYwykTeigrf8jMCFWsa62Fxkb12 /Q/TlsUN1R8e9yeEHhxJRMx5YsFE9MO4CQKiBh1aeLLiEiaJBLyXmKIDsQ6R0wy6JMJs yljU7RlGspUYg/QmOCMgpWYlPswQB0L1+hZSUpf7Q9xs3pqMEsd9suLX2HzwbrE40+ei Rg4fkYqtsvtVuyT4mERucInjWYz8DfPeIlColrOINYT3JVtl7GbHkdoLAIiZp4qRFif6 XtTn9dACnnxo+BZ6Ua4Xz/vZ56Vw2aNvdd1cLNSSHrEGhwks/ynXU/1H7ymBmldeHSa/ l8zQ== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=PwIMWaqUxZMX0jTBnJCIfRn7bRV7FDqULB3ToEAwgY4=; b=wQ/BRUhA0wjsWQrMwAwOct9ARLVV6XsHclrBN+Nvgp5jl9WIodtSBZAiMWAadQfgjD yjS8q8UodBpCHq00yr5v17MZoQeNYaB/I6Ui3fcY1dL7eZ8zhcw67BID4/Aw1+h8MVkC jkPs/JkaENNs9fyUoMkRphMF98gwuAGRK2LM5NBkbOc11Q3yDrvlkpnuZjb5RjoXbvCc EIXD0vYQKzwRPA0DSnbjseRSpzvZAR6vCil1xN/cynUetRnC+Q1xmFuQHo6b1PEOLL7x HyknqmeR6+sjt/h2hTNfxOQeHK0NImc1kiRNuYBD/uiqk/tUbKjq+GcXSg6EIdTE6k7v ELfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="mmXTjkI/"; 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 32-v6si4160278pgk.59.2018.08.29.08.51.06; Wed, 29 Aug 2018 08:51:06 -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="mmXTjkI/"; 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 S1729256AbeH2Tsh (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:37 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55846 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729213AbeH2Tsg (ORCPT ); Wed, 29 Aug 2018 15:48:36 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155101euoutp017fbf2814ceaf34246fc614f26a645f81~PZb1TLQXh0242402424euoutp01T; Wed, 29 Aug 2018 15:51:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180829155101euoutp017fbf2814ceaf34246fc614f26a645f81~PZb1TLQXh0242402424euoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557861; bh=PwIMWaqUxZMX0jTBnJCIfRn7bRV7FDqULB3ToEAwgY4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=mmXTjkI/pE9YWK+42gzZcDxIfIQNPDXjAIBC1ZI4O7V394fBb3ZX1RS2kZsKnsui4 3cnLCHhZ6W5Bg5RxCeDuAJY3U7euFlg5JrMi8+OWQRibzAViqm1gDt2aO+ubICxIlB nxZ+BLfXROqvMGNJ3h4HRhTgqHfDTtcsJw8aJSOQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155101eucas1p28757841bab87b3acd0c9dfbba1da288d~PZb0viZP82214922149eucas1p2u; Wed, 29 Aug 2018 15:51:01 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 8E.DB.04294.4E0C68B5; Wed, 29 Aug 2018 16:51:00 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155100eucas1p1ba8149066e026fc15f82091968b78a08~PZbz9ytdH0107901079eucas1p1r; Wed, 29 Aug 2018 15:51:00 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-93-5b86c0e47e0f Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F5.76.04128.4E0C68B5; Wed, 29 Aug 2018 16:51:00 +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:00 +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 04/10] clk: samsung: s3c2443: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:40 +0200 Message-id: <20180829155046.29359-5-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+NgFprPIsWRmVeSWpSXmKPExsWy7djPc7pPDrRFGxw6ZmixccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr49/Mz8wFW4QqTi48wdLAuIG/i5GTQ0LARGLbqStMILaQwApGiaUfkrsYuYDsz4wS FzobmGCK+i9PYIJILGOUOHRkHzOE08Ak8ebTTkaQKjYBQ4mut11sILaIgIPE50+vGUGKmAUe M0psPfmVGSQhLBAnsfpzK9hYFgFVif+Hz7F2MXJw8ArYSnyZZQCxTV5i9YYDYOWcAnYSL473 soLMkRD4yirx8NJVRogiF4netVtYIGxhiVfHt7BD2DISlyd3s0A0NDNKtM+YxQ7h9ABdMWcH G0SVtcTh4xdZQWxmAT6JSdumM4NcISHAK9HRJgRR4iGx6MRNFkjATGSUaJ5qPYFRcgEjwypG 8dTS4tz01GKjvNRyveLE3OLSvHS95PzcTYzAaDv97/iXHYy7/iQdYhTgYFTi4b0woy1aiDWx rLgy9xCjBAezkgjv3oVAId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rx8WmnRQgLpiSWp2ampBalF MFkmDk6pBsaVTRFOBVpeVrF1L1UCuT8zyNZ4TUjRzQqb/ZPFu2+mNUeSV8D3DxyHedpdb50o /WbbcP3jkV97t/3tUHs/8/LZuC6+xKOKN1ZuqP7+UVuUncvqbfDpq0Hbzz48vTZv7orco/ei s93u3zcJm75uZYZRzCIjzer0dNfcnZYJ+1k7j9vJvvinYKvEUpyRaKjFXFScCABFmyqwsgIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLJMWRmVeSWpSXmKPExsVy+t/xa7pPDrRFG7QdEbDYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CV8W/mZ+aCLUIVJxeeYGlg3MDfxcjJISFgItF/eQJTFyMXh5DAEkaJB7vvskM4TUwS T963sIFUsQkYSnS97QKzRQQcJD5/es0IUsQs8JhR4tziDawgCWGBOIlbjU1gNouAqsT/w+eA bA4OXgFbiS+zDCC2yUus3nCAGcTmFLCTeHG8F6xcCKhk4Z3vjBMYeRYwMqxiFEktLc5Nzy02 0itOzC0uzUvXS87P3cQIDJRtx35u2cHY9S74EKMAB6MSD6/BorZoIdbEsuLK3EOMEhzMSiK8 excChXhTEiurUovy44tKc1KLDzFKc7AoifOeN6iMEhJITyxJzU5NLUgtgskycXBKNTAequV1 fG60r/7j9UttPTxfPqfXThH4Yub04tXrnJkb/1dl3s8NmMtQFpKg78vhZT7z+5baLNcNpW76 vovXz1kbvigwoHRHQnWa/Im8Wau0Ss/N3cJnl8PeuPFo3MxJDConVny5MVvYrO+v0sWDiyZc e+XCGxvRIFz2g41n863A4jc7r/04suKrEktxRqKhFnNRcSIA0yfHcBACAAA= X-CMS-MailID: 20180829155100eucas1p1ba8149066e026fc15f82091968b78a08 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155100eucas1p1ba8149066e026fc15f82091968b78a08 References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-s3c2443.c | 43 ++----------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) -- 2.17.1 Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-s3c2443.c b/drivers/clk/samsung/clk-s3c2443.c index c46e6d5bc9bc..884067e4f1a1 100644 --- a/drivers/clk/samsung/clk-s3c2443.c +++ b/drivers/clk/samsung/clk-s3c2443.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -43,9 +42,6 @@ enum supported_socs { static void __iomem *reg_base; -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *s3c2443_save; - /* * list of controller registers to be saved and restored during a * suspend/resume cycle. @@ -65,42 +61,6 @@ static unsigned long s3c2443_clk_regs[] __initdata = { SCLKCON, }; -static int s3c2443_clk_suspend(void) -{ - samsung_clk_save(reg_base, s3c2443_save, - ARRAY_SIZE(s3c2443_clk_regs)); - - return 0; -} - -static void s3c2443_clk_resume(void) -{ - samsung_clk_restore(reg_base, s3c2443_save, - ARRAY_SIZE(s3c2443_clk_regs)); -} - -static struct syscore_ops s3c2443_clk_syscore_ops = { - .suspend = s3c2443_clk_suspend, - .resume = s3c2443_clk_resume, -}; - -static void __init s3c2443_clk_sleep_init(void) -{ - s3c2443_save = samsung_clk_alloc_reg_dump(s3c2443_clk_regs, - ARRAY_SIZE(s3c2443_clk_regs)); - if (!s3c2443_save) { - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); - return; - } - - register_syscore_ops(&s3c2443_clk_syscore_ops); - return; -} -#else -static void __init s3c2443_clk_sleep_init(void) {} -#endif - PNAME(epllref_p) = { "mpllref", "mpllref", "xti", "ext" }; PNAME(esysclk_p) = { "epllref", "epll" }; PNAME(mpllref_p) = { "xti", "mdivclk" }; @@ -450,7 +410,8 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f, break; } - s3c2443_clk_sleep_init(); + samsung_clk_sleep_init(reg_base, s3c2443_clk_regs, + ARRAY_SIZE(s3c2443_clk_regs)); samsung_clk_of_add_provider(np, ctx); From patchwork Wed Aug 29 15:50:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145450 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831281ljw; Wed, 29 Aug 2018 08:51:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZcivWnhNu4IbNDI5v2nX2oWxbSfqirJGzTU3KcugV7y9Bwu7KrK16e2xRrUTw5i/GgcsfL X-Received: by 2002:a63:5055:: with SMTP id q21-v6mr6203241pgl.397.1535557865989; Wed, 29 Aug 2018 08:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557865; cv=none; d=google.com; s=arc-20160816; b=Ni/vwK+OFMrC255GpLaloNO87ZjRc8050ybMmBKUc+9bhmFfbrueYG7tVz/pndqIvx avDwnLaBoYT+DPvEss2MjN7GWvk0xRc3xSesvN2nPaE7H+mkHMb9eh5X9HRbhpY76/64 gmSkXl2OZLTQLhAXoHwKQrdPbKQJCczpg9oeuZ0zANdW/Q/3Jgem3yhCectNcB0wzdOv GDxqAQBnP8HHnq9dsotxYgYkgwTeMD62o0XQjw5eckvf9ocRBZbyHYvTFmmLpvkxFoPK 3J0/pgBauRDoBmI/00voPYD+d1uqPyb7QucsLtz0POLb4WyZq/0PFLvBpULJbkULrn4G S65w== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=RiiECV9AZpgG0EuT9iBcBxNANooMXRfhb+MHTxsZTZI=; b=oz2kBBC/Efrn079c7+xpMJ9sxk6aYt5LE7gibJgTW6MvM4nDA2fNHQFhPfcZUBBp5R HSEvJMqzoEgLb9cr24IBmLyAgk9JbV1wF1WAab8kNqDtTl8/WNuZp4bBD7edKNSr52U5 vrf15TEPwE9EpE2M0O1amYf758YL1dEP3w1MJfL8+WGUglvLWeE0CeanzoNKI6CNbjeI oU7EAdCLs6UlaDkqhVoOHNxNB9tc5kOdA9S8yqWAN7MJuRQ+T6nAvg9mcZsRH5M9OFaS QjXS/4AtnHVDwpPFRzAzXdbhHK9rOHfCDCT8wOYvrQT33gTbUA/aJPPFi6mUlGhSz9x9 gfWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HVOi1jfS; 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 32-v6si4160278pgk.59.2018.08.29.08.51.05; Wed, 29 Aug 2018 08:51:05 -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=HVOi1jfS; 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 S1729236AbeH2Tsh (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:37 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55850 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729215AbeH2Tsg (ORCPT ); Wed, 29 Aug 2018 15:48:36 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155102euoutp0142674153670666e3f7fb0053c63fb55a~PZb1ynnm70242602426euoutp01Z; Wed, 29 Aug 2018 15:51:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180829155102euoutp0142674153670666e3f7fb0053c63fb55a~PZb1ynnm70242602426euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557862; bh=RiiECV9AZpgG0EuT9iBcBxNANooMXRfhb+MHTxsZTZI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=HVOi1jfS1r46TbEqsPYIretr/B52gurhJXmytU95jPkUM1oTgT2ul+AzNm/zyE9wy fTyLgpgj/KHjvBO86f0pAX1ykglf44aqsSdyOoqcRYVkJT7Eu7Y8lWDfB1ZHKf3n6l 38D4CnOrWqLp00cVv36hyhJYm0UFv1cvKAs68OVg= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155101eucas1p2a43962d4529b3b3a6198f2158e15516b~PZb1YBlGu2216722167eucas1p2o; Wed, 29 Aug 2018 15:51:01 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 59.DF.04441.5E0C68B5; Wed, 29 Aug 2018 16:51:01 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155100eucas1p16cded24187167d4af4d43f64c7abd88b~PZb0VtUma0103801038eucas1p10; Wed, 29 Aug 2018 15:51:00 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-e1-5b86c0e5a7a4 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 76.76.04128.4E0C68B5; Wed, 29 Aug 2018 16:51:00 +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:00 +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 05/10] clk: samsung: s3c64xx: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:41 +0200 Message-id: <20180829155046.29359-6-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+NgFlrIIsWRmVeSWpSXmKPExsWy7djPc7pPD7RFGxxtl7XYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CVMWnJXJaCYxIVf4/dYG9gPC3SxcjJISFgIjF/wVTWLkYuDiGBFYwSkw60M0I4nxkl Vt57wgZT9fjddHaIxDJGiX9zljJDOA1MEm8+7WQEqWITMJToetsF1iEi4CDx+dNrsFHMAo8Z Jbae/ArUwcEhLBAnsXNTLEgNi4CqxNeHbawgNq+ArcSzJXdZIbbJS6zecIAZxOYUsJN4cbwX 7D4Jga+sEpe7p0Od5CLRd2w2lC0s8er4FnYIW0bi8uRuFoiGZkaJ9hmz2CGcHqAr5uyA6rCW OHz8Itg6ZgE+iUnbpoNdJyHAK9HRJgRR4iFxqP041M8TGSXePP3KOIFRcgEjwypG8dTS4tz0 1GLDvNRyveLE3OLSvHS95PzcTYzAiDv97/inHYxfLyUdYhTgYFTi4dWY3RYtxJpYVlyZe4hR goNZSYR370KgEG9KYmVValF+fFFpTmrxIUZpDhYlcV4+rbRoIYH0xJLU7NTUgtQimCwTB6dU A2OOy2KPhUHcMxzzD7x68ujTwR0nRd5y1X1sqLhfUJO/TL7e0FNC0rDzhFto/qXOfZyvk+a/ mtBydYP0txVJ31Y+uua1IOZQ/9MEw76emMf8HqIflNrvKj++0LL5yKLJ3Zb3EotaLzAe3nZb VFm74MrTi7dez1ssLZexJv9FUceJxsXSC4+b1UYpsRRnJBpqMRcVJwIA1s5m/7QCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xa7pPDrRFG5y4q26xccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoErY9KSuSwFxyQq/h67wd7AeFqki5GTQ0LAROLxu+nsXYxcHEICSxgl+p5/ZoJwmpgk nrxvYQOpYhMwlOh62wVmiwg4SHz+9JoRpIhZ4DGjxLnFG1hBEsICcRJLv0xjArFZBFQlvj5s A4vzCthKPFtylxVinbzE6g0HmEFsTgE7iRfHe8HiQkA1C+98Z5zAyLOAkWEVo0hqaXFuem6x kV5xYm5xaV66XnJ+7iZGYKhsO/Zzyw7GrnfBhxgFOBiVeHgNFrVFC7EmlhVX5h5ilOBgVhLh 3bsQKMSbklhZlVqUH19UmpNafIhRmoNFSZz3vEFllJBAemJJanZqakFqEUyWiYNTqoFR4NrJ KZlMERveH4vym7PhxIGIIkWxLFPHsA9X/kyuri1SWv76gajuGc368rraDQsfvTjI+i06lP34 +VVvT1Ro8XE+u5pcf3nl5WvnHtZukzm0evHv9A8irP6K9re7r6kmvF217sDTlNP6fOYu7UKz P3cuK/Lard0avUtMI3rbX9sg58kfGXUfKbEUZyQaajEXFScCAOYp7EgRAgAA X-CMS-MailID: 20180829155100eucas1p16cded24187167d4af4d43f64c7abd88b X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155100eucas1p16cded24187167d4af4d43f64c7abd88b References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-s3c64xx.c | 66 +++---------------------------- 1 file changed, 6 insertions(+), 60 deletions(-) -- 2.17.1 Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-s3c64xx.c b/drivers/clk/samsung/clk-s3c64xx.c index 6db01cf5ab83..329a449f78c3 100644 --- a/drivers/clk/samsung/clk-s3c64xx.c +++ b/drivers/clk/samsung/clk-s3c64xx.c @@ -12,7 +12,6 @@ #include #include #include -#include #include @@ -59,10 +58,6 @@ static void __iomem *reg_base; static bool is_s3c6400; -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *s3c64xx_save_common; -static struct samsung_clk_reg_dump *s3c64xx_save_soc; - /* * List of controller registers to be saved and restored during * a suspend/resume cycle. @@ -89,60 +84,6 @@ static unsigned long s3c6410_clk_regs[] __initdata = { MEM0_GATE, }; -static int s3c64xx_clk_suspend(void) -{ - samsung_clk_save(reg_base, s3c64xx_save_common, - ARRAY_SIZE(s3c64xx_clk_regs)); - - if (!is_s3c6400) - samsung_clk_save(reg_base, s3c64xx_save_soc, - ARRAY_SIZE(s3c6410_clk_regs)); - - return 0; -} - -static void s3c64xx_clk_resume(void) -{ - samsung_clk_restore(reg_base, s3c64xx_save_common, - ARRAY_SIZE(s3c64xx_clk_regs)); - - if (!is_s3c6400) - samsung_clk_restore(reg_base, s3c64xx_save_soc, - ARRAY_SIZE(s3c6410_clk_regs)); -} - -static struct syscore_ops s3c64xx_clk_syscore_ops = { - .suspend = s3c64xx_clk_suspend, - .resume = s3c64xx_clk_resume, -}; - -static void __init s3c64xx_clk_sleep_init(void) -{ - s3c64xx_save_common = samsung_clk_alloc_reg_dump(s3c64xx_clk_regs, - ARRAY_SIZE(s3c64xx_clk_regs)); - if (!s3c64xx_save_common) - goto err_warn; - - if (!is_s3c6400) { - s3c64xx_save_soc = samsung_clk_alloc_reg_dump(s3c6410_clk_regs, - ARRAY_SIZE(s3c6410_clk_regs)); - if (!s3c64xx_save_soc) - goto err_soc; - } - - register_syscore_ops(&s3c64xx_clk_syscore_ops); - return; - -err_soc: - kfree(s3c64xx_save_common); -err_warn: - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); -} -#else -static void __init s3c64xx_clk_sleep_init(void) {} -#endif - /* List of parent clocks common for all S3C64xx SoCs. */ PNAME(spi_mmc_p) = { "mout_epll", "dout_mpll", "fin_pll", "clk27m" }; PNAME(uart_p) = { "mout_epll", "dout_mpll" }; @@ -508,7 +449,12 @@ void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f, samsung_clk_register_alias(ctx, s3c64xx_clock_aliases, ARRAY_SIZE(s3c64xx_clock_aliases)); - s3c64xx_clk_sleep_init(); + + samsung_clk_sleep_init(reg_base, s3c64xx_clk_regs, + ARRAY_SIZE(s3c64xx_clk_regs)); + if (!is_s3c6400) + samsung_clk_sleep_init(reg_base, s3c6410_clk_regs, + ARRAY_SIZE(s3c6410_clk_regs)); samsung_clk_of_add_provider(np, ctx); 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: 145454 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831312ljw; Wed, 29 Aug 2018 08:51:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbzC+33uvtDJ9Pn7mKw8NEkvahyzKarkzHI6oQrwvoXb4f0ETK6hnaDX+FmWh12g/XtREdA X-Received: by 2002:a62:c699:: with SMTP id x25-v6mr6621734pfk.16.1535557868112; Wed, 29 Aug 2018 08:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557868; cv=none; d=google.com; s=arc-20160816; b=u+jcQY0ubuh7HVYoPEwAwKO2GNSukF5y3/aBI6FVUgD7RhLfD+iCmPTV2TqvO8UheV f2wnvzgKSEnIzDGd+PxE23GXr0VTYRVGEo8kvgu87jkqZUsU/TR+KOioDjQTCCRssztC oAIC7eOYafaR7XOMTk7KR58usoAxiNwbPhlb9Fr8hq2S2KFdnXmLGKO1KsDNf2YbQdtt y4jinvpje93a1vwmxkckWO8ZDy8yllRaMQzbwqcDNLkElfxIpIqoc0SnwcLWJgC4z3fX v8AOpsG7YHCiby3NssrW8QSVkypo2mAs6OC5hV3Mwl/idHClCuyYXKk0T8vDHsdwuLGi a+nQ== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=Q9uhlE382LBHHSiqnvSM3mlLkFzoBC4lKxDmhF6BdmM=; b=fxa4AqNKBG+RGF6TxC2iDMFa7E0I00V5YAP1H5/kB1FxcoQa9nbKGFP2+VPbvhcaX+ zrXEeClFtwk97QPnotBlc+eoxoaSFGHfKCjque/81RW2bPeNYK33Z5zqlaKEDgju8f2x SV0nFAQa7pD4f9uoH0XoEynyt9F12K6OnwAIf1YTz4nvIn8Th3UPSmGyTWZ/fBaN3i/4 kUiD8tok6Tay+v9KpsiosOMiwFCd+xca5VHTut8rZ8HXyTNGhcjR/R5FBbWVF/L3CjgM xB/dI18478ZwC9Kb0VYNW4P189XqWEU8sLcAuIRUijaiSElNBl+Um7mMHP3xI13xbZgp f7bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=sbyd0vcJ; 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 32-v6si4160278pgk.59.2018.08.29.08.51.07; Wed, 29 Aug 2018 08:51:08 -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=sbyd0vcJ; 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 S1729229AbeH2Tsi (ORCPT + 3 others); 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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-s5pv210.c | 41 ++----------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) -- 2.17.1 Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski 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); From patchwork Wed Aug 29 15:50:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145452 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831299ljw; Wed, 29 Aug 2018 08:51:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbI8o++c0Qnv6slcxYzyczN9H1ihdwgAmbLW9lcgVJaxUsPWotBm1jW5ENzP9qGt0YiwPdh X-Received: by 2002:a62:8d84:: with SMTP id p4-v6mr6542800pfk.251.1535557867274; Wed, 29 Aug 2018 08:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557867; cv=none; d=google.com; s=arc-20160816; b=ekojfZXHXk/SFI66BLB8ysE7Bij6HXQzNjSIk+QVqzlCu5QPVCEpOsagJVk3pYyc+l jExKJemo//75dvBggemFxAzL7f5t5WWe00am6pBi84zsuesMMW+ZDo9E1AYXY4GhU0fW pKsZREXVSLjOTGKqqK1h6uDqkJCGLanC4Zvk4OkfUaS4DtipgN6jjfXNc9G9eDssKkRc Maedhnko37SYexlF2HAsJD7z56gzf73HIN2rVJBjC8XgBrJGChEPT7etxIhxZY/T5WYz br82jSX8w4+YDqEqGjwNGIwmCLMVP7vl0pTjq6yMP/NTZXkxkxALG5mQV794euXNbQ75 8nfg== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=VabrHE1sLkSCwa3GnzCCPplcOEzJjGW7kjRp3BZkJBw=; b=KAv/gW1KPbPJuNyHLxZ/BcIiZr4FeAH9n0/HlMRMo2XCGWqWuPLpSPo4evJZRjMhX7 gXgBAtp30WveUQvM4yqBhsvaSwtBseQF0krN18R9JW5rTUgGqsou/Euo5kJCM/1UCRff 4CiSzHr7+oM98XYOfF7JCaKNm4X7v7OyI9FALM5ZdbKnD3/jKZ9Z0oQ0NXjHspZ2OvAs vMRG8LLtXANK84dzCAfWRFXg6Kzy32oJtg9sHT3wIb8Payl3zWkbN7pJj7vuhx50RfDk 3NI6cCCPCzB/MezcFGbDnMz5pifbW4tYNLuvcrS3vNG5Q2iIKAWyHKK5IK3Cv2ci2rNw Hvsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="B/0KZwWM"; 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 32-v6si4160278pgk.59.2018.08.29.08.51.07; Wed, 29 Aug 2018 08:51:07 -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="B/0KZwWM"; 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 S1729227AbeH2Tsi (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:38 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55854 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729250AbeH2Tsi (ORCPT ); Wed, 29 Aug 2018 15:48:38 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155103euoutp01420b005c814aa95052f361d40adbcfa7~PZb2mOoWf0241702417euoutp01T; Wed, 29 Aug 2018 15:51:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180829155103euoutp01420b005c814aa95052f361d40adbcfa7~PZb2mOoWf0241702417euoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557863; bh=VabrHE1sLkSCwa3GnzCCPplcOEzJjGW7kjRp3BZkJBw=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=B/0KZwWMCzRjdsZJzasWYNIYJHhSui0On20yBCMHlCqzS9KiNMgVZKUj2QSrHjOIY 8s8YWSuIU3q5o14jn1jDjAtTv9NfEuNUOT/ufFIFyhFVwLQNK0N9DAzriW+rP5mGI9 YeFEIg/BrZJJpZf/03ZJ1OlkoSUf9kQ3DnFEQ8X0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155102eucas1p1790d3e0f1a7d38b0256c28fefb2abf0d~PZb11wdNx0107501075eucas1p1z; Wed, 29 Aug 2018 15:51:02 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id D9.DF.04441.5E0C68B5; Wed, 29 Aug 2018 16:51:02 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155101eucas1p22b694bf6395d8efcb33ba3802e287c88~PZb0-06x_1893718937eucas1p2n; Wed, 29 Aug 2018 15:51:01 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-e2-5b86c0e55c97 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B2.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 07/10] clk: samsung: exynos5250: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:43 +0200 Message-id: <20180829155046.29359-8-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+NgFprHIsWRmVeSWpSXmKPExsWy7djP87rPDrRFG7wItdg4Yz2rxfUvz1kt zp/fwG7xseceq8WM8/uYLNYeuctu0f70JbMDu8emVZ1sHn1bVjF6fN4kF8AcxWWTkpqTWZZa pG+XwJVxelcfY8F94Yq/rXINjDcEuhg5OSQETCTmXnvC3MXIxSEksIJR4nfXJXYI5zOjxLkF 85hgqlasWAVmCwksY5T41sgFUdTAJLH91QQWkASbgKFE19suNhBbRMBB4vOn14wgRcwCjxkl tp78ygySEBZIlPh8fycjiM0ioCoxc0MXmM0rYCvR8HUZO8Q2eYnVGw6A1XMK2Em8ON7LChH/ yiqx4g4/hO0icfv4Dah6YYlXx7dA2TISnR0HmUAWSwg0M0q0z5jFDuH0AF0xZwcbRJW1xOHj F8GmMgvwSUzaNh1oGwdQnFeio00IosRDou/7SiaINycySjx4tIRtAqPkAkaGVYziqaXFuemp xYZ5qeV6xYm5xaV56XrJ+bmbGIGxdvrf8U87GL9eSjrEKMDBqMTDqzG7LVqINbGsuDL3EKME B7OSCO/ehUAh3pTEyqrUovz4otKc1OJDjNIcLErivHxaadFCAumJJanZqakFqUUwWSYOTqkG xgOMOQIW7SmhZdxyNxaHGP4O2vYsaHV4QLS3lb679cvES2vZJ3nnaC4WvTdtxv+Fm/aqdDVK Hd2fK1yw5OMMDWEFro+1b5n1LXP+l234E1wiOo074/w7T/fZC6R5FquKV2t+vCbG9OBrh8Gp XVd3rwvsnvBfJL+Q9Y79vmdLre492bhvQ+a1SUosxRmJhlrMRcWJAAJDAaCxAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLJMWRmVeSWpSXmKPExsVy+t/xa7pPD7RFGyx5ImWxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr4/SuPsaC+8IVf1vlGhhvCHQxcnJICJhIrFixiqmLkYtDSGAJo8S1vp0sEE4Tk8TD JQ/YQarYBAwlut52sYHYIgIOEp8/vWYEKWIWeMwocW7xBlaQhLBAosTn+zsZQWwWAVWJmRu6 wGxeAVuJhq/L2CHWyUus3nCAGcTmFLCTeHG8F6xXCKhm4Z3vjBMYeRYwMqxiFEktLc5Nzy02 1CtOzC0uzUvXS87P3cQIDJRtx35u3sF4aWPwIUYBDkYlHt4LM9qihVgTy4orcw8xSnAwK4nw 7l0IFOJNSaysSi3Kjy8qzUktPsQozcGiJM573qAySkggPbEkNTs1tSC1CCbLxMEp1cCYaRRW megofL3fJNLvkaJG7PTKfbvWtctFLNQ+VbomX5DZoKWsfH3c12irB77y3TIftDk1pjqwPFFT N73AJmPLZbhu48uSaQdONOi9+7nhjpDKmVrTF8e5hO0N35n07g7gUxXia/oppHLWe/YXYXWW KVdXScpOiHlhrx/3lvPh24Vxn3b/v6jEUpyRaKjFXFScCACpq3/gEAIAAA== X-CMS-MailID: 20180829155101eucas1p22b694bf6395d8efcb33ba3802e287c88 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155101eucas1p22b694bf6395d8efcb33ba3802e287c88 References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-exynos5250.c | 42 ++-------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) -- 2.17.1 Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c index 347fd80c351b..f14139bcb0c1 100644 --- a/drivers/clk/samsung/clk-exynos5250.c +++ b/drivers/clk/samsung/clk-exynos5250.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "clk.h" #include "clk-cpu.h" @@ -111,9 +110,6 @@ enum exynos5250_plls { static void __iomem *reg_base; -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *exynos5250_save; - /* * list of controller registers to be saved and restored during a * suspend/resume cycle. @@ -172,41 +168,6 @@ static const unsigned long exynos5250_clk_regs[] __initconst = { GATE_IP_ISP1, }; -static int exynos5250_clk_suspend(void) -{ - samsung_clk_save(reg_base, exynos5250_save, - ARRAY_SIZE(exynos5250_clk_regs)); - - return 0; -} - -static void exynos5250_clk_resume(void) -{ - samsung_clk_restore(reg_base, exynos5250_save, - ARRAY_SIZE(exynos5250_clk_regs)); -} - -static struct syscore_ops exynos5250_clk_syscore_ops = { - .suspend = exynos5250_clk_suspend, - .resume = exynos5250_clk_resume, -}; - -static void __init exynos5250_clk_sleep_init(void) -{ - exynos5250_save = samsung_clk_alloc_reg_dump(exynos5250_clk_regs, - ARRAY_SIZE(exynos5250_clk_regs)); - if (!exynos5250_save) { - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); - return; - } - - register_syscore_ops(&exynos5250_clk_syscore_ops); -} -#else -static void __init exynos5250_clk_sleep_init(void) {} -#endif - /* list of all parent clock list */ PNAME(mout_apll_p) = { "fin_pll", "fout_apll", }; PNAME(mout_cpu_p) = { "mout_apll", "mout_mpll", }; @@ -882,7 +843,8 @@ static void __init exynos5250_clk_init(struct device_node *np) PWR_CTRL2_CORE2_UP_RATIO | PWR_CTRL2_CORE1_UP_RATIO); __raw_writel(tmp, reg_base + PWR_CTRL2); - exynos5250_clk_sleep_init(); + samsung_clk_sleep_init(reg_base, exynos5250_clk_regs, + ARRAY_SIZE(exynos5250_clk_regs)); exynos5_subcmus_init(ctx, 1, &exynos5250_disp_subcmu); samsung_clk_of_add_provider(np, ctx); From patchwork Wed Aug 29 15:50:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145457 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831338ljw; Wed, 29 Aug 2018 08:51:09 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbMm9aXXiZKTra8Clq6oLqFPljp/2YGtVcSvUZA9WMLqVWiip/vJ1FH4rpDWhZvqoRntYC7 X-Received: by 2002:a17:902:4601:: with SMTP id o1-v6mr6625466pld.202.1535557869761; Wed, 29 Aug 2018 08:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557869; cv=none; d=google.com; s=arc-20160816; b=o6VuXo+DNRuAO0buaGDsJPBheHycCWhEhc1mhrO2F9Ea0M58VAYkJFY1QImgmUajdR PgJKnzWqBaAWzt6szSe2Mi5+KG7NX8UbOM0wRFu+iF4ZfDmRtPX8sAWIkWQBgSefUeSw Q7QEjIMAP/kbeirES3N1EyUPRJnLaaRHffLlTZanxtjvfEeXu/qmrISjmiZ4S98/uP0H 1TVFS8SOPPCXEosiLStDJE89jkrlFcL/l7BdDt99rl4B4+97s3QHV/FWzCjKK2hzf91J 1AYydp7uqZrv5n2/DIDo/5OWf1gW7Cgr67TeiPnwuut8+RK0nBFLSVlVMfLF5LP9j3si IBxg== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=0ZOvo/7v0e4RpMKaRQStI++zq3ROZmJ4knCcBT7gPxs=; b=JYGghHPC2Cc9p7D9cxM9R1Q4i/50+IToiE8dznWYjtmdJOK+EBBm6t5l+GOOqyRHGF hlWrjb7CypqTn1kzchjJ6CiijyIWnR9gtWaAPJ0iTWCn/1xWa8P6PAJDYPIX9LZDS4J+ tkRE0xFo6L2a/gweIJ8U1xD5hDe1duAlKGVhlxICu/V+N6Cb+e+Vnz3ZmDnEa2ivAbc6 Edrzb4x2pX/NbPOaUgN7aP5bYG6t7uJn7f/rcDSF7x1Gz/NeUCC0D/97Pponsvlnupz3 hgdgnJJ+4qsPg5EITCYeOjyaJoZ6QOQhszibC54w0Uc7Mrrd9BDWhz1IlSshvgsn4cW9 c6eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=hc+BFqyE; 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 32-v6si4160278pgk.59.2018.08.29.08.51.09; Wed, 29 Aug 2018 08:51:09 -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=hc+BFqyE; 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 S1729218AbeH2Tsj (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:39 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:35935 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729206AbeH2Tsi (ORCPT ); Wed, 29 Aug 2018 15:48:38 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155103euoutp02d71e2d1966ccc84a53a1d54cd9a23ce7~PZb3XBA7r2539125391euoutp02E; Wed, 29 Aug 2018 15:51:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180829155103euoutp02d71e2d1966ccc84a53a1d54cd9a23ce7~PZb3XBA7r2539125391euoutp02E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557864; bh=0ZOvo/7v0e4RpMKaRQStI++zq3ROZmJ4knCcBT7gPxs=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=hc+BFqyEuf4Skd0RCCfZftk+dMRiX6u7RUoHxLvspRgaYmzQd1X/IrSuDKs7mymfl NyG2SwvKkcKfialJtxWyBSqt8AlrHztKvNni4e8Mz8npgpGYyzEuS/P8G2918u7OK/ RHW5kUqFUbWHg3SPQtwCPceuiPcXU+5tR1X3aBfU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155103eucas1p205b40a3cf84527029e919066e6d359eb~PZb2zqZyV2216722167eucas1p2q; Wed, 29 Aug 2018 15:51:03 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id CE.FA.04806.7E0C68B5; Wed, 29 Aug 2018 16:51:03 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155102eucas1p1ca7a26c10847dcb585f01b54657e29cb~PZb166KBg1936219362eucas1p12; Wed, 29 Aug 2018 15:51:02 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-3d-5b86c0e7f882 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A7.76.04128.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 08/10] clk: samsung: Add support for setting registers state before suspend Date: Wed, 29 Aug 2018 17:50:44 +0200 Message-id: <20180829155046.29359-9-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+NgFlrIIsWRmVeSWpSXmKPExsWy7djP87rPD7RFGxw9wWyxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoErY82btUwFTXIVS/etYWlgnCDZxcjJISFgInHt11KmLkYuDiGBFYwSv7oXM0M4nxkl Wq5fY4apatsxgQUisYxRYuOKlVAtDUwS21+BZDg52AQMJbredrGB2CICDhKfP71mBCliFnjM KLH15FewUcICsRJPtj8Es1kEVCUutd4As3kFbCWa11xjgVgnL7F6wwGwOKeAncSL472sIIMk BL6ySuw8NZURoshF4sTKJiYIW1ji1fEt7BC2jMTlyd0sEA3NjBLtM2axQzg9QGfM2cEGUWUt cfj4RVYQm1mAT2LStulA6ziA4rwSHW1CECUeErdunQNbICQwkVFi58rACYySCxgZVjGKp5YW 56anFhvnpZbrFSfmFpfmpesl5+duYgRG3Ol/x7/uYNz3J+kQowAHoxIP74UZbdFCrIllxZW5 hxglOJiVRHj3LgQK8aYkVlalFuXHF5XmpBYfYpTmYFES5+XTSosWEkhPLEnNTk0tSC2CyTJx cEo1MN5gv/KGj/Wpe8LtriQ2t+fbbs7YqvLr/vPVvZxXo55kidReXNPUJX7qIscE249pZm9v W0t5azDXfjcIX2OYeEHlwFtJ/tYDByM+Pmo1OB7/KunlpOQz9q93FLHyh0zR9VqU6Maz88fv VXH+da2z1y1znLDk0OJ7PTPW7k/imbjbU6zD0W3vhBNKLMUZiYZazEXFiQAyW+v3tAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xa7pPD7RFG0y6aWSxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoErY82btUwFTXIVS/etYWlgnCDZxcjJISFgItG2YwJLFyMXh5DAEkaJE+ePMkM4TUwS D5c8YAepYhMwlOh628UGYosIOEh8/vSaEaSIWeAxo8S5xRtYQRLCArEST7Y/ZAaxWQRUJS61 3gCzeQVsJZrXXGOBWCcvsXrDAbA4p4CdxIvjvWC9QkA1C+98Z5zAyLOAkWEVo0hqaXFuem6x kV5xYm5xaV66XnJ+7iZGYKhsO/Zzyw7GrnfBhxgFOBiVeHgNFrVFC7EmlhVX5h5ilOBgVhLh 3bsQKMSbklhZlVqUH19UmpNafIhRmoNFSZz3vEFllJBAemJJanZqakFqEUyWiYNTqoFRSf2e bFTtdvkNcgppNp5bxI+zXHk8/WJEX+wGNw/zk1v2GDUV/L1yo0eo5r3FuwK7ig3PV4ccu8Sc vbbFWEuhf/oqEcPL9offN/uHmlpO9XP7yK+b/fDCReZ5GzYo9Wwsn3rvq8NLZ8+jTglTeosV 5Mom/J8Rt5xZ4I2Txm1tn39B5gybVFyUWIozEg21mIuKEwGxzrNnEQIAAA== X-CMS-MailID: 20180829155102eucas1p1ca7a26c10847dcb585f01b54657e29cb X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155102eucas1p1ca7a26c10847dcb585f01b54657e29cb References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Some registers of clock controller have to be set to certain values before entering system suspend state. Till now drivers did that on their own, but it will be easier to handle it by generic code and let drivers simply to provide the list of registers and their state. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk.c | 23 +++++++++++++---------- drivers/clk/samsung/clk.h | 18 ++++++++++++++++-- 2 files changed, 29 insertions(+), 12 deletions(-) -- 2.17.1 diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c index 8634884aa11c..ab467a7f973a 100644 --- a/drivers/clk/samsung/clk.c +++ b/drivers/clk/samsung/clk.c @@ -290,9 +290,12 @@ static int samsung_clk_suspend(void) { struct samsung_clock_reg_cache *reg_cache; - list_for_each_entry(reg_cache, &clock_reg_cache_list, node) + list_for_each_entry(reg_cache, &clock_reg_cache_list, node) { samsung_clk_save(reg_cache->reg_base, reg_cache->rdump, reg_cache->rd_num); + samsung_clk_restore(reg_cache->reg_base, reg_cache->rsuspend, + reg_cache->rsuspend_num); + } return 0; } @@ -310,9 +313,11 @@ static struct syscore_ops samsung_clk_syscore_ops = { .resume = samsung_clk_resume, }; -void samsung_clk_sleep_init(void __iomem *reg_base, +void samsung_clk_sleep_init2(void __iomem *reg_base, const unsigned long *rdump, - unsigned long nr_rdump) + unsigned long nr_rdump, + const struct samsung_clk_reg_dump *rsuspend, + unsigned long nr_rsuspend) { struct samsung_clock_reg_cache *reg_cache; @@ -330,13 +335,10 @@ void samsung_clk_sleep_init(void __iomem *reg_base, reg_cache->reg_base = reg_base; reg_cache->rd_num = nr_rdump; + reg_cache->rsuspend = rsuspend; + reg_cache->rsuspend_num = nr_rsuspend; list_add_tail(®_cache->node, &clock_reg_cache_list); } - -#else -void samsung_clk_sleep_init(void __iomem *reg_base, - const unsigned long *rdump, - unsigned long nr_rdump) {} #endif /* @@ -380,8 +382,9 @@ struct samsung_clk_provider * __init samsung_cmu_register_one( samsung_clk_register_fixed_factor(ctx, cmu->fixed_factor_clks, cmu->nr_fixed_factor_clks); if (cmu->clk_regs) - samsung_clk_sleep_init(reg_base, cmu->clk_regs, - cmu->nr_clk_regs); + samsung_clk_sleep_init2(reg_base, + cmu->clk_regs, cmu->nr_clk_regs, + cmu->suspend_regs, cmu->nr_suspend_regs); samsung_clk_of_add_provider(np, ctx); diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h index 3880d2f9d582..854d0b52ef5f 100644 --- a/drivers/clk/samsung/clk.h +++ b/drivers/clk/samsung/clk.h @@ -279,6 +279,8 @@ struct samsung_clock_reg_cache { void __iomem *reg_base; struct samsung_clk_reg_dump *rdump; unsigned int rd_num; + const struct samsung_clk_reg_dump *rsuspend; + unsigned int rsuspend_num; }; struct samsung_cmu_info { @@ -358,9 +360,21 @@ extern struct samsung_clk_provider __init *samsung_cmu_register_one( extern unsigned long _get_rate(const char *clk_name); -extern void samsung_clk_sleep_init(void __iomem *reg_base, +#ifdef CONFIG_PM_SLEEP +extern void samsung_clk_sleep_init2(void __iomem *reg_base, const unsigned long *rdump, - unsigned long nr_rdump); + unsigned long nr_rdump, + const struct samsung_clk_reg_dump *rsuspend, + unsigned long nr_rsuspend); +#else +void samsung_clk_sleep_init2(void __iomem *reg_base, + const unsigned long *rdump, + unsigned long nr_rdump, + const struct samsung_clk_reg_dump *rsuspend, + unsigned long nr_rsuspend) {} +#endif +#define samsung_clk_sleep_init(reg_base, rdump, nr_rdump) \ + samsung_clk_sleep_init2(reg_base, rdump, nr_rdump, NULL, 0) extern void samsung_clk_save(void __iomem *base, struct samsung_clk_reg_dump *rd, From patchwork Wed Aug 29 15:50:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145453 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831306ljw; Wed, 29 Aug 2018 08:51:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaNowT8Gx+IPtlrUZJVT/5uOTAoeHEePB39/kZlG4G60tza9MKGzNbsE05nOrltTAuVm5Ml X-Received: by 2002:a63:bd41:: with SMTP id d1-v6mr6276529pgp.309.1535557867543; Wed, 29 Aug 2018 08:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557867; cv=none; d=google.com; s=arc-20160816; b=z1GJBevFrQOHkddnG3Ae1qNbma8ZoRWOdn71fWJ3KlcETwKt7rvTkVySny/F7W2mx1 Z4BWaf1nTpTLmkogtHs/9S6Uu7CSaqQaqFsVT2v82Frlmfhm27BkhTgMBJtCDi0woVyq 43IYdYKX6wHvifQLNXri6YprhZyjZ6bBCKMYgvspay7q62bCJxzjKuaTOm7OLaQ1IKLW 2RrHgT2XgoDAlTcduNiK+YyarVM+TvPoSu3MRs6NfTyCg7fVmLam2kSOOx2XZusX6mu5 oNIqSEJfE0mwaYGVjhxrx2kh8jo0PbCgzYSivRnaSrSwyyzzSBqt/37jMbNb/pQOjyaj rzDA== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=hPfdadCV0HaBGx8qPVWmS3x+Xdf4vfmgAA1gjDV9voI=; b=z2n8PLdb8RLCvo9ATDX6+Tyu28X3q4obPc2lDlTAERWT4uplx9/b2r3LlQyXOd0c1x +gkeVRpzY9EE8docKjLcI2HHMxQGphq47QLsegeKaf2PsFmu4oHCfekyvTOmSax8w5tE QnTzOBfmks/e4CYzwSrFU3zYskd5Dc5mn/mQPWeunc4sMm2xESpFFQSUeKcTwjr58d63 DdfANxteHKww7FDkxK3IvHXH8gmEDAAx3GkW3dGryXsyp6L3GxpU6lmpjWxx5dwxZz1T /sdQcMxKZIGmM2mPiUVLixrJXs3SWtijJidMWTWd/ileS5IYjEhYOMne/kgiDMiGxsDb LNjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=eyEL8cVp; 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 32-v6si4160278pgk.59.2018.08.29.08.51.07; Wed, 29 Aug 2018 08:51:07 -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=eyEL8cVp; 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 S1729234AbeH2Tsi (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:38 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:35932 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729200AbeH2Tsi (ORCPT ); Wed, 29 Aug 2018 15:48:38 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155103euoutp02822942034287896744f0d4ecc78e3143~PZb26zFBK2539025390euoutp02F; Wed, 29 Aug 2018 15:51:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180829155103euoutp02822942034287896744f0d4ecc78e3143~PZb26zFBK2539025390euoutp02F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557863; bh=hPfdadCV0HaBGx8qPVWmS3x+Xdf4vfmgAA1gjDV9voI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=eyEL8cVp6shXzXaV3/H5MRevuQuWIPmMd9cQpGs1BI2STOfEcLqT1E5xjJ6fqj5Ig Y91KpSyGhUGS6d2SxnYsv7QUWpI6H8A+/ijnwLZtg/0kykagcvw98vcZOo8sbvmyyS ICkn6nQ9dBwVfNLkIGgM2lhTM9t4I7Zo8Y4sIpXA= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155103eucas1p1cb3bc1ded3bc99c3c451f8c0ce85bdd9~PZb2fgsPz2368223682eucas1p1c; Wed, 29 Aug 2018 15:51:03 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 5A.DF.04441.6E0C68B5; Wed, 29 Aug 2018 16:51:02 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180829155102eucas1p2a4b1c554623ff97a23f85f26a6b537e2~PZb1viH2v2213522135eucas1p2q; Wed, 29 Aug 2018 15:51:02 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-e4-5b86c0e6736e Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 33.37.04284.6E0C68B5; Wed, 29 Aug 2018 16:51:02 +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:02 +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 09/10] clk: samsung: exynos4: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:45 +0200 Message-id: <20180829155046.29359-10-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+NgFlrEIsWRmVeSWpSXmKPExsWy7djPc7rPDrRFG6w5qW2xccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr4/LrXuaCi0YVM48+ZWlg/KLZxcjJISFgIrGv6TZ7FyMXh5DACkaJZ5vb2SCcz4wS txddYoep6lr7nAUisYxR4vuVS1BVDUwSk5dtZAGpYhMwlOh628UGYosIOEh8/vSaEaSIWeAx o8TWk1+ZQRLCAnES9/p3gNksAqoSs99tAVvBK2An0b94BiPEOnmJ1RsOgNVwAsVfHO9lBRkk IfCVVWLupA9sEEUuEiu//YBqEJZ4dXwL1K0yEp0dB5kgGpoZJdpnzGKHcHqAzpizA6rbWuLw 8YusIDazAJ/EpG3TgdZxAMV5JTrahCBKPCSunbvFBPHnREaJ612fGCcwSi5gZFjFKJ5aWpyb nlpsmJdarlecmFtcmpeul5yfu4kRGHOn/x3/tIPx66WkQ4wCHIxKPLwas9uihVgTy4orcw8x SnAwK4nw7l0IFOJNSaysSi3Kjy8qzUktPsQozcGiJM7Lp5UWLSSQnliSmp2aWpBaBJNl4uCU amBcv1MtWu3l/693hObr5R/iS8l3k+YN7DoYc3ixId+RCoNpzfFpjBU+Rz7sb/zHPSVELLHG 48vbCm+ZE/3bzfcs97zp+e5P+3v/aYv2/o+sKjy+QCoztpHB+sumh/vWTTO4mnz6RvkR141W VdN0Gze1LQw7HXwpuy77s9b8tiTF8mqNmbdXiDcrsRRnJBpqMRcVJwIAucb3mbUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xa7rPDrRFG8zewmuxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr4/LrXuaCi0YVM48+ZWlg/KLZxcjJISFgItG19jlLFyMXh5DAEkaJda8Ps0I4TUwS O+efZgapYhMwlOh628UGYosIOEh8/vSaEaSIWeAxo8S5xRtYQRLCAnESTR3PwIpYBFQlZr/b wg5i8wrYSfQvnsEIsU5eYvWGA2BDOYHiL473gvUKCdhKLLzznXECI88CRoZVjCKppcW56bnF hnrFibnFpXnpesn5uZsYgaGy7djPzTsYL20MPsQowMGoxMN7YUZbtBBrYllxZe4hRgkOZiUR 3r0LgUK8KYmVValF+fFFpTmpxYcYpTlYlMR5zxtURgkJpCeWpGanphakFsFkmTg4pRoYi6bU 2YXvmL92S8nk809PMEW8mbqg7mDLdz9DF3aPE3c4P/xpk6zjrW9lTWDr2uyotihHMXDHvv0W Qc6r+73z2YtPSH/bfTJmo8STmKi+p9Wm+9Usl1dyMf5NUJtQqmLFqyvV5xt75Uhkt/ykysQd G7jvsB57fm4RT+/VqdebGuazysfOr3qvxFKckWioxVxUnAgALkgscxECAAA= X-CMS-MailID: 20180829155102eucas1p2a4b1c554623ff97a23f85f26a6b537e2 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155102eucas1p2a4b1c554623ff97a23f85f26a6b537e2 References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. Handling of PLLs is a bit different in generic code, as they are handled in the same way as other clock registers. Such approach was already used on later Exynos SoCs and worked fine. Tests have shown that it works also on Exynos4 SoCs and significantly simplifies the code. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-exynos4.c | 147 ++++-------------------------- 1 file changed, 16 insertions(+), 131 deletions(-) -- 2.17.1 diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index 0421960eb963..d3bd9ffd8a09 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "clk.h" #include "clk-cpu.h" @@ -157,14 +156,6 @@ enum exynos4_plls { static void __iomem *reg_base; static enum exynos4_soc exynos4_soc; -/* - * Support for CMU save/restore across system suspends - */ -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *exynos4_save_common; -static struct samsung_clk_reg_dump *exynos4_save_soc; -static struct samsung_clk_reg_dump *exynos4_save_pll; - /* * list of controller registers to be saved and restored during a * suspend/resume cycle. @@ -192,7 +183,7 @@ static const unsigned long exynos4x12_clk_save[] __initconst = { E4X12_PWR_CTRL2, }; -static const unsigned long exynos4_clk_pll_regs[] __initconst = { +static const unsigned long exynos4_clk_regs[] __initconst = { EPLL_LOCK, VPLL_LOCK, EPLL_CON0, @@ -201,9 +192,6 @@ static const unsigned long exynos4_clk_pll_regs[] __initconst = { VPLL_CON0, VPLL_CON1, VPLL_CON2, -}; - -static const unsigned long exynos4_clk_regs[] __initconst = { SRC_LEFTBUS, DIV_LEFTBUS, GATE_IP_LEFTBUS, @@ -276,6 +264,8 @@ static const unsigned long exynos4_clk_regs[] __initconst = { }; static const struct samsung_clk_reg_dump src_mask_suspend[] = { + { .offset = VPLL_CON0, .value = 0x80600302, }, + { .offset = EPLL_CON0, .value = 0x806F0302, }, { .offset = SRC_MASK_TOP, .value = 0x00000001, }, { .offset = SRC_MASK_CAM, .value = 0x11111111, }, { .offset = SRC_MASK_TV, .value = 0x00000111, }, @@ -291,123 +281,6 @@ static const struct samsung_clk_reg_dump src_mask_suspend_e4210[] = { { .offset = E4210_SRC_MASK_LCD1, .value = 0x00001111, }, }; -#define PLL_ENABLED (1 << 31) -#define PLL_LOCKED (1 << 29) - -static void exynos4_clk_enable_pll(u32 reg) -{ - u32 pll_con = readl(reg_base + reg); - pll_con |= PLL_ENABLED; - writel(pll_con, reg_base + reg); - - while (!(pll_con & PLL_LOCKED)) { - cpu_relax(); - pll_con = readl(reg_base + reg); - } -} - -static void exynos4_clk_wait_for_pll(u32 reg) -{ - u32 pll_con; - - pll_con = readl(reg_base + reg); - if (!(pll_con & PLL_ENABLED)) - return; - - while (!(pll_con & PLL_LOCKED)) { - cpu_relax(); - pll_con = readl(reg_base + reg); - } -} - -static int exynos4_clk_suspend(void) -{ - samsung_clk_save(reg_base, exynos4_save_common, - ARRAY_SIZE(exynos4_clk_regs)); - samsung_clk_save(reg_base, exynos4_save_pll, - ARRAY_SIZE(exynos4_clk_pll_regs)); - - exynos4_clk_enable_pll(EPLL_CON0); - exynos4_clk_enable_pll(VPLL_CON0); - - if (exynos4_soc == EXYNOS4210) { - samsung_clk_save(reg_base, exynos4_save_soc, - ARRAY_SIZE(exynos4210_clk_save)); - samsung_clk_restore(reg_base, src_mask_suspend_e4210, - ARRAY_SIZE(src_mask_suspend_e4210)); - } else { - samsung_clk_save(reg_base, exynos4_save_soc, - ARRAY_SIZE(exynos4x12_clk_save)); - } - - samsung_clk_restore(reg_base, src_mask_suspend, - ARRAY_SIZE(src_mask_suspend)); - - return 0; -} - -static void exynos4_clk_resume(void) -{ - samsung_clk_restore(reg_base, exynos4_save_pll, - ARRAY_SIZE(exynos4_clk_pll_regs)); - - exynos4_clk_wait_for_pll(EPLL_CON0); - exynos4_clk_wait_for_pll(VPLL_CON0); - - samsung_clk_restore(reg_base, exynos4_save_common, - ARRAY_SIZE(exynos4_clk_regs)); - - if (exynos4_soc == EXYNOS4210) - samsung_clk_restore(reg_base, exynos4_save_soc, - ARRAY_SIZE(exynos4210_clk_save)); - else - samsung_clk_restore(reg_base, exynos4_save_soc, - ARRAY_SIZE(exynos4x12_clk_save)); -} - -static struct syscore_ops exynos4_clk_syscore_ops = { - .suspend = exynos4_clk_suspend, - .resume = exynos4_clk_resume, -}; - -static void __init exynos4_clk_sleep_init(void) -{ - exynos4_save_common = samsung_clk_alloc_reg_dump(exynos4_clk_regs, - ARRAY_SIZE(exynos4_clk_regs)); - if (!exynos4_save_common) - goto err_warn; - - if (exynos4_soc == EXYNOS4210) - exynos4_save_soc = samsung_clk_alloc_reg_dump( - exynos4210_clk_save, - ARRAY_SIZE(exynos4210_clk_save)); - else - exynos4_save_soc = samsung_clk_alloc_reg_dump( - exynos4x12_clk_save, - ARRAY_SIZE(exynos4x12_clk_save)); - if (!exynos4_save_soc) - goto err_common; - - exynos4_save_pll = samsung_clk_alloc_reg_dump(exynos4_clk_pll_regs, - ARRAY_SIZE(exynos4_clk_pll_regs)); - if (!exynos4_save_pll) - goto err_soc; - - register_syscore_ops(&exynos4_clk_syscore_ops); - return; - -err_soc: - kfree(exynos4_save_soc); -err_common: - kfree(exynos4_save_common); -err_warn: - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); -} -#else -static void __init exynos4_clk_sleep_init(void) {} -#endif - /* list of all parent clock list */ PNAME(mout_apll_p) = { "fin_pll", "fout_apll", }; PNAME(mout_mpll_p) = { "fin_pll", "fout_mpll", }; @@ -1532,7 +1405,19 @@ static void __init exynos4_clk_init(struct device_node *np, if (soc == EXYNOS4X12) exynos4x12_core_down_clock(); - exynos4_clk_sleep_init(); + + samsung_clk_sleep_init2(reg_base, exynos4_clk_regs, + ARRAY_SIZE(exynos4_clk_regs), + src_mask_suspend, + ARRAY_SIZE(src_mask_suspend)); + if (exynos4_soc == EXYNOS4210) + samsung_clk_sleep_init2(reg_base, exynos4210_clk_save, + ARRAY_SIZE(exynos4210_clk_save), + src_mask_suspend_e4210, + ARRAY_SIZE(src_mask_suspend_e4210)); + else + samsung_clk_sleep_init(reg_base, exynos4x12_clk_save, + ARRAY_SIZE(exynos4x12_clk_save)); samsung_clk_of_add_provider(np, ctx); From patchwork Wed Aug 29 15:50:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 145456 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp831332ljw; Wed, 29 Aug 2018 08:51:09 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ+CCG1P/VER25ZIJQWofX2F7JbwrUBWG2ZykGfzprH5rfSvg2HOV8suwRdSjtjMrWpZSWy X-Received: by 2002:a63:5055:: with SMTP id q21-v6mr6203405pgl.397.1535557869483; Wed, 29 Aug 2018 08:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557869; cv=none; d=google.com; s=arc-20160816; b=jRLqbqWSbBQ/w98GDXhIJr6Vbp7hYrN//0YH6D1HLGJSAlmo1RK83VwnLqxfyz/Od5 u5Lg03r4XGtQqmBMpwTGqoCItQMvQgxvqihCqpZBzPOgxpJG9HpEnq2yBSfsNwFnr/AT bczlVcv0aeRJ8Kf1tsWNVrgWXdcnpVhAMgMvGRPQzu9WsxcJz7xWlqnaKja14l1tBqMJ n25ZhYQboYJZMVx2btRwS/U3UoSHc8jCt4iq/ZzHgdHufw6f0+ft/SbEChwXEFEo16eR XhiThpUlASb14AZVpSTyeWPq60B/8IpBIYZ3rz6AWMD07AMMP+shaxYODAd3VekH8Ibx J2Fg== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=TI9gOZRB3r4tnQPcekOrcuMLRHftqnHX83vDH5qp3q0=; b=PpoameMkgtWr2vUWS4j05HBjR0T0pJ8MLXRhOLIrVnD/FICvcs6FDI7+1Nafo7lp9p 4oUscq2Stkfq9dF1WkFvqkPt98GyjNlDJ5p0j9OYf/6lSUrSNTETN2YenixdKivjOq/b NusewjtJTZz3HQO4CmAuozVPTbt3tlFru+hqx+Lgt5IVfvDjw1nDktNFfN+WbFa51Uzq 3RsfMFlepPb1cQKuIbcrw03CzUle9FG+vKUq79swNF5PMqYRmDt4ZA+P6B/y9iyZu+bM CbMVRIM8Uygf4/76Csj+Vt9h3elJ19zuJ4KSptMDEkVzanxaV7Pu8f6MQHPW74FeBY2u Heow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=dKSJxC+5; 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 32-v6si4160278pgk.59.2018.08.29.08.51.09; Wed, 29 Aug 2018 08:51:09 -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=dKSJxC+5; 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 S1729179AbeH2Tsj (ORCPT + 3 others); Wed, 29 Aug 2018 15:48:39 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55850 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729218AbeH2Tsj (ORCPT ); Wed, 29 Aug 2018 15:48:39 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180829155104euoutp017bc2e2dcc7d05193579677f4e3cf6212~PZb34kBIg0370903709euoutp01q; Wed, 29 Aug 2018 15:51:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180829155104euoutp017bc2e2dcc7d05193579677f4e3cf6212~PZb34kBIg0370903709euoutp01q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1535557864; bh=TI9gOZRB3r4tnQPcekOrcuMLRHftqnHX83vDH5qp3q0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=dKSJxC+5Na+UahVGMpY67dLZjLmx1rgy5MFwfGLpGJ6l2rQ4kophGQcW33vVPmbZy /8mvfk8yz+LgsQZ3QkjNwSM8IA+wPd/tovRI4++HawDASc23bBWRaYdzkPFjGA0eH6 4ZMHBzpxb3Plq+2Bzjv8jivdzMa2QLwwWSndIru4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155104eucas1p14b1737f1b75a68ecaf7885e6866521a8~PZb3dTqhe0107501075eucas1p11; Wed, 29 Aug 2018 15:51:04 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 4F.FA.04806.7E0C68B5; Wed, 29 Aug 2018 16:51:03 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180829155103eucas1p16b6cddb4babcfb60a3257e017bea347e~PZb2dLvAz0667306673eucas1p1Z; Wed, 29 Aug 2018 15:51:03 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-3f-5b86c0e7ecdd Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 28.76.04128.6E0C68B5; Wed, 29 Aug 2018 16:51:02 +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:02 +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 10/10] clk: samsung: exynos5420: Use generic helper for handling suspend/resume Date: Wed, 29 Aug 2018 17:50:46 +0200 Message-id: <20180829155046.29359-11-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+NgFlrAIsWRmVeSWpSXmKPExsWy7djPc7rPD7RFGzzYpG+xccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr4918g4JH0hVfLj5lb2BcKt7FyMkhIWAicf/OXZYuRi4OIYEVjBILz/xghHA+M0rs WrSBrYuRA6yq86ImRHwZo8SeV1egihqYJCYv28gCMopNwFCi620XG4gtIuAg8fnTa7AiZoHH jBJbT35lBkkICyRKTH73kBXEZhFQlVjR8wMszitgJ7Hw5Rx2iJvkJVZvOAAW5wSKvzjeywoy SELgK6vElilL2CCKXCR2nfwB1SAs8er4FihbRuLy5G4WiIZmRon2GbPYIZweoDPm7IDqtpY4 fPwi2BnMAnwSk7ZNZ4Z4lFeio00IosRDovfmK2aIPycySnT9OsU2gVFyASPDKkbx1NLi3PTU YuO81HK94sTc4tK8dL3k/NxNjMB4O/3v+NcdjPv+JB1iFOBgVOLhvTCjLVqINbGsuDL3EKME B7OSCO/ehUAh3pTEyqrUovz4otKc1OJDjNIcLErivHxaadFCAumJJanZqakFqUUwWSYOTqkG RpEDOrZl0z9rGF63rti5i8eHwSAs8KKKx69lSc+DH3N494Rutfe22Vz74siTZWpP+Ayfzou9 vsztTo6KeorMBDXlCxGfxUwsOrOm2e4K7M+J8shrV1nCy86spLz62/LVlQ9e5y9ftPp1b9Tn HW2M/lM5Sg2eiMn+3ru1usw04PC5h8ZyWms7lViKMxINtZiLihMB2MlfQLMCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsVy+t/xa7rPDrRFG/Q+s7LYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CV8W6+QcEj6YovF5+yNzAuFe9i5OCQEDCR6Lyo2cXIySEksIRRYupG6S5GLiC7iUli 5/zTzCAJNgFDia63XWwgtoiAg8TnT68ZQYqYBR4zSpxbvIEVJCEskCgx+d1DMJtFQFViRc8P sGZeATuJhS/nsIPYEgLyEqs3HACLcwLFXxzvZYXYbCux8M53xgmMPAsYGVYxiqSWFuem5xYb 6RUn5haX5qXrJefnbmIEBsm2Yz+37GDsehd8iFGAg1GJh9dgUVu0EGtiWXFl7iFGCQ5mJRHe vQuBQrwpiZVVqUX58UWlOanFhxilOViUxHnPG1RGCQmkJ5akZqemFqQWwWSZODilGhhTq+Nb 8h5wSf2rlfHbOl24z/rlBuu0JZc/3csXbvpv6fC+MfjK8y8dmSL7A4/fmBtsK7UkbOlH43/S +nFGnwUfBG1bbuctOmPJ5/a3c37wC0y69P/Jogduf+w1hVJWBB+eNN+t7qjwfZtvyrOspFhU Mzef6Y/lCTtxYdt1rbD0J0fdfDoufPikxFKckWioxVxUnAgA4h5BHQ4CAAA= X-CMS-MailID: 20180829155103eucas1p16b6cddb4babcfb60a3257e017bea347e X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180829155103eucas1p16b6cddb4babcfb60a3257e017bea347e References: <20180829155046.29359-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Replace common suspend/resume handling code by generic helper. No functional change. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-exynos5420.c | 73 +++------------------------- 1 file changed, 7 insertions(+), 66 deletions(-) -- 2.17.1 diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index 95e1bf69449b..9f2f53d7be70 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "clk.h" #include "clk-cpu.h" @@ -156,10 +155,6 @@ enum exynos5x_plls { static void __iomem *reg_base; static enum exynos5x_soc exynos5x_soc; -#ifdef CONFIG_PM_SLEEP -static struct samsung_clk_reg_dump *exynos5x_save; -static struct samsung_clk_reg_dump *exynos5800_save; - /* * list of controller registers to be saved and restored during a * suspend/resume cycle. @@ -283,66 +278,6 @@ static const struct samsung_clk_reg_dump exynos5420_set_clksrc[] = { { .offset = GATE_IP_PERIC, .value = 0xffffffff, }, }; -static int exynos5420_clk_suspend(void) -{ - samsung_clk_save(reg_base, exynos5x_save, - ARRAY_SIZE(exynos5x_clk_regs)); - - if (exynos5x_soc == EXYNOS5800) - samsung_clk_save(reg_base, exynos5800_save, - ARRAY_SIZE(exynos5800_clk_regs)); - - samsung_clk_restore(reg_base, exynos5420_set_clksrc, - ARRAY_SIZE(exynos5420_set_clksrc)); - - return 0; -} - -static void exynos5420_clk_resume(void) -{ - samsung_clk_restore(reg_base, exynos5x_save, - ARRAY_SIZE(exynos5x_clk_regs)); - - if (exynos5x_soc == EXYNOS5800) - samsung_clk_restore(reg_base, exynos5800_save, - ARRAY_SIZE(exynos5800_clk_regs)); -} - -static struct syscore_ops exynos5420_clk_syscore_ops = { - .suspend = exynos5420_clk_suspend, - .resume = exynos5420_clk_resume, -}; - -static void __init exynos5420_clk_sleep_init(void) -{ - exynos5x_save = samsung_clk_alloc_reg_dump(exynos5x_clk_regs, - ARRAY_SIZE(exynos5x_clk_regs)); - if (!exynos5x_save) { - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); - return; - } - - if (exynos5x_soc == EXYNOS5800) { - exynos5800_save = - samsung_clk_alloc_reg_dump(exynos5800_clk_regs, - ARRAY_SIZE(exynos5800_clk_regs)); - if (!exynos5800_save) - goto err_soc; - } - - register_syscore_ops(&exynos5420_clk_syscore_ops); - return; -err_soc: - kfree(exynos5x_save); - pr_warn("%s: failed to allocate sleep save data, no sleep support!\n", - __func__); - return; -} -#else -static void __init exynos5420_clk_sleep_init(void) {} -#endif - /* list of all parent clocks */ PNAME(mout_mspll_cpu_p) = {"mout_sclk_cpll", "mout_sclk_dpll", "mout_sclk_mpll", "mout_sclk_spll"}; @@ -1540,7 +1475,13 @@ static void __init exynos5x_clk_init(struct device_node *np, mout_kfc_p[0], mout_kfc_p[1], 0x28200, exynos5420_kfcclk_d, ARRAY_SIZE(exynos5420_kfcclk_d), 0); - exynos5420_clk_sleep_init(); + samsung_clk_sleep_init2(reg_base, exynos5x_clk_regs, + ARRAY_SIZE(exynos5x_clk_regs), + exynos5420_set_clksrc, + ARRAY_SIZE(exynos5420_set_clksrc)); + if (soc == EXYNOS5800) + samsung_clk_sleep_init(reg_base, exynos5800_clk_regs, + ARRAY_SIZE(exynos5800_clk_regs)); exynos5_subcmus_init(ctx, ARRAY_SIZE(exynos5x_subcmus), exynos5x_subcmus);