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: 10586777 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 4D0C9679F for ; Tue, 4 Sep 2018 06:50:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CE7E29002 for ; Tue, 4 Sep 2018 06:50:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 285E128FFC; Tue, 4 Sep 2018 06:50:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9D8328FFB for ; Tue, 4 Sep 2018 06:50:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727625AbeIDLOQ (ORCPT ); Tue, 4 Sep 2018 07:14:16 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:33450 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbeIDLOQ (ORCPT ); Tue, 4 Sep 2018 07:14:16 -0400 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: , , , CC: , , , , , , 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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(+)