From patchwork Tue Sep 4 06:49:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 10586789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5829314BD for ; Tue, 4 Sep 2018 06:50:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4618528FF9 for ; Tue, 4 Sep 2018 06:50:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A26A28FFC; Tue, 4 Sep 2018 06:50:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6DB128FF9 for ; Tue, 4 Sep 2018 06:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RBBOoNEhNVNjNx6QtLP4daQgwKIKhUpGK0En/DEsZ18=; b=bjzQhoXywam/9c 5C16ESnm6loPGZyGoWbt+bmGaK5pVt2Q9iMhWeRoNFA2q0zZZZOzFvz9dsyw/BV5kPcPMVDb4RiPT QsiWDzCowrL64V+wnKIUSvV6GiGKjAIs6zCEwA1PJJ/8zbx0jSUj29Rvbc2Fp7LoTrF/CrNR8Cbo+ yDgTIR6iooRvey4D9D1T6Srq834Y2cQZmf3vQYL9oCxrma8qnNYp0NlzJNt8e0SjgGbk7NlR4KPz6 4h2zNWIBdUnNIotf/td2dVJi39s27eEJ++gaxNPxf13nzvK405OktJtuErP2oEoigWlPAza0xCsZt pUKyF86QT7bKqRI/jiqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fx5AY-0003j7-Rv; Tue, 04 Sep 2018 06:50:34 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fx5AV-0003hK-KF for linux-arm-kernel@lists.infradead.org; Tue, 04 Sep 2018 06:50:33 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id w846oEn9082720; Tue, 4 Sep 2018 01:50:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1536043815; bh=/ijK2McLcF2VMrIPfx2s2Iuh9mdi4VkKE5qaLL4JJk8=; h=From:To:CC:Subject:Date; b=XdW60mRnBBDwltxGoIN7Z+PDh522Ggt2laMb1tdPf/tC12TJQfCNGHinDk6u7fgxN aSUR3TTm35t4rulRxClNUZPi//jPdVePhZsokzGFmyt2NtuHQca+J2Oo3aIJvfTpHV 8dFbsX5wftrbtlnh3TkpY0tfbhrLETHjJJMZO1Zs= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w846oECw030149; Tue, 4 Sep 2018 01:50:14 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 4 Sep 2018 01:50:14 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 4 Sep 2018 01:50:14 -0500 Received: from ula0393675.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w846oBca005776; Tue, 4 Sep 2018 01:50:11 -0500 From: Keerthy To: , , , Subject: [PATCH v3 RESEND 0/4] clk: clk: Add functions to save/restore clock context en-masse Date: Tue, 4 Sep 2018 12:19:34 +0530 Message-ID: <1536043778-2232-1-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180903_235031_789056_7CF05C94 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: d-gerlach@ti.com, j-keerthy@ti.com, russ.dill@ti.com, ssantosh@kernel.org, linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Deep enough power saving mode can result into losing context of the clock registers also, and they need to be restored once coming back from the power saving mode. Hence add functions to save/restore clock context. Tested for DS0 on am437x-gp-evm Based on top of linux-next Resend Series: * Rebased on top of Linux 4.19-rc2 * Added Tony's Ack. Changes in v2: * Renamed clk_dflt_restore to clk_gate_restore_context Changes in v3: Corrected the e-mail address of linux-omap list Keerthy (2): clk: clk: Add clk_gate_restore_context function ti: pm33xx: Save/restore clk context based on enable_off_mode setting Russ Dill (2): clk: clk: Add functions to save/restore clock context en-masse clk: ti: Add functions to save/restore clk context arch/arm/mach-omap2/pm33xx-core.c | 15 +++++ drivers/clk/clk.c | 93 ++++++++++++++++++++++++++ drivers/clk/ti/clock.h | 2 + drivers/clk/ti/divider.c | 36 ++++++++++ drivers/clk/ti/dpll.c | 6 ++ drivers/clk/ti/dpll3xxx.c | 124 +++++++++++++++++++++++++++++++++++ drivers/clk/ti/gate.c | 3 + drivers/clk/ti/mux.c | 29 ++++++++ drivers/soc/ti/pm33xx.c | 13 ++++ include/linux/clk-provider.h | 9 +++ include/linux/clk.h | 25 +++++++ include/linux/clk/ti.h | 6 ++ include/linux/platform_data/pm33xx.h | 1 + 13 files changed, 362 insertions(+)