From patchwork Fri Jan 19 15:55:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 125180 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp352048ljf; Fri, 19 Jan 2018 07:56:22 -0800 (PST) X-Google-Smtp-Source: ACJfBot2N5yWxFCCCycYiNs4vjkQ9GkGUuTbxaEpx3N2ViDXFBSTSNeWrPwBdnXaf3BIZyehVBse X-Received: by 10.99.103.198 with SMTP id b189mr17760376pgc.20.1516377382214; Fri, 19 Jan 2018 07:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516377382; cv=none; d=google.com; s=arc-20160816; b=pHC1KOh4SDPjv++R10OocuosafVaf/x8bVUPqByw4G5Hj/6yUuX0HG8DKKtwUx4sB4 ga/Qm3jELs7aPPybkpe9OMF/CZhHQL5EhMlJIRILcEeKEow6EVotcGknRIBJvCNVZnW/ /UVDO4DblhuFUSJHdD3iNze3SB+kRjh+owRH0Z4/Dba4ADJwaN3n20C6J5z7a+MKlxsL Fdv+a4kvKAznem8hIK+wkdqxu9jcYqJzzxkTZi8GwrHXIgZ2ukpZz/epCh3jeKvgMM4l aQ7sVHXgpNCjk+5lxPgvK4Po7wrRtqaq8T7ZXbke5v+RH3kk0wCclQiKcbZGvGTMoeQ/ KVkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=KgnQBcE56NWdw22o9fdu3QwtERy/H2F+PybfghNo9cw=; b=qEA1BijbZxhhbDde3Qg9JGAttcIKv2gruIN8wXsnXWEpVYCqZnQvv+K+tFqoNbw2dn WFqsrn9OiscOtD36433bd7ISH/9KR/EfvbNuy0KzQ7i6lcWbZMuEy45UauYNlV57KT5J 6/Pebx1lGZH9tbXi8OsjHQ+vU2Q4BTKxmFUjCI4rhbVW/Z/+1nO/E9KTIO4cnbqMyajb Ljxj/qJdAbIjJs023n56IV4i+YaZS04BRb09qIl/UFt6Opkh0EHsVmCJ9Gf65YFrgQgU W8Kt4zRI0KAGW+KoovkE+2tOQUXfKZjzY7oWI5mpdx79YRgJitSgXUD6xDBCyCOWzXuP Witw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vq9tFj5Y; 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 b188si8496146pgc.452.2018.01.19.07.56.21; Fri, 19 Jan 2018 07:56:22 -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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vq9tFj5Y; 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 S1756040AbeASP4U (ORCPT + 28 others); Fri, 19 Jan 2018 10:56:20 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35673 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755932AbeASPzn (ORCPT ); Fri, 19 Jan 2018 10:55:43 -0500 Received: by mail-wm0-f68.google.com with SMTP id r78so4497751wme.0 for ; Fri, 19 Jan 2018 07:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KgnQBcE56NWdw22o9fdu3QwtERy/H2F+PybfghNo9cw=; b=vq9tFj5YzYwNqPcAdAB8WgYYzLxVg5HhhMlMamj5HtCY9Ndau/V02K9C5TL3JrtcdH 5ThGStOHlS4xcX5SRpr8LmKqu2WvAhpK6/m3iQnZZGEhrNiQoA2uvBm83MjVYcvvtO+0 rMiqJ1/vRUSzIiysbgINQrIo4i8HSKEQVVQmlKA7u2KjXAJbbqinep7L5qS3fEX1T0aM jMwOcMCokG7L0oazGnLPFGQqoWUQrD6EHMhrbNaqs77E5PhyknyCLUyCjoaVbuGeRIJD ClVCGiQkJlqKwQ1Tg4nD4Ani73J28iiBOwEXLfOe0Qx4AAXpkZAE76A86OrmamVO7TCS OA+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KgnQBcE56NWdw22o9fdu3QwtERy/H2F+PybfghNo9cw=; b=h8cE3DG/hCDw1zqmD/+xwjSX227ZjqSumCShcATHvvPjwtnwZ0tgeVs4SEcFyGkrVY u6ebGX+l5dOyy6nVtcihafd/DJSP0NS/OEcQpnDVVli0sYK2mEgpoUdFYnlEW2fpeund ntEZtAKR8WMpw8k4gqby/lhUxvLwEP+x6V5V7kqGNzu1cF1Or3xFIYfbQOP/965JX3kS 9tDGA/OZ9BD/0VLfyLhCM0ILfaB1cqcwOsWwFQzhqFuQImNh3HolKvc9suJv1k0k9njG jsmvAhvUNQwMHTmGf1LfrVs6aEytQ7tj2DGjKbcEzgtteAGWi/R36ccShRbidUXKhdEE t2Ug== X-Gm-Message-State: AKwxytcUeRzFQydm62qCf79x3vOPI1DsIp8GdOgz7MnLXSgr+mKtXVbq P06rmdru7kiLqlmBI7fWjVkX0A== X-Received: by 10.28.38.133 with SMTP id m127mr7908311wmm.40.1516377341514; Fri, 19 Jan 2018 07:55:41 -0800 (PST) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id w73sm25883027wrb.34.2018.01.19.07.55.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2018 07:55:41 -0800 (PST) From: Jerome Brunet To: Neil Armstrong Cc: Jerome Brunet , Kevin Hilman , Carlo Caione , Michael Turquette , Stephen Boyd , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 9/9] clk: meson: axg: add the fractional part of the fixed_pll Date: Fri, 19 Jan 2018 16:55:29 +0100 Message-Id: <20180119155529.11532-10-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180119155529.11532-1-jbrunet@baylibre.com> References: <20180119155529.11532-1-jbrunet@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The fixed_pll also has a fractional part. On axg s400 board, without this parameter, the calculated rate is off by ~8Mhz (0,4%). The fixed_pll being the root of the peripheral clock tree, this error is propagated to the rest of the clocks Adding the definition of the parameter fixes the problem Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers") Signed-off-by: Jerome Brunet --- drivers/clk/meson/axg.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.14.3 diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 56806c6bd9d5..953e119635a2 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -37,6 +37,11 @@ static struct meson_clk_pll axg_fixed_pll = { .shift = 16, .width = 2, }, + .frac = { + .reg_off = HHI_MPLL_CNTL2, + .shift = 0, + .width = 12, + }, .lock = &meson_clk_lock, .hw.init = &(struct clk_init_data){ .name = "fixed_pll",