From patchwork Thu Sep 6 16:02:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 146113 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp46271ljw; Thu, 6 Sep 2018 09:02:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaJJ8gdlM3Bcur0AQ/mjoa6cdbWSbDG6+d/B/zC80imLNN/uI4RVrO9D4rUU8i2dRQioETr X-Received: by 2002:a63:ef10:: with SMTP id u16-v6mr3450264pgh.269.1536249769897; Thu, 06 Sep 2018 09:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536249769; cv=none; d=google.com; s=arc-20160816; b=Brdx3HYCmz9+xhCPUbS6Df3YPBwZdpCLHYRnYNzxhCG5TvwsEC9X8PmywlJSjf8zJq akFMvqMQMwt1GMMRs55sFlqxzbBMHsUMMeLiFv2Z1NscVjTT/LT1qUUlIKjz5krc2QtQ 8+EAiPFT0PwimE10fRUjZqX7dCXFKK1bz8D6qe64X29/sZDgIk/jFKBbghRzkkMkdUaM pMmcLaE0tCK2AyXmaRzVXCfeNDEA+bEYzlS66kG4YjlRG+hCAMEI6hL4pZm6YkUOwg/p evwOyD+4u/fD6wPfQjKDra273JdoAqFKKm/j/uDMLgl4eCF6zEnWEJjlm+DyGfXNjRex tYHw== 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; bh=YQQ9Q3gQDkyP0LydfEVZQnqD47Gs0whA1Th2PgVxbKQ=; b=rJ2rqR6t8CMyhrJJOIG9U0WF6YBzBXpzj4uhuJEM0Mf3c8x4vf6ntANIXH3VZmStma N3z5Pqe19jSe8rVlhtGO1Pv9qAfSqr2L9ka7Bsiplnllg5Mzh19Rd02nS61yLRG6O1HL bG1HYzalIqqDJdTkF2DPR66KiD+UtgHGn75D2cxdmNvIqFfium7DahCkGkgP7MlZ4X2I JsqzMEnIou779YpbKBD6JNcMnrXHebYOr4xVkYljrfi0ZXl2b/WuaK8ti5d/KFACFVuD KWToY575aKyGtciXXhZ7Zk3vVRq4QMH69LAsNIDzoZQMm6DydzNLRyWE4mP7uusyw7yz yvXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Wlq9+Lk5; 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 z9-v6si5053617pln.462.2018.09.06.09.02.48; Thu, 06 Sep 2018 09:02:49 -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=Wlq9+Lk5; 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 S1730330AbeIFUi6 (ORCPT + 3 others); Thu, 6 Sep 2018 16:38:58 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:48364 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730272AbeIFUi6 (ORCPT ); Thu, 6 Sep 2018 16:38:58 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180906160247euoutp016e076c7f6cd1af2baab2a07d7d746685~R2wYUBc3t2041820418euoutp01e; Thu, 6 Sep 2018 16:02:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180906160247euoutp016e076c7f6cd1af2baab2a07d7d746685~R2wYUBc3t2041820418euoutp01e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1536249767; bh=YQQ9Q3gQDkyP0LydfEVZQnqD47Gs0whA1Th2PgVxbKQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Wlq9+Lk55mOxg4nDI396VRpg1lkMmNpgTSZrKZntE+BESAYXruMFTmprdSoeMxvcd VX5QvTXQlf2Hvqo+vI9X3Mfj6dh+Tf8mRjWSHRequyDl79vjtE+zjDgJ5nZ0WSFdk2 ZguwCrDwQoDiEEMXoSwEH6oKo1X5ZLmyjh+Xvwmc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180906160246eucas1p1efc314d541d858d0c9131c51d82fc8a5~R2wXtqdj81046610466eucas1p1L; Thu, 6 Sep 2018 16:02:46 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 03.E6.04294.5AF419B5; Thu, 6 Sep 2018 17:02:46 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180906160245eucas1p257fef879d3bb6127cb1afa6c357a953f~R2wW586Ka0478504785eucas1p2f; Thu, 6 Sep 2018 16:02:45 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-2e-5b914fa5147e Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 40.6D.04128.5AF419B5; Thu, 6 Sep 2018 17:02:45 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PEN0037W5WGAX30@eusync1.samsung.com>; Thu, 06 Sep 2018 17:02:45 +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 v2 1/2] clk: samsung: Use NOIRQ stage for Exynos5433 clocks suspend/resume Date: Thu, 06 Sep 2018 18:02:35 +0200 Message-id: <20180906160236.4326-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180906160236.4326-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsWy7djP87rL/CdGG1zYyWSxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr486v56wFd7gqGnf2sDYwTubsYuTgkBAwkTg71b+LkYtDSGAFo8Sd8+dZIJzPjBL9 1+6ydzFyghXNO3gKKrGMUaLl0xZmCKeBSeJWcxsTSBWbgKFE19suNhBbRMBB4vOn14wgRcwC jxkltp78ygySEBaIkWj5+AzMZhFQlbg86woriM0rYCMx49UvZoh18hKrNxwAszkFbCVu73sF tlpC4CurxNdrV5kgilwkZp85yghhC0u8Or4F6lYZicuTu6Eamhkl2mfMYodweoDOmLODDaLK WuLw8Ytgq5kF+CQmbZvODAkOXomONiGIEg+JRQt6GCH+nMAo8WDeT8YJjJILGBlWMYqnlhbn pqcWG+WllusVJ+YWl+al6yXn525iBEbc6X/Hv+xg3PUn6RCjAAejEg/vA6OJ0UKsiWXFlbmH GCU4mJVEeN2rJ0QL8aYkVlalFuXHF5XmpBYfYpTmYFES5+XTSosWEkhPLEnNTk0tSC2CyTJx cEo1MKaI8gmLV4vxO5REzlppmGbLab3vTW99flNzBJ8I3wfXmLjP2T3uuiLpqpscg+Wvbtr+ KS/hzcRQM9NUhvQZK0XUt/Rf5+lQKFrLebVMPSPP66nqxnNLHz2/OI+vZ520+8zXi575aLRv Lf72MFY46NvaD8V8Sz4GrTK0OrPy2qGe5xOdVy9aosRSnJFoqMVcVJwIAGh2esi0AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xy7pL/SdGG7ROkLbYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CVcefXc9aCO1wVjTt7WBsYJ3N2MXJySAiYSMw7eIqli5GLQ0hgCaNE16H/TBBOE5PE y5UrmECq2AQMJbredrGB2CICDhKfP71mBCliFnjMKHFu8QZWkISwQIxEy8dnzCA2i4CqxOVZ V8DivAI2EjNe/WKGWCcvsXrDATCbU8BW4va+VywgthBQzYXeU6wTGHkWMDKsYhRJLS3OTc8t NtIrTswtLs1L10vOz93ECAyVbcd+btnB2PUu+BCjAAejEg+vhenEaCHWxLLiytxDjBIczEoi vO7VE6KFeFMSK6tSi/Lji0pzUosPMUpzsCiJ8543qIwSEkhPLEnNTk0tSC2CyTJxcEo1MF7+ n81/Q2Ev++Fnu0s+7vfzUZS7Lpn69sD0bhkGQ573Fx8XFF+KzrN+FRE+6fbnMCbOyyphCW+/ zxPafj7PpTzNhkdIq2KR9A9d9/7Z6x0Ffp+91mo07R/rgj89Mm4hOtLT1Ay/ZLTcPnZ53oOP bvEFd8rnKKU7T71w2vK94zXOd+yROZJTfJRYijMSDbWYi4oTAVRe+MoRAgAA X-CMS-MailID: 20180906160245eucas1p257fef879d3bb6127cb1afa6c357a953f X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180906160245eucas1p257fef879d3bb6127cb1afa6c357a953f References: <20180906160236.4326-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 SoC clock drivers should suspend after every other drivers in the system, which are using clocks and resume before them. The last stage for calling suspend device callbacks is NOIRQ stage and there exists driver, which use that state (dwmmc-exynos), so Exynos5433 clocks driver should also use it. During the same stage, clocks driver will be always suspended after its clients as a direct result of proper device probe order (deferred probe reorders the suspend call sequence). Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski --- drivers/clk/samsung/clk-exynos5433.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c index 162de44df099..426980514e67 100644 --- a/drivers/clk/samsung/clk-exynos5433.c +++ b/drivers/clk/samsung/clk-exynos5433.c @@ -5630,7 +5630,7 @@ static const struct of_device_id exynos5433_cmu_of_match[] = { static const struct dev_pm_ops exynos5433_cmu_pm_ops = { SET_RUNTIME_PM_OPS(exynos5433_cmu_suspend, exynos5433_cmu_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; From patchwork Thu Sep 6 16:02:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 146114 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp46332ljw; Thu, 6 Sep 2018 09:02:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYBqYR2TTIcGIWppesU9h5T31oQLqJ9VjVI/IeXpH4s2SzUWjdrkOYoQ8+TrBz4ytGO2Xgk X-Received: by 2002:a17:902:8345:: with SMTP id z5-v6mr3327920pln.147.1536249772854; Thu, 06 Sep 2018 09:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536249772; cv=none; d=google.com; s=arc-20160816; b=VQVltybwQwvv1gwsVWmNDj8pftPkPUK61jSB60JPzoE4nsiAcFQpAAXHWg1pCaRix7 wp4nHHWUZGXv7owyTGq37yGIiSzO6ERBgK2Q5jtb1UJP4vkV1wx9b6ESVH5wfTYWDjWl n6sbi8tJfNz93OVpmckFj1gpYYbno9+9PBrUkHTAT4p1k7qTRQl4ranQ29pxDxX29TrS 151eAQ90tp9vKd0XmziJi5OiV7MU3iPWHT79ChtG7zTlF10YruQxVTGb7+OY/x94qTbX CpYLxP+SFMwTWP1C0QoRuaUD5rmupngP8ACD1xp1LeeinS6vVtyI2OTVHRoAVooiUCJL ZTbg== 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; bh=s6tMQDXwoHCpyPI0OdJe0S0CyuPiDdL1giPkipFMtnc=; b=ChNdxSi3T39gRNBS0H9x0PaaJYcjys1lEnbcNQ6cW8RlfmsN0tzm0oG5DChHs9Pgwf 8NCWwsckMil93NgTHskW1YZrTeDEiCwO8Wj/jDfxVhmGNflfYU9hrINuU+xAmj5qc1hY 3N8loCW72+LpPX6JakvTqEnGr9oa3qOu/okLAUNpjtBBK1ct2zZRLEfQ0nAV/OP1KmZb t204032mKmGUrCIHyhVeAEvs34L3PPq8j7QTTrKDKcBDtN2S+9Y6nGQ0BCdwJaTQ8XWB +JmHttLvUQt/u+VKYzE8/rtywFyO1PUwyxNiiJXeErEYwL5ljVpJJ6+w49PjBhWFVYX8 l0wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=gHWgcQiS; 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 z9-v6si5053617pln.462.2018.09.06.09.02.50; Thu, 06 Sep 2018 09:02:52 -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=gHWgcQiS; 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 S1730333AbeIFUi7 (ORCPT + 3 others); Thu, 6 Sep 2018 16:38:59 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:32782 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730292AbeIFUi7 (ORCPT ); Thu, 6 Sep 2018 16:38:59 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180906160247euoutp0200647222002dbe1badfe1f20f0d9fbb9~R2wYrAKCx0328203282euoutp022; Thu, 6 Sep 2018 16:02:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180906160247euoutp0200647222002dbe1badfe1f20f0d9fbb9~R2wYrAKCx0328203282euoutp022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1536249767; bh=s6tMQDXwoHCpyPI0OdJe0S0CyuPiDdL1giPkipFMtnc=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=gHWgcQiSW5hhyFmGpDWvx7MaT+PwgqtlD9HkzxOFVGlEnMCGYz2bfEBweMltA9b50 uHipFKj9wP785khBuSYwGVvqvcChEF+nC0DmU+gKX41exaPgeryR8jX64rqo6AS/Vf 1u421X4y7p03eNdMQk8XIX8Yu+fGI7uy+FYxkDxE= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180906160246eucas1p13aa2642090d3c85c25fa88487c0109ea~R2wX8Gw280302503025eucas1p1v; Thu, 6 Sep 2018 16:02:46 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 1B.C1.04806.6AF419B5; Thu, 6 Sep 2018 17:02:46 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180906160245eucas1p2800b51c95c9433501b06d92ca0f1aa94~R2wXJ2auX0478104781eucas1p2g; Thu, 6 Sep 2018 16:02:45 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-0b-5b914fa6b10a Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C0.6D.04128.5AF419B5; Thu, 6 Sep 2018 17:02:45 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PEN0037W5WGAX30@eusync1.samsung.com>; Thu, 06 Sep 2018 17:02:45 +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 v2 2/2] clk: samsung: exynos5433: Add suspend state for TOP, CPIF & PERIC CMUs Date: Thu, 06 Sep 2018 18:02:36 +0200 Message-id: <20180906160236.4326-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180906160236.4326-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsWy7djP87rL/CdGGzz7KWCxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3aL96UtmB3aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoEr48T5S+wFB6Qrns9aztrA+Easi5GTQ0LARKL9xi/GLkYuDiGBFYwSk3/cZIdwPjNK zLp9nAWm6suzuUwQiWWMEu/2b2OGcBqYJG41tzGBVLEJGEp0ve1iA7FFBBwkPn96DTaXWeAx o8TWk1+ZQRLCAgkSc/e1gjWwCKhK9Lw7zg5i8wrYSOw/9g9qnbzE6g0HwOo5BWwlbu97xQIy SELgK6vEu+N7mSCKXCR+XXkNZQtLvDq+hR3ClpG4PLkbqqGZUaJ9xix2CKcH6Iw5O9ggqqwl Dh+/yApiMwvwSUzaNh1oHQdQnFeio00IosRDYu/pV2wQf05glNh5eA/zBEbJBYwMqxjFU0uL c9NTi43zUsv1ihNzi0vz0vWS83M3MQJj7vS/4193MO77k3SIUYCDUYmH94HRxGgh1sSy4src Q4wSHMxKIrzu1ROihXhTEiurUovy44tKc1KLDzFKc7AoifPyaaVFCwmkJ5akZqemFqQWwWSZ ODilGhjb7cp1NocnyJnlvfn84ujiv4/mS0rwKcT82T7lmaCyoXlG7ZxwXc7X81WmWZ6ranfu v8N65Gftr93Z50o7dJqeRqzW2toUs47H46LK+gXlInfdxH3yjRW+/vWYFLMu0aI3YB/7wwUh sZ+Pvf303qe8ve6xVd9p50MXl0+VPd6WeX4Fs19P40QlluKMREMt5qLiRAAZdoYktQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLJMWRmVeSWpSXmKPExsVy+t/xy7pL/SdGG3xuN7TYOGM9q8X1L89Z Lc6f38Bu8bHnHqvFjPP7mCzWHrnLbtH+9CWzA7vHplWdbB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CVceL8JfaCA9IVz2ctZ21gfCPWxcjJISFgIvHl2VwmEFtIYAmjxLKVJl2MXEB2E5PE y5UrwBJsAoYSXW+72EBsEQEHic+fXjOCFDELPGaUOLd4AytIQlggQWLuvlawBhYBVYmed8fZ QWxeARuJ/cf+sUBsk5dYveEAM4jNKWArcXvfKxaIzTYSF3pPsU5g5FnAyLCKUSS1tDg3PbfY SK84Mbe4NC9dLzk/dxMjMFC2Hfu5ZQdj17vgQ4wCHIxKPLwWphOjhVgTy4orcw8xSnAwK4nw uldPiBbiTUmsrEotyo8vKs1JLT7EKM3BoiTOe96gMkpIID2xJDU7NbUgtQgmy8TBKdXAOP/I /Sq/Fsem+lthjwp38BwsXufeyZA80ZkzZAdb0AMbkXKDt69+2HfEbvrml+bjmH1u3lYBu2CP 24/sIoPPCvLOr6g9nXbw3NHGhEMyG3TeLvJ2F31j1qP94JbLr24j7/T7zkcfqa3aqSKk15zv 9bXZhfeB/rYb9g8dVot5b+e0XVF22KZMiaU4I9FQi7moOBEAfHznXhACAAA= X-CMS-MailID: 20180906160245eucas1p2800b51c95c9433501b06d92ca0f1aa94 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180906160245eucas1p2800b51c95c9433501b06d92ca0f1aa94 References: <20180906160236.4326-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 Before entering system suspend, one has to ensure that some clocks from TOP, CPIF and PERIC CMUs are enabled. This is needed by the firmware to properly perform system suspend operation. Instead of adding more and more clocks with CRITICAL flag, simply enable those clocks directly in respective CMU registers using 'suspend_regs' feature. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski --- drivers/clk/samsung/clk-exynos5433.c | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.17.1 diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c index 426980514e67..13384f4911c7 100644 --- a/drivers/clk/samsung/clk-exynos5433.c +++ b/drivers/clk/samsung/clk-exynos5433.c @@ -177,6 +177,15 @@ static const unsigned long top_clk_regs[] __initconst = { ENABLE_CMU_TOP_DIV_STAT, }; +static const struct samsung_clk_reg_dump top_suspend_regs[] = { + /* force all aclk clocks enabled */ + { ENABLE_ACLK_TOP, 0x67ecffed }, + /* ISP PLL has to be enabled for suspend: reset value + ENABLE bit */ + { ISP_PLL_CON0, 0x85cc0502 }, + /* ISP PLL has to be enabled for suspend: reset value + ENABLE bit */ + { AUD_PLL_CON0, 0x84830202 }, +}; + /* list of all parent clock list */ PNAME(mout_aud_pll_p) = { "oscclk", "fout_aud_pll", }; PNAME(mout_isp_pll_p) = { "oscclk", "fout_isp_pll", }; @@ -792,6 +801,8 @@ static const struct samsung_cmu_info top_cmu_info __initconst = { .nr_clk_ids = TOP_NR_CLK, .clk_regs = top_clk_regs, .nr_clk_regs = ARRAY_SIZE(top_clk_regs), + .suspend_regs = top_suspend_regs, + .nr_suspend_regs = ARRAY_SIZE(top_suspend_regs), }; static void __init exynos5433_cmu_top_init(struct device_node *np) @@ -822,6 +833,13 @@ static const unsigned long cpif_clk_regs[] __initconst = { ENABLE_SCLK_CPIF, }; +static const struct samsung_clk_reg_dump cpif_suspend_regs[] = { + /* force all sclk clocks enabled */ + { ENABLE_SCLK_CPIF, 0x3ff }, + /* MPHY PLL has to be enabled for suspend: reset value + ENABLE bit */ + { MPHY_PLL_CON0, 0x81c70601 }, +}; + /* list of all parent clock list */ PNAME(mout_mphy_pll_p) = { "oscclk", "fout_mphy_pll", }; @@ -862,6 +880,8 @@ static const struct samsung_cmu_info cpif_cmu_info __initconst = { .nr_clk_ids = CPIF_NR_CLK, .clk_regs = cpif_clk_regs, .nr_clk_regs = ARRAY_SIZE(cpif_clk_regs), + .suspend_regs = cpif_suspend_regs, + .nr_suspend_regs = ARRAY_SIZE(cpif_suspend_regs), }; static void __init exynos5433_cmu_cpif_init(struct device_node *np) @@ -1547,6 +1567,13 @@ static const unsigned long peric_clk_regs[] __initconst = { ENABLE_IP_PERIC2, }; +static const struct samsung_clk_reg_dump peric_suspend_regs[] = { + /* pclk: sci, pmu, sysreg, gpio_{finger, ese, touch, nfc}, uart2-0 */ + { ENABLE_PCLK_PERIC0, 0xe00ff000 }, + /* sclk: uart2-0 */ + { ENABLE_SCLK_PERIC, 0x7 }, +}; + static const struct samsung_div_clock peric_div_clks[] __initconst = { /* DIV_PERIC */ DIV(CLK_DIV_SCLK_SCI, "div_sclk_sci", "oscclk", DIV_PERIC, 4, 4), @@ -1705,6 +1732,8 @@ static const struct samsung_cmu_info peric_cmu_info __initconst = { .nr_clk_ids = PERIC_NR_CLK, .clk_regs = peric_clk_regs, .nr_clk_regs = ARRAY_SIZE(peric_clk_regs), + .suspend_regs = peric_suspend_regs, + .nr_suspend_regs = ARRAY_SIZE(peric_suspend_regs), }; static void __init exynos5433_cmu_peric_init(struct device_node *np)