From patchwork Thu Jan 18 18:45:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 125005 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp247238lja; Thu, 18 Jan 2018 10:45:49 -0800 (PST) X-Google-Smtp-Source: ACJfBosZD+ie7q2mU/b8Kj8cyuALxJhYYK/YkRqw+1/0zxie5tkGqLuOQM5BJzcbRnJkNnkjVr0Z X-Received: by 2002:a17:902:760c:: with SMTP id k12-v6mr238792pll.438.1516301149078; Thu, 18 Jan 2018 10:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516301149; cv=none; d=google.com; s=arc-20160816; b=ciRic6kKtc0voDK5nK12M3agQoSlcsr5R3lXq/mmhjxJKroD2tAF3w/2ERv74jdmw+ XEQERQzxVbXqr6L9gCgYRcgjjmuu6r4Cm1FUz9/lEPJFvEzhHgd2TOeT4iAK63tg67FE XGcnvQ6Bfd2gwBSBssIUXLRTQ02DcItIZxM3uK4XzYy4JRc9QBn8AhmO0AK3ksoEYRcu I2lbNMD5ChdDWE/qkqPKQWNspNB/sgHVszqm3dw4Ldm8MVY+wKVExk3cmxracgnKUsRW psT/NPj904t1Z/xz2KEgf6dvUl6qHCdmsVJUA5sHJ9vngYZBgFXYURpw16RFJwvXYsYC RIQg== 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=R6GpeAYtWpRxuOoEQheg8v/Osi3TIzDy3Z35Dyd1Ffk=; b=Te5e74Fo+4fd8OqsfkbKStyMANKQKUXkFdwZhWsBhoxUFCMnXEzzExp0y0aUZbwiQk VAGIgpcnMK7s0dvo3swnCL3jDcx8lzKtqyR7E61/2d3ALSk/XkDyZ5mKW+9apgiKdZVy 0mBH7OkAFo65NeXi7Xn2asGkUe6F04pr4EYmQs7hmjoE/9dxB+eJgdXD37BBbACteLls dmmAhsg8KJdbHYtd/HVlNR/heqwfVdFBumSEInT8tXr8nrs1GDDPVsS2BCng8aIg2mCt cu+LhsX3MlicyVN4ilNwNFOP8emTP7PJimLXyfBUZ8fL96UYTuR2eK3J9bfa0Mx1fUy8 y9pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=yWJyoCuz; 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 a11-v6si113495plt.567.2018.01.18.10.45.48; Thu, 18 Jan 2018 10:45:49 -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=yWJyoCuz; 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 S1755938AbeARSpr (ORCPT + 28 others); Thu, 18 Jan 2018 13:45:47 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:46540 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932687AbeARSpo (ORCPT ); Thu, 18 Jan 2018 13:45:44 -0500 Received: by mail-wm0-f65.google.com with SMTP id 143so23823511wma.5 for ; Thu, 18 Jan 2018 10:45:44 -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=R6GpeAYtWpRxuOoEQheg8v/Osi3TIzDy3Z35Dyd1Ffk=; b=yWJyoCuzWqfY61qjknzbGGU/Ju3u66tSFbRli9Ym2AS7IsxdbRxEaCoKCmZeIHYtwV rQZYjyGMGKjDsVX2pgck6sTmlnCJJ7Ni4JPmRAUUvXW6hSCDffojI5wEeUUCSoaQc7hx iEb/HROYZOhPYjjvjCj6MW1N/21lgJkVYLlW2XDuDVuGmkU/+q/q1XN2MBl87Wk42aiA NRvsJD2Emn0OSsWzbnrWku1ZY2pBVLQILV9GfC+vV7kgnobYnnD5opV4nodx5ZsjENOs mpZTwH/nE09GtTIWTRFXaPmw6wy9kNUsGifiD/uzMW9QqICGuC+xvzm0SVRvTqR3zSyu wSkA== 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=R6GpeAYtWpRxuOoEQheg8v/Osi3TIzDy3Z35Dyd1Ffk=; b=EyQ4J1K+OZAKTqyG/lp6eAUQ2bF5YJmBZXAv+sfoKi8jztr4gWPeGlcZbO2IA0LGLf gq25oy8SzfZklXuaCf6hSd1KJ4c6/+t9I7TPaXDlZviEz/rZUjeBva74THjLe2i0nG7s WJt6QSZtiwk2w8XRXQa/yl+Bq+myDwwn4AXPx/nxv1Im/M5Dm0GZmoprqU5X+MvSoOyG kVgRzejw5Ky41X6NpsKDikHRX2fUJhMfa//1QRWDfSHBc+CQrhAvAG9/Luo256gM+i05 RY/mQlfsDELL1pc1tJ0l3v6QGf4zdX5xLX0WA9KtN+Cc4bGnLIuY2rkwBojT4VSEWEpK SxGw== X-Gm-Message-State: AKwxytc+VSedBIIGXBOKsLFZCmywkVFIJYroYjhKZvyeZoi6DasUqk93 PZT+46vTFzGdqb3kGF6NUauhNA== X-Received: by 10.28.199.201 with SMTP id x192mr5635429wmf.45.1516301143444; Thu, 18 Jan 2018 10:45:43 -0800 (PST) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id y62sm6240236wrb.48.2018.01.18.10.45.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 10:45:42 -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 9/9] clk: meson: axg: add the fractional part of the fixed_pll Date: Thu, 18 Jan 2018 19:45:32 +0100 Message-Id: <20180118184532.6856-10-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180118184532.6856-1-jbrunet@baylibre.com> References: <20180118184532.6856-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 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",