From patchwork Tue Apr 18 02:18:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9684867 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C8A636037D for ; Tue, 18 Apr 2017 02:18:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4962205A8 for ; Tue, 18 Apr 2017 02:18:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A982127C0B; Tue, 18 Apr 2017 02:18:27 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75D47205A8 for ; Tue, 18 Apr 2017 02:18:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755463AbdDRCS0 (ORCPT ); Mon, 17 Apr 2017 22:18:26 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:8221 "EHLO relmlie4.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751256AbdDRCSY (ORCPT ); Mon, 17 Apr 2017 22:18:24 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie4.idc.renesas.com with ESMTP; 18 Apr 2017 11:18:21 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id E25AB5A6B0; Tue, 18 Apr 2017 11:18:21 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id DC28A28084; Tue, 18 Apr 2017 11:18:21 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id C978928070; Tue, 18 Apr 2017 11:18:21 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id MAH10334; Tue, 18 Apr 2017 11:18:21 +0900 X-IronPort-AV: E=Sophos;i="5.37,217,1488812400"; d="scan'208";a="239978409" Received: from mail-pu1apc01lp0024.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.24]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 18 Apr 2017 11:18:20 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=EGScQmWrord+j5QS4zFVqd3Fe0qEt1lXCh0Fl/YuCr4=; b=Yqs/y5Ufbb0jeuZ0iVIhUPKK0WLkRHBHyigUsektMs/f1SHb+ss5kcvEYASHLA4re9WMC0SmI7md2Bd/B5MeZN+MLYSFIdqgYi/NhaBPES2kqcqP/KKxdOvDo52L2Ucnyygq007BHJGItiB1UoWgiFf1pnhZz5lUpL/BA9DmoUM= Authentication-Results: codeaurora.org; dkim=none (message not signed) header.d=none; codeaurora.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SG2PR06MB0821.apcprd06.prod.outlook.com (10.162.198.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Tue, 18 Apr 2017 02:18:19 +0000 Message-ID: <87shl6xy19.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/3] clk: cs2000: enable clock skipping mode User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Stephen Boyd , Michael Turquette CC: , , In-Reply-To: <87tw5mxy2h.wl%kuninori.morimoto.gx@renesas.com> References: <87tw5mxy2h.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Tue, 18 Apr 2017 02:18:19 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSXPR01CA0033.jpnprd01.prod.outlook.com (10.167.143.169) To SG2PR06MB0821.apcprd06.prod.outlook.com (10.162.198.147) X-MS-Office365-Filtering-Correlation-Id: d9fd1844-348a-4821-f916-08d486012e82 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:SG2PR06MB0821; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0821; 3:try62DJFMax7yrspRgD74PNyBoeqexTZAifdZ3H8AXrohd1o4JmiMWJ3/Zi6yiWNrgO5l6zSEMZxYHCS+8xTkTW5FXOTfWMV6IMTYwbGRyVSPI4Ov4chUutlAJyvPh1Lzq719zSrTqNivmmm6slx5a5cTooqRFImuZNsYz+f6L7TnW/29wXGdvDjEurC1xmwGmUQy6i1THQZ6d0CppWR9gteIBWtipbP6NMI/q4aXQNxPg1Htxwwgu7B0l5z9CJ9fPLmsT+Y2gwUhLmg1+OdqE6Tl239oR9YFu+CfeEqeCO7UBz5oeOiPXu+D4kgs0WkPd0HlftoaF41IgzekMNzH+cXcLiMXc4WpZHqwXSoztI=; 25:9TXNpm88HboTNvAuwWxYR2xJH8Mrf6z3GydyegfDvBYX19qbjMclL5zRuHCDUmh3JPtv0GGBo6EQMEBYoWIxnG/8wQliVUBxEMw24wW8zTZ0m3sx5NN99g4Ry2CXLRD7xv2aOBAa2RElGABUTVVxxE/PWFOxk30RbY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T1WG0+X3mlnej0qvfW/pTFyRiEnfYwROYJhGFcSM2p0jnuLjoGeeyYgOegmYvFYBEvu7pc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:SG2PR06MB0821; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0821; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0821; 4:rm8hJ+KfuTJz6vlKJqqFJEHlvVZgRcxunDIZzZ+ld/MCEyM7D+7bMcUsJXHo0avaPeiI7FuYS6YOF2XDlfVbGH6MydXjOJhyq7w8asS3x+S7UtNEDBmV0MswQDvyF9tQScdVkjSMK8cGHwoo4Jl8svPTCB5A67HdLjlwxR6dKYikHttxAye+UlgmaiDtDqpqE8mnxpVv8EATwU5FEeTClh5XtwxIHbO6oIzDattd4DHKy/qG6THPbHY6J1Ezk1sipsisYm+7Tqvq0H1WGWqmcHnr4V2Jd0kXPszzfFS3ITOzCv0vbecrXWy+7iU6XxzB9UNE/0CXEHbEv1UioEoJi2rIG+DvKFPuFmwVtEETDOrFgfayfQdtZKYr2+6dJ4MEeODlilXPdxlxeSM7nmVtmIIVFVjiOJnPktyTUygt20xk7TzVGFAXMm/twd4Ixw97gkhA0SU2k1KSDapPgGSi3A8EmJU/NM15lgbPf8NFzr4hdwHfT8ku4ea7V5KTt09AJ+qLZfwxD4Hsw57rNuR18JfgcsEPLNN/7XRVgoBMUnHWP79F4LEgflfctQVCSh19VguEbyL5MSZEzju03sNpjIUm7ed2aHbDR61aodsp5JA+6Zim+jhGzYQwhwI4yHvssejHhNK4MQMRQxZL3DfP/xmjsmL8gBd3ax8vLR7saxmIKDgUQZKtb2UJewinfAMfJecdQY3kTG5fCIAYfpA0lEmWSS3muqY6SfAqt3xRsig= X-Forefront-PRVS: 028166BF91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39400400002)(39850400002)(39860400002)(39410400002)(6486002)(53936002)(54906002)(33646002)(4326008)(6116002)(5660300001)(83506001)(7736002)(23726003)(66066001)(47776003)(305945005)(2906002)(2950100002)(76176999)(36756003)(81166006)(54356999)(8676002)(46406003)(38730400002)(86362001)(50466002)(3846002)(25786009)(50986999)(4001350100001)(42186005)(189998001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0821; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB0821; 23:mtBVYNietWsBDeYR2XfR3oOB6RCR+BfeIgIa8zQzC?= =?us-ascii?Q?Hyzo+GoZhDRpVvDytAvJzvjooqLXE2QK29DcwRsJy3yAU89Fewqx1xeqR+Em?= =?us-ascii?Q?/OIgsw23Tnmcn/5cl9v8b055brMztt5wDB3VwjXwV7UNzBJaFBxSkkmS7BrO?= =?us-ascii?Q?EBt+YDiTSTX8xwr98Ex+xmklB/XNiZMGaKnMAmWwRO3A+tAgRwwpO5mxXR33?= =?us-ascii?Q?G7/QX7hjAj2KMDUwLkNt6XPgpZanmV9auj5II6r498i/9y5hqyOhBfFiyDJX?= =?us-ascii?Q?352xkJwls5H6b1at5Ad2e058OtznPMpgcoWWW01w6XDCRTzXopEHG9OzeFjU?= =?us-ascii?Q?5ZTpSVj+DM7xUR870EQtNJUvOrKSuyXpK0P/o1QVddkELO/xsmJxfKWmGAR5?= =?us-ascii?Q?KVkyrQeNyRvVIwz4wUTGD/gIRQXeg2gdO3ey8LznL9RzAuuBCfrP+Dy8YMsS?= =?us-ascii?Q?cmkgnc3fAE9ekVPvC560V+nDl0jz6/zqOK7EwBSiTGPo6sw2IabnJjQFUVLZ?= =?us-ascii?Q?3IWYViSU4W9nMD271sV6/LVPdoZb/xu2cCYTNuqOUOVzZFiDWweiTNXvANSP?= =?us-ascii?Q?b4Ur+C9FgXD1wQ02zys2kpau3tiUP81oXet6ObkrrOFj35prR0R4vwXTvYcq?= =?us-ascii?Q?a3HfYfsr2TTqVso1BLYbDB7S/Lb1VIv7POq8GZKV8gAeZncxam+oRreOj448?= =?us-ascii?Q?gfEYcsaPLhsao9CUgReXDrZw+R/V3e1I37eLgoGtTteftY41zkivAuPQimXV?= =?us-ascii?Q?B8SqbBkEcIK00gKTBxYPSwZ2PEyRPgPAiRaQhAkSEwk5KwwedNSHI8gCzPVW?= =?us-ascii?Q?eLeaoCnleig1zBDw+DYjX0Yi2pLH55bCOI9U/Y0FTIsmTvkNdAwqS4d83H22?= =?us-ascii?Q?vSuabyoQ348nh1ErA3zzg4yg+cHF+xipEFUF9Q+fde/KPLVU72PWbhjrfdDq?= =?us-ascii?Q?xQIiucjTpA7sO3nZvmQI6E9Pq9Kfk0+Q7S5Rg9rC2VctLAr0e0mwSrQUcW95?= =?us-ascii?Q?jE0fdilg0Jbinse5JvGQpEKEN5n+hvRDSqS9YZfCznk9w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0821; 6:tNDfrHyWqhdFJ+G8XoBShxnycghDkGE+4XFvZA1/eeVKXmRvOtN/eK0Gok83r4p7MQXwmLzU0X6th4DzUPFDB7HAV6QCCJugDKGg7Sh3Gxrn9W751d0EwORub3qxvrO0Ossn5aXdVZjlWofMUr5olvXsOJf9iqddj8BVoz+pQbMYh88O1bTyFpgGSWDNR6mosflIOU50LPisf03zE8c10LaHAKZ1EaGMRLZU5/RncKUS7y8WlX/9pUWrek22uYK9LQrxco73E+onTjAYp06GiF1SSicimslgBUpfp3fpIPZGtmtS8c3bgB+vP7A3MGwWqvZxmbsCi9tJBz8OW2nGNSDb072KnHlBI384p7AAvsfB7X2GfqgN6qGW1Bve+4FPr5m/6GrE6+FEYYqQVG2Y4FWNVaCN7v+kjxrYpaTlkBoWK4FEpCOwEQmDM6bxRtkk62HgMUKwSHUyyo2AZG51SOkVjwr/aKske+YUOATjJQs=; 5:hLHhKTdXoz1k2hD3psVQJ5pufFDrznSo+M38b38q+zpocCl6dzgq1LFgQBhP4dJKtTMRrBPuPD/MGzR4YRUKi7qQnVC0tL0jMbb4kOxmUbmZYLbw5OI4+3iM9Awl9ZTgX8tPkfprcbLAuPDJmwTuJA==; 24:z7IpSOLgBfJvU1uTJDMDgYWsjy4EJKwXk9Z0Ac+rWpGhqUnI5tt67i7TxD2Vi8t2LVTBVeqA4xLYV12J21iU2arhEepLr05Y2Fyhl4UKSlI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0821; 7:azndmlK77ULHbZkOY/vMgCr8mdNDOHgayDe0CdCyih4v1c2Edh7xAVxIjjKzpo7hCDWZtSQVlAsYIyuGiJNDDcRL0TnmkoWqZHmf8Te3S7kyyczkX6pZsRVfCaQ1FQE6MoJYeJsnbUEPG491AxfEWoz/qI+Muiif172rBKgi/SqJhH79YXqJBdtNgzTEwgBUqSDGlFjvA1XQ3VVhA+8AG49zDLLDjcFatWUOmfI9DiSekEbroZiKHHF9mbO8bFLOiZ9bGCQDorZqSdfyGChZydQPeMYFQCJ9VQx0B8+zF3vrgKoq6as6VU/szVKLnpnlKzvUnS4SnMU+usZrZw0Vsw==; 20:llV1lAXRXN/yl7Bq0IFzgMwxfwHa+3fJ0DCp/qBJDBUx8B31y3GgOP35odzlurypjudZf7uyGQal5quWH76IMQMtvWLji6ads9DlE6sknAgsHifKHR/H+AJc0AngvxF3K73Ktf9w9cDeqDppsnlTOZqlDXfPJT9vKUFPuHObB+4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 02:18:19.3019 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0821 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto CLK_IN skipping mode allows the PLL to maintain lock even when the CLK_IN signal has missing pulses for up to 20 ms (t CS) at a time. This patch enables it Signed-off-by: Kuninori Morimoto --- drivers/clk/clk-cs2000-cp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c index 4df38c5..a8fa6bd 100644 --- a/drivers/clk/clk-cs2000-cp.c +++ b/drivers/clk/clk-cs2000-cp.c @@ -54,6 +54,7 @@ #define ENDEV2 (0x1) /* FUNC_CFG1 */ +#define CLKSKIPEN (1 << 7) #define REFCLKDIV(x) (((x) & 0x3) << 3) #define REFCLKDIV_MASK REFCLKDIV(0x3) @@ -122,6 +123,11 @@ static int cs2000_enable_dev_config(struct cs2000_priv *priv, bool enable) if (ret < 0) return ret; + ret = cs2000_bset(priv, FUNC_CFG1, CLKSKIPEN, + enable ? CLKSKIPEN : 0); + if (ret < 0) + return ret; + return 0; }