Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbdGaM0q (ORCPT ); Mon, 31 Jul 2017 08:26:46 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:62456 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958AbdGaM0m (ORCPT ); Mon, 31 Jul 2017 08:26:42 -0400 X-AuditID: b6c32a46-f790d6d000003bf5-37-597f21ffbe21 Subject: Re: [PATCH] clk: samsung: exynos5420: The EPLL rate table corrections To: mturquette@baylibre.com, sboyd@codeaurora.org Cc: cw00.choi@samsung.com, krzk@kernel.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, b.zolnierkie@samsung.com, linux-kernel@vger.kernel.org From: Sylwester Nawrocki Message-id: <33f53903-9043-29c0-2cb8-e5d6950cc92f@samsung.com> Date: Mon, 31 Jul 2017 14:26:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-version: 1.0 In-reply-to: <1500635990-19474-1-git-send-email-s.nawrocki@samsung.com> Content-type: text/plain; charset="utf-8"; format="flowed" Content-language: en-GB Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPKsWRmVeSWpSXmKPExsWy7bCmhe5/xfpIg8ZGbYuNM9azWlz/8pzV 4vz5DewWH3vusVpc3jWHzWLG+X1MFhdPuVr8ONPN4sDh8f5GK7vH5b5eJo9NqzrZPPq2rGL0 +LxJLoA1issmJTUnsyy1SN8ugSvj2C/Ngs/sFU+WNbM1MK5h62Lk5JAQMJHo/7gRyhaTuHBv PZgtJLCDUeLTRc4uRi4g+zOjxMQXU1ngGtr/sUMk1jJKTDqxiwXCuc8o8ax9JnMXIweHsECA xJftJSANIgKGEssn7GQGqWEWWMIo0bC5H2wFG1Ci92gfI4jNK2An8XHfFLANLAKqEss3fmEG sUUFIiS2fZ/BBlEjKPFj8j2wGk4Bd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xec1b5gmMgrOQtM9C0jILScssJC0LGFlWMYql FhTnpucWGxUY6RUn5haX5qXrJefnbmIExua2w1oBOxibzkUfYhTgYFTi4dWYVhcpxJpYVlyZ e4hRgoNZSYT3t0J9pBBvSmJlVWpRfnxRaU5q8SFGU6D3JjJLiSbnA9NGXkm8oYmlkYmBmZmh kYGxmZI474TALxFCAumJJanZqakFqUUwfUwcnFINjHLc2Rczs5Z87+NqdD0hYt9/WbR6rfDt 2VfuO3y3DpZ8GitsIrVwjo3CIoGKval8977t6OTWT+ZKmnpRQbL/Odci6y+/my59Wun5xWO5 wYm/XPdk+29I7l4eYby2ZMviG1k7P20IYclbfmMil6vJo2BlnS3MGbIpVRpr2VY+CXmeYeZT y9V4QYmlOCPRUIu5qDgRAGzOGrXjAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170731122639epcas2p140df1d3cb9d3e5aec6e702a9992d33f5 X-Msg-Generator: CA X-Sender-IP: 182.195.42.80 X-Local-Sender: =?UTF-8?B?U3lsd2VzdGVyIE5hd3JvY2tpG1NSUE9MLUtlcm5lbCAoVFAp?= =?UTF-8?B?G+yCvOyEseyghOyekBtTZW5pb3IgU29mdHdhcmUgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?U3lsd2VzdGVyIE5hd3JvY2tpG1NSUE9MLUtlcm5lbCAoVFAp?= =?UTF-8?B?G1NhbXN1bmcgRWxlY3Ryb25pY3MbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 102P X-CMS-RootMailID: 20170721112008epcas5p1eb75e4eb00d1dbad130460d2cbc0ce0c X-RootMTR: 20170721112008epcas5p1eb75e4eb00d1dbad130460d2cbc0ce0c References: <1500635990-19474-1-git-send-email-s.nawrocki@samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 983 Lines: 28 On 07/21/2017 01:19 PM, Sylwester Nawrocki wrote: > This patch fixes values of the EPLL K coefficient and changes > the EPLL output frequency values to match exactly what is > possible to achieve with given M, P, S, K coefficients. > This allows to avoid rounding errors and unexpected frequency > being set with clk_set_rate(), due to recalc_rate returning > different values than the PLL rate specified in the > exynos5420_epll_24mhz_tbl table. E.g. this prevents a case > where two consecutive clk_set_rate() calls with same argument > result in different PLL output frequency. > > The PLL output frequencies have been calculated with formula: > > f = fxtal * (M * 2^16 + K) / (P * 2^S) / 2^16 > > where fxtal = 24000000. > > Fixes: 9842452acd ("clk: samsung: exynos542x: Add EPLL rate table") > Signed-off-by: Sylwester Nawrocki Stephen, Mike, Could you apply this patch directly for v4.12-rcX? It fixes code added in v4.12. -- Thanks, Sylwester