From patchwork Tue Apr 18 02:20:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9684879 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 AC9DA6037E for ; Tue, 18 Apr 2017 02:20:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69AC827D0C for ; Tue, 18 Apr 2017 02:20:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EAE827D5E; Tue, 18 Apr 2017 02:20:14 +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 1BECD27D0C for ; Tue, 18 Apr 2017 02:20:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753250AbdDRCUM (ORCPT ); Mon, 17 Apr 2017 22:20:12 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:9528 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751739AbdDRCUK (ORCPT ); Mon, 17 Apr 2017 22:20:10 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 18 Apr 2017 11:20:07 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 2C34D641BF; Tue, 18 Apr 2017 11:20:07 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 2278C28070; Tue, 18 Apr 2017 11:20:07 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 21CF228084; Tue, 18 Apr 2017 11:20:07 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id MAG11330; Tue, 18 Apr 2017 11:20:07 +0900 X-IronPort-AV: E=Sophos;i="5.37,217,1488812400"; d="scan'208";a="240859471" Received: from mail-hk2apc01lp0208.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.208]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 18 Apr 2017 11:20:06 +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=8AjBdSE93SKsWAnK/3GkjQZRAG3h+zDOSK4X6VQqNyw=; b=CJTeeW/+tOsaQ64nUxh2zxfIAoYFs2asgAulTzATlkPwWVLO1TsGxAu1sWBVR9HoFYrvRlmEX2UuZI+Swn2G5qJcFru4PNCCOfj3fPTpfquYQXmGKf7JRSKiVdtDUw99sDpkLhmF8KBmJ0w/6wSmwLqLgcM+l3KZ2MzyCxCgyZc= 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 SG2PR06MB0823.apcprd06.prod.outlook.com (10.162.198.149) 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:20:03 +0000 Message-ID: <87pogaxxyb.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/3] clk: cs2000: select 12.20 High Accuracy on LFRatioCfg 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:20:03 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSXPR01CA0052.jpnprd01.prod.outlook.com (10.167.144.11) To SG2PR06MB0823.apcprd06.prod.outlook.com (10.162.198.149) X-MS-Office365-Filtering-Correlation-Id: f099b607-6bf3-4c18-d2f0-08d486016ce0 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:SG2PR06MB0823; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0823; 3:yIZWAPMhwgilHMlHXQAYv3IcEgVVH9NauxQ5TAjb9R8ZZF9c6aG8mj/5fOMFzTAArv6nHKoJRnMiUWTVDKcpiP9SWoXwNqzUUs5evu/3DG9FTl030qh+EiFJs0epUBdrpwtCW2qdyHRnk9wDOJyRF47opJy2GDRZfiHCgAinQFkqRwydvBhSYxZPvNvdEblov9iF7t0z5aaj232ESoJuoVrc+0o+LDRzljuEGIKzLOVp2ddCxyt0YSs7IwU8uvFZWkcCQYEITOXqCRIQ87Io74iKVEyNk4XVEzS16TVXKo+MWFuABrQy+23QZuiQr0bnV3fXH7Ty6LJY1Z4fkHVel8pcj1h/Rfb/KipffyT+dgI=; 25:4mVWGSZGwDudp5L1yMm1zWS+YCJ+ZVchI6Rpct6GBnuKyZL2qQqq8vMD1Ii4/jThevcnxaTYYo2znGzdjb7M96ch5Bef+qUamiIPvdLZJYdH7o0wcQZhDoRPb2Kh2Ot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J9vKGpFDPoKYM1UzcNwHLNR27C4+Z6+kbwYzTyvrwEy83LUnTpWHZ0Mu3gMrRnbubHpiqQ9IXRq+fCM9+sT8pkbg71ekEb8PFkg+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(6072148); SRVR:SG2PR06MB0823; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0823; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0823; 4:5An1e4mPeA2umo6OSek18RXChXrwv19hf2J0yngNG6IalAf6N70tgrflJ7J9R7Y80lebK5lz81TlkecR++4fU1TICTQB/4IeizBGwYbe0+MsL0P7l4iMU6/wtVV+q9eaFKUTUqF1xOTnea911jFboubR7deQyXHn6BWirjiALPT6Q0GjL1VQR9Axc73fQkeSC/IYTUdAEzSpXmeLryEi/HTyP3mPwKaBd4Yq9t2pPbpdlGRj9+5HcPWHjfMKJGZT0GHo8ZOoTCZD3NKYgQZxQbx57dzmJgEDoqdWDnKSq1kHEwX0hEjDKNMNsqH6G9mi4CR2EZi5aZryYXabgDqWFWgKdzZoZQEc31Hr54Vbrg2BciGIa70O+LwyWxecrYuiq2FBlmvSOY+Iow8dIKixg29G54OCKdRLIhBeXYAsSXF40joqgFSfCkKXfiROlCuOm8sYfaJk0n70OYJnI3zxNez8KPHAlPgkBKpDFQxGnJD/SQ3Dcr/Tao2Y8VxespBeXF8MEAS//u1TSQIflSE6lcbIFSheeGQFiFEXjJksTBIVQGF1OlIr1jbV/L8pMa+tZDdhHxgPow9n69tgcXyYlK1baO4R+ldUabL67izZve+15RcRmbqMl9gsmxf0ICL4rch4lp6li0W0bg0Y1XpAHxc3ImaeCQh0Y3L0ZwddEEB0kKheNSKQPg+ZY0y+KZN5Zfyjow1OZAfto2xDCB80sSyPgFkXQv1fbGEx1sCWNx4= X-Forefront-PRVS: 028166BF91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39400400002)(39850400002)(39860400002)(39450400003)(39840400002)(39410400002)(8676002)(33646002)(38730400002)(4326008)(53936002)(25786009)(42186005)(5660300001)(36756003)(575784001)(2906002)(83506001)(86362001)(305945005)(76176999)(4001350100001)(23726003)(47776003)(6116002)(46406003)(3846002)(189998001)(54906002)(66066001)(81166006)(7736002)(2950100002)(50466002)(6486002)(54356999)(50986999)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0823; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB0823; 23:YzifI2x7+fYhRtE9iJhCAoUeF5EbUObSMXmhR6rKJ?= =?us-ascii?Q?9aLOBXeMIwOcMfF0O16JcOfrGyAextTQhYFWSHhSUazRXBq1Iy3VoISqiSuF?= =?us-ascii?Q?8FmOfG8B6NHKbmu82GSyZ1P9bMtMcgXqU2Yxu64YTtDXIv9pgGQFGEFSRfZ+?= =?us-ascii?Q?FzmcbH+ZBVHnk0ASMDKiMKYqwTGbHjF40ygGkthDfTeOY8uj+AVsPSZCayTL?= =?us-ascii?Q?rnb8nMWIZ+oTuu+ja84T7ouRtn/XV4+Ohph+TLJ4tuaObxf+dCsvlrHdFC/J?= =?us-ascii?Q?z8s09dmpsMwaVZbge6FFft0D1Bx7JcyCYHf0+LfgkfAaai4phYVTkPqHMs6I?= =?us-ascii?Q?8uWgCQ0miu8duIDjWhYY1GDfsMzISLzXyd2EcWUT4Gi1+Cm3h44fp6dO7rrH?= =?us-ascii?Q?PQxyR8AuOpQNpS2yUvwKL2VYNU03RCDnMjgpwCeyckcWhWt8g8tSs1kfvMaP?= =?us-ascii?Q?3XHsUwCxh5Zuodm325T+Fv/+OZl0X6ZTMuIfh/tLLUjgnPGLpuMpQbIgVbHD?= =?us-ascii?Q?JPCqKNFdxdQWeELVwNOiOF6Xub1VJBYaccNAiF+ESti3B6g7KODMOExgFekW?= =?us-ascii?Q?Atm98cy6En/il3L3/+j1fUbLzOJNBwj32YtoDOcE8aRxZTRhtkl1gIGuRKln?= =?us-ascii?Q?cFD2spYWUWIepM9OgUZu31agzvV5WxK9MhN8izZCFpHATJqKX4hqn2RVrb45?= =?us-ascii?Q?b/CZiESidomzL4bbRWCLBiPe2j5birkbgivMJTwFsTfIhxeHn2HYrDD2f69t?= =?us-ascii?Q?EBUcloyHc+uRVv6Pso457tvxkEBQ04sMPZQkc7XWLBKpvgnfCYDDQ7tCiq4G?= =?us-ascii?Q?9lp+5f53pk7w7DSJix72XeBJUKvR9wGdwUyhgbDoI2X2C9TNnLn7OfeRO84Z?= =?us-ascii?Q?OAqM06yT/y86YSkiLcZRKGAiZP5JPLtAakGUmhpV5fkhqB//g1kxsOnkpsrA?= =?us-ascii?Q?WCpr8SNiHV3iE02Rl/vYnzZZvKwSDagA0WC6otzfZhNosKbD4E+F74MP8smj?= =?us-ascii?Q?HK3MdTIzLqLEwZ6EpngxCAhZ+l6fSFx/lX5abie5vivWvlX3GF/UQ70le8F9?= =?us-ascii?Q?ZlP+JA=3D?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0823; 6:1Kvyp65huMm06Ji/bWkWztM0Os3bLKqBOi87rilO1PVothMwe3Y0QuZ9OQ96CqiLyJuHGDkyWdXnMVl/I6nOmQfR2nzZEGIwgrke9pYU8bhc14dNo6mDNTj0iWSjVQ5lP3WNYuV+vfZBbqdmXU2ji+RdJBS8VoGNfh1FL/jbciX+hYbIj52ggYvWIcURrj0QbgPzMQdc3zNMkFsfmpNXjzFQVAkL8ZEXwSXali0LahMG+LSAhQYbj674vDJFTI2PFQCGpVkDh+C8J+dFihDXDhWt97XfWt0FlnLaEi3hmxrQF61TpGtdvH5vVCkwMD3gI6Tb76eD3XNO7w0wTssM4Q/bdpDYvyORcZu0B/ttwRnuGu5R22Qx3RXyHx+pV/oE+eKIWjCDLgXZSmiie0FGQ+LGjx7SZmA8d6TZ3h/+NHCZ1cbFFdeAJUFD1vCsHSBQoQ9ze+/c7+ZzWhEhC9Sdr1LLwjNISTVFvqoxaYwUqYY=; 5:hIRoLuDclHfCj9IV/L8xye/yGkMAknQVkpndEoADs7lT2Q/1PWesWhonbSD8CBbEjuIjtEPzgqFnGfZTc8gxPA9yvN4tRf/DvxW661B2cqTcwX1+RMw1VhjETVtmY88HWvLUvKTAjBsspNl4Bmb4pg==; 24:ZdXSIj6plZNdVJDeI045ULcn0alrMYFeftilaK/vGWVneleH7qc3kVwDnGZip6IIMmisK5Qg7lRXS9+CKSl4cBsUneaI/7Sp5CnhQdwZU1I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0823; 7:oplbv9l8ttsstE8hPlRjBWU1lO8RyoBtdz2TyQmoIWsY2x1+yfEIGYvLkUhYx+EWZ6PurBHExmljjsrlneLrG9K/W+rpZjfIaI3mDdgzBij6CGlSb8Eio+3i3vW/wiAjPYD/C3LxuUJ4trAhH5PVfgFb4F8NB4EPmdnYMkZKNivZfA7yBdXfetuJZC8XdBkSiVAqSGurS3gM0PPaM/jhz1OYHwpAMR+r8wUS8X99ICjqXjbH1W9tghUjuJi+eRsjUONRSmul/RghFRXsC55DESgAqEZslzo4J7ISfaFcNSoNZnY/RmSlxek33XsYKmBMAUzG7ntT1xR0I2wIv0yCkw==; 20:+S86FGkRT4GjyT5ydakJURVMwUg6pirdb/lXDAr2jq1DvNoRYTArEBhynF3wF4OmjbqsnpH2dSiLt+wX1FOWL+aqsQL9W+sJ/hOpOtyFB8H/Aistaf9WyfR/xMcJxyTzk9W0esZSez+Dx3KDytK2h1tprmRcnrZQa+HHOVnijpE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 02:20:03.9309 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0823 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 cs2000 can select Static/Dynamic ratio based Frequency Synthesizer Mode, it can select 20.12 High Multiplier interpret for 32-bit User Defined Ratio if Dynamic ratio mode. Otherwise it should select 12.20 High Accuracy mode. Current cs2000 is supporting Static ratio mode only, so it should select 12.20 High Accuracy mode, not 20.12 High Multiplier mode. This patch fixes it. Signed-off-by: Kuninori Morimoto --- drivers/clk/clk-cs2000-cp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c index f3ab0ca..c54baed 100644 --- a/drivers/clk/clk-cs2000-cp.c +++ b/drivers/clk/clk-cs2000-cp.c @@ -60,6 +60,11 @@ #define REFCLKDIV(x) (((x) & 0x3) << 3) #define REFCLKDIV_MASK REFCLKDIV(0x3) +/* FUNC_CFG2 */ +#define LFRATIO_MASK (1 << 3) +#define LFRATIO_20_12 (0 << 3) +#define LFRATIO_12_20 (1 << 3) + #define CH_SIZE_ERR(ch) ((ch < 0) || (ch >= CH_MAX)) #define hw_to_priv(_hw) container_of(_hw, struct cs2000_priv, hw) #define priv_to_client(priv) (priv->client) @@ -130,6 +135,12 @@ static int cs2000_enable_dev_config(struct cs2000_priv *priv, bool enable) if (ret < 0) return ret; + /* FIXME: for Static ratio mode */ + ret = cs2000_bset(priv, FUNC_CFG2, LFRATIO_MASK, + LFRATIO_12_20); + if (ret < 0) + return ret; + return 0; }