From patchwork Mon Feb 19 11:21:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 128796 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3386271ljc; Mon, 19 Feb 2018 03:22:11 -0800 (PST) X-Google-Smtp-Source: AH8x224IRqysQfDvYhPX9Kuh6ZO7bzpgJmcDE3XHRby6J0fyRM6wX13TTiQF45rz2tQyG3UKG1NA X-Received: by 10.98.48.2 with SMTP id w2mr14224207pfw.162.1519039330941; Mon, 19 Feb 2018 03:22:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519039330; cv=none; d=google.com; s=arc-20160816; b=MOEh5S3vp8GIc4ibGyDtEMW41lZhlNV9n87Fuipx0515cYQ3+FR3aM0BliRW3Ip11d z0eESYLXI6G2mAL6KNMQS3vTW26wnvaLaOdp6lEfSReG0uVuYRRfY+5esFZI4JdpI4h0 9Ar6mObrfmPyBerCOV8GGycLr8p7LJXe7OfkivnMv9CSnzbNYtj/sDTKaXt4a00WaFY1 tKkt+SbJnVV3r3NYjJVbNs2jzh5zj6gvLN5WSRnBZ5meNvsvorEX3s3TCUfPrIlYuYpd J3/l/Wyz3P/SdshKfbxyJkAgeBHiApADcGHK9TGpW1VlSDBapU1xrzTb1kUh3g6cthyP jSMQ== 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=wZ3KYyC/zT9t3YFdfnGzODD+0sCUbeq7akUN7EbrVHM=; b=LezRS94pJ7L+VNhm2jBj7BqiVJ9KfTJTdlcewetjLA3FR+Z+QbslL5yNkoD1mFFkC9 0I4v5KfWQzRRpXc3sRag/bsPCZ5lhSn4EhWemDeaGSeLspqhmTerMFpUhEHlZchIbry+ IYUVGy0feZSqIbl5IypgAAmYpttD14mP68P9At3Mk3peHNFZN+QP16su2elQThDjmdy2 cxohnJBDERKSyc9nJgctY6yWUEqXgs7FIrAbf0SRitqWN0w4+KJ7VQcsdhcTSn0QSH2w KGOPhMlC8bng9r731ACV54N03/F2M7d6w2FLLGleLMySUAS3wAjPvSFTF5IQqCcQpw6M QngA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=gurbyezq; 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 72-v6si5904010ple.299.2018.02.19.03.22.10; Mon, 19 Feb 2018 03:22:10 -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=gurbyezq; 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 S1752704AbeBSLWH (ORCPT + 28 others); Mon, 19 Feb 2018 06:22:07 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37710 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbeBSLWE (ORCPT ); Mon, 19 Feb 2018 06:22:04 -0500 Received: by mail-wr0-f196.google.com with SMTP id z12so3074561wrg.4 for ; Mon, 19 Feb 2018 03:22:03 -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=wZ3KYyC/zT9t3YFdfnGzODD+0sCUbeq7akUN7EbrVHM=; b=gurbyezqrJ4/AIyv/gJrb6sEEKBXWXjZjzHyxrdS89ny1n6cLo26IU1H9CPucMx3Jp o72ZRMpwn0DQIofrnrWXICqgGvSv/SzpBkbEpbcD5gtOtalN3DX5yvJBsFeD3k6Uzwsw jvnf0VDRELA3EyK4eW/YkmuKRJ0Wi8CSdEiMNOtqb2ykOaId/qccckiJPfYWACeU1z++ 6bHt9Fogu2nEBBwBnUCcJn0c2mqKmjg39QuXgklI4hazqSoU07TNGnLUnfdJ8FEYuESA zA4zKMGCTIVU7TrqjPBdR7CNAg6/FdYa3B66ODZgwHa79YLr+iBmL0QmwCZma5t/CMTj 0Mdw== 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=wZ3KYyC/zT9t3YFdfnGzODD+0sCUbeq7akUN7EbrVHM=; b=hXHvi8IGqBJOxsBwnG6DRKPb7WmlFrKneLMmzpDO+bktoAa38kM5FO+irG8t5PY+8g G3q4HwLLJQmZGYZ+b3MAk8PKrzssq6NvgHE36PNXqHGWm5+g3S+puqPVB6ttOEVgPUHK 0DsqORfwcGJgHAebMNiQou/5u2DkTaJMEKYrtsE9RfGIujeTERnzh0gy28Hd6uFFJERn 1+0issVbMVq0buYkt2ecdpYU7srFb5uFoqj4RXXXnEWVH5DuOVxs7rIHYqrB3B3JRsVi 8FD4N91IbXa/AjeIl5Y9PHhcixxPQiMMCQmYy1my/wldoq+/d71P9sDl7O9A/tJnTmtP A8oA== X-Gm-Message-State: APf1xPAh5GnlFmkWbLnsjB8ZTeZMXtIf4JIvQ1rCBm5pj1x7xE3a6Ei8 0EvgXSJcexTEiI3DIqmkRLGYbw== X-Received: by 10.223.169.229 with SMTP id b92mr8786452wrd.244.1519039323278; Mon, 19 Feb 2018 03:22:03 -0800 (PST) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id n20sm8933978wrg.84.2018.02.19.03.22.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Feb 2018 03:22:02 -0800 (PST) From: Jerome Brunet To: Neil Armstrong , Kevin Hilman Cc: Jerome Brunet , Stephen Boyd , Michael Turquette , Carlo Caione , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] clk: meson: clean-up clk81 clocks Date: Mon, 19 Feb 2018 12:21:46 +0100 Message-Id: <20180219112146.21746-12-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180219112146.21746-1-jbrunet@baylibre.com> References: <20180219112146.21746-1-jbrunet@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clk81 is a composite clock which parents all the peripheral clocks of the platform. It is a critical clock which is used as provided by the bootloader. We don't want to change its rate or reparent it, ever. Remove the CLK_IGNORE_UNUSED on the mux and divider. These clock can't gate so the flag is useless, and the gate is already critical, so the clock won't ever be unused. Remove CLK_SET_RATE_NO_REPARENT from mux, it is useless since the mux is read-only. Remove CLK_SET_RATE_PARENT from the gate and divider and use ro_ops for the divider. A peripheral clock should not try to change the rate of clk81. Stopping the rate propagation is good way to make sure such request would be ignored. Signed-off-by: Jerome Brunet --- drivers/clk/meson/gxbb.c | 6 ++---- drivers/clk/meson/meson8b.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) -- 2.14.3 diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 70b4669cf7d6..db5e0dcbb5aa 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -775,7 +775,6 @@ static struct clk_regmap gxbb_mpeg_clk_sel = { */ .parent_names = clk81_parent_names, .num_parents = ARRAY_SIZE(clk81_parent_names), - .flags = (CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED), }, }; @@ -787,10 +786,9 @@ static struct clk_regmap gxbb_mpeg_clk_div = { }, .hw.init = &(struct clk_init_data){ .name = "mpeg_clk_div", - .ops = &clk_regmap_divider_ops, + .ops = &clk_regmap_divider_ro_ops, .parent_names = (const char *[]){ "mpeg_clk_sel" }, .num_parents = 1, - .flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), }, }; @@ -805,7 +803,7 @@ static struct clk_regmap gxbb_clk81 = { .ops = &clk_regmap_gate_ops, .parent_names = (const char *[]){ "mpeg_clk_div" }, .num_parents = 1, - .flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL), + .flags = CLK_IS_CRITICAL, }, }; diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index 9c9e3d180120..b324c44d36eb 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -506,7 +506,6 @@ static struct clk_regmap meson8b_mpeg_clk_sel = { .parent_names = (const char *[]){ "fclk_div3", "fclk_div4", "fclk_div5" }, .num_parents = 3, - .flags = (CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED), }, }; @@ -518,10 +517,9 @@ struct clk_regmap meson8b_mpeg_clk_div = { }, .hw.init = &(struct clk_init_data){ .name = "mpeg_clk_div", - .ops = &clk_regmap_divider_ops, + .ops = &clk_regmap_divider_ro_ops, .parent_names = (const char *[]){ "mpeg_clk_sel" }, .num_parents = 1, - .flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), }, }; @@ -535,7 +533,7 @@ struct clk_regmap meson8b_clk81 = { .ops = &clk_regmap_gate_ops, .parent_names = (const char *[]){ "mpeg_clk_div" }, .num_parents = 1, - .flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL), + .flags = CLK_IS_CRITICAL, }, };