Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757419AbdDRCUP (ORCPT ); Mon, 17 Apr 2017 22:20:15 -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 X-IronPort-AV: E=Sophos;i="5.37,217,1488812400"; d="scan'208";a="240859471" Authentication-Results: codeaurora.org; dkim=none (message not signed) header.d=none;codeaurora.org; dmarc=none action=none header.from=renesas.com; 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") Content-Type: text/plain; charset="US-ASCII" 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+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mz+q+WTjlVmMOmFaYx+E4vdXpeDZK2KsD/pgo+V+aRCv4HyqcXspoKjssmbRar/NH025Svx47hRA4U1k+6BjolOz2AdDBd+Gua3bjHm0bt5q19lqqnINQ2v6EzlEd102c/3fOrr+QuX57PSfyIwDhKUCLUVEDJs07IJSJLyvxce/3X4/r12X551I9jZphw/W9N8m+tHEKSA6iyvXUyHv25n5nvOglcfHnwjMsXyiLj0y74m2fF0pp1CcQ4iw8d69O/h4N8ZpTAHqWHSnonv0nhdJvJTFByinciE4GMky3hvFPMjnMewjwaXtMRU7Oq7MC1FkPmfPtLY81i6c3IX7gIEMx1TWcK1YOVddq0MOgCp6YXChWPneK9YmqUEilTYXhLZtJ9vKGpFDPoKYM1UzcNwHLNR27C4+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+ZBVHnk0ASMDKiMKYqw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SiVAqSGurS3gM0PPaM/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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1441 Lines: 47 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; } -- 1.9.1