From patchwork Tue May 15 16:36:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10401633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C51E601F9 for ; Tue, 15 May 2018 16:37:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 795B727FA1 for ; Tue, 15 May 2018 16:37:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E36727FB3; Tue, 15 May 2018 16:37:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E3F8327FA1 for ; Tue, 15 May 2018 16:37:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xsgeLikCUA9Vreqxh7DSaDc2RFGl8nHrCRx/IBgEcFk=; b=tMF4vSZznBy+K2t5hv4HPjKc4A YOj+YY1oPkNy7TmYZvFyuoAlIrLjURAervg6npH2X/3Cp/Wdjed5cnlRrs2jiTtmy8WM96hPZY4v/ 1NKKIvF8UdNbuiYb0gielErlwSQfz2jUG0daENWKw37n98IQzLVsqqeeCWhDvpqe3MR1bw4Ypa0it kqwRk/zRjIgQnOUPr9gLzYLH6N1A9eMoALh7KoE1Nv1oywJ3JYNpbu2WrtpMrfmqjk4LtyElEeKoN NO8HZ3kbFkiShfDHrNqwL8PeN9JmA6uO+GyOyrkyRTgHdCK6u41cPOqOjUrolYEG0ilghAWiIyILU xVE7M51g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIcws-0004Z8-NC; Tue, 15 May 2018 16:37:14 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIcwo-0004SH-35 for linux-amlogic@lists.infradead.org; Tue, 15 May 2018 16:37:12 +0000 Received: by mail-wr0-x242.google.com with SMTP id y15-v6so806540wrg.11 for ; Tue, 15 May 2018 09:37:02 -0700 (PDT) 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=xlipNCPIHP1kQTkEVMNyH8fmfI1WeuC8PKe0sQw0lXc=; b=iXwcbowPaNntU4YP6MBD2f0Xtj/H8eYZ9UwPnTs5zT87gKl7ibsBX+FTDOL5pTnI6A j04WOxHB5Ay6d9rWdPtzoS0N9T5Axc8HjXkCXOeLfZ3oK30OjjVBe27rL3narFdiCfxQ QYrXXM/k/9CmAMDhHUivTTd+WbwngPMvXHe9WCR68ez/c95Uhvw5P2m2vkuh2NpSLwmd Af7QNLkimIG6XWRB+BdCaaRmVLtV96T97RwzC8kACWIUmB0uMwp1TPb5AUKCx3dn54df N1lGJ2lXXxTiyoZt0B0qmlK/c1ccvr/ZXsu2t2GCY4zFFDCwnVsKpmgxmGOYY9G/KO3x GMQA== 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=xlipNCPIHP1kQTkEVMNyH8fmfI1WeuC8PKe0sQw0lXc=; b=qVxaOGV+/qg41Ph8z3VIZsA/1OcNP8fkLnRyJImwJbXzN0DVf6YQUN0t4Al0f1ldyU PeEcjaplY6w+HUcIBp0U7YTc+8FTYJWxEH9FxyPif34h15zHvhUVXzJ50aRC8JV4MccZ OdJup+AFiku/O88GOcO86fkiu820JKltnJQAgq49oi0e4AVeOmYJrdx9+bOtttOH8kKt VDCrlq8R5OH44SZT8JGb61f/jrexoOxUR4CUzZzhyUVz5hkPxGghn/QkQjZy3tdgCoK3 4Yk7O1/fsba1OCLI0VAtIYt78KG8ovFO82wkzdZ4hWwvKfy1ZFTAmp4BdqDr7mgbzU6l gcAA== X-Gm-Message-State: ALKqPwfLkwh9MLFgIQ5FyfM5VKmYbE95GeFPZz5BmE6pnKv1LTyuaYfL e0JjPK37T0jtXOSE0oyxksOUkw== X-Google-Smtp-Source: AB8JxZr6s6qG3rlv2bkPOjamZG7BTIqvS7WUedrfW2u36SWw275Qx0ardRM71tk7pBhG+LIPcatUWg== X-Received: by 2002:adf:92a5:: with SMTP id 34-v6mr10301084wrn.226.1526402220205; Tue, 15 May 2018 09:37:00 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id o12-v6sm637317wrf.31.2018.05.15.09.36.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 09:36:59 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Carlo Caione Subject: [PATCH v2 2/2] clk: meson: axg: let mpll clocks round closest Date: Tue, 15 May 2018 18:36:52 +0200 Message-Id: <20180515163652.19980-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180515163652.19980-1-jbrunet@baylibre.com> References: <20180515163652.19980-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180515_093710_165810_8C82FA64 X-CRM114-Status: GOOD ( 10.55 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Let the mpll dividers achieve the closest rate possible, even if it means rounding the requested rate up. This is done to improve the accuracy of the rates provided by these plls to the audio subsystem Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong --- drivers/clk/meson/axg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 5f5d468c1efe..bd4dbc696b88 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -461,6 +461,7 @@ static struct clk_regmap axg_mpll0_div = { .width = 1, }, .lock = &meson_clk_lock, + .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ .name = "mpll0_div", @@ -507,6 +508,7 @@ static struct clk_regmap axg_mpll1_div = { .width = 1, }, .lock = &meson_clk_lock, + .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ .name = "mpll1_div", @@ -553,6 +555,7 @@ static struct clk_regmap axg_mpll2_div = { .width = 1, }, .lock = &meson_clk_lock, + .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ .name = "mpll2_div", @@ -599,6 +602,7 @@ static struct clk_regmap axg_mpll3_div = { .width = 1, }, .lock = &meson_clk_lock, + .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ .name = "mpll3_div",