From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750984AbcKEW0L (ORCPT ); Sat, 5 Nov 2016 18:26:11 -0400 Received: from gloria.sntech.de ([95.129.55.99]:58461 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750720AbcKEW0J (ORCPT ); Sat, 5 Nov 2016 18:26:09 -0400 From: Heiko Stuebner To: Julius Werner Cc: linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Doug Anderson , Xing Zheng Subject: Re: [PATCH] clk: rockchip: Ignore frac divisor for PLL equivalence when it's unused Date: Sat, 05 Nov 2016 23:25:56 +0100 Message-ID: <2456323.GVNA1yFAA5@phil> User-Agent: KMail/5.2.3 (Linux/4.7.0-1-amd64; KDE/5.26.0; x86_64; ; ) In-Reply-To: <1478130204-3167-1-git-send-email-jwerner@chromium.org> References: <1478130204-3167-1-git-send-email-jwerner@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 2. November 2016, 16:43:24 CET schrieb Julius Werner: > Rockchip RK3399 PLLs can be used in two separate modes: integral and > fractional. We can select between these two modes with the unambiguously > named DSMPD bit. > > During boot, we check all PLL settings to confirm that they match our > PLL table for that frequency, and reinitialize the PLLs where they > don't. The settings checked for this include the fractional divider > field that is only used in fractional mode, even if we're in integral > mode (DSMPD = 1) and that field has no effect. > > This patch changes the check to only compare the fractional divider if > we're actually in fractional mode. This way, we won't reinitialize the > PLL in cases where there's absolutely no reason for that, which may > avoid glitching child clocks that should better not be glitched (e.g. > PWM regulators). > > Signed-off-by: Julius Werner I took the liberty to clone the fix to the rk3036 pll type as well, which is quite similar and only differs in the actual register layout. As sugested by the above, I've applied this to my clk branch for 4.10 [0] Thanks for fixing this Heiko [0] https://git.kernel.org/cgit/linux/kernel/git/mmind/linux-rockchip.git/commit/?id=bf92384b6d729b22916ba832b4a225ca196e98ba