Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3418763imu; Mon, 24 Dec 2018 01:20:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN7AREeUxVADMwBjPjQ/XCJjFEwi/Zy9kEDoRYwPDUrb+Ocp5dXqzQsbELW4z93YtTiwTkgr X-Received: by 2002:a17:902:8ec9:: with SMTP id x9mr12441596plo.27.1545643240218; Mon, 24 Dec 2018 01:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545643240; cv=none; d=google.com; s=arc-20160816; b=RWD5i48uwKAn6Crmf5BNogoFFDACGL9KAKVOmwe7U28U+dBJRVuX1BpIc2b2JbTW26 ASVabEpcSaGkSEiS2xdttUZiLcbV6ZFuO+2gwyhvYkqVZBREj94jrGg7NFL2E0kaoaIJ hreaCxKGprGFT2WaGJMxFIUxckCtvTFc9ZsyaiG+W78hfXh6M6Pt+hI5vZQzl3xzWvyJ XtbUuGUg9TXfECTh40dfaoCK+C9svXW/kLBAR86nCtF259/hnxwuib8Tkq8sG0zeFqnE J1iNYyO6pcqo1ykqAJh9RNDzdj4A6jdhqa6AwCfERM0xnXkixUxPou0osaeEkF9bOxgX EpIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KD1k60KdJUb0OSCG6FIffFdzLS0yfRdfVC/tAWWyO78=; b=II4qH398BGz8+jF8ttlhGyL0hUXYj9psVxiXmMQltmp0oWXlJQV+O4mdPMf/ovxpMy MvwvMUxrzLkQTSdUFX6XBJBbdpXasuRJUUqlQoN9hWq27+HLsvPymWENqG4FT0bh/vRZ hEAratBzixfak1L4Ca55PGRr+grF5NUcpEdEvIrH/JfJe3x76u4qdaCM1xfKYNp5eecq T6KZHjkZ7i8b3WbMrSf4Lrlhxyqqpm4YjpHRe1u4flr36dk0PnQsSoZS1Y+FxXD5/joj 3hMP7KneYSTP9GYjosfNsA+6ZtvFsCWaBFXKQ0RLtf+6GKl6NDMMXcAJ3QDtSuJ6rIdC OVSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68si27605597pgd.437.2018.12.24.01.20.25; Mon, 24 Dec 2018 01:20:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725830AbeLXJSa (ORCPT + 99 others); Mon, 24 Dec 2018 04:18:30 -0500 Received: from gloria.sntech.de ([185.11.138.130]:38338 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbeLXJSa (ORCPT ); Mon, 24 Dec 2018 04:18:30 -0500 Received: from [46.183.103.8] (helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gbMNT-0003RC-Ne; Mon, 24 Dec 2018 10:18:23 +0100 From: Heiko Stuebner To: Katsuhiro Suzuki Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: rockchip: fix frac settings of GPLL clock for rk3328 Date: Mon, 24 Dec 2018 10:18:22 +0100 Message-ID: <1898630.x4fnsSTjcx@phil> In-Reply-To: <20181222164249.25620-1-katsuhiro@katsuster.net> References: <20181222164249.25620-1-katsuhiro@katsuster.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Samstag, 22. Dezember 2018, 17:42:49 CET schrieb Katsuhiro Suzuki: > This patch fixes settings of GPLL frequency in fractional mode for > rk3328. In this mode, FOUTVCO is calcurated by following formula: > FOUTVCO = FREF * FBDIV / REFDIV + ((FREF * FRAC / REFDIV) >> 24) > > The problem is in FREF * FRAC >> 24 term. This result always lacks > one from target value is specified by rate member. For example first > itme of rk3328_pll_frac_rate originally has > - rate : 1016064000 > - refdiv: 3 > - fbdiv : 127 > - frac : 134217 > - FREF * FBDIV / REFDIV = 1016000000 > - (FREF * FRAC / REFDIV) >> 24 = 63999 > Thus calculated rate is 1016063999. It seems wrong. > > If frac has 134218 (it is increased 1 from original value), second > term is 64000. All other items have same situation. So this patch > adds 1 to frac member in all items of rk3328_pll_frac_rate. > > Signed-off-by: Katsuhiro Suzuki applied for 4.22 with Elaine's Acked-by Thanks Heiko