From patchwork Thu Nov 15 22:40:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10685191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 444FD109C for ; Thu, 15 Nov 2018 22:41:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34FE52D4FB for ; Thu, 15 Nov 2018 22:41:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28E3A2D53E; Thu, 15 Nov 2018 22:41:59 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 C3BE12D4FB for ; Thu, 15 Nov 2018 22:41:58 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=HAhM7KXpclcX7+V5lh4+ucDdzfWaco5D2nfQIBvqd+0=; b=L69i7GIyfJ5oau RcxHAayhD9G2WKsNN96ASsJebhPUwsSbQRFEwWAK+1wZyjH/z7MD3K2LFZJHINps8qKtDtw4wfsyp 4o7J2waFieWwfHqWg3HJSRNEvV7GKm6ZmjHM05EwNgMF0e/2HzEAnZLE8NGsGDdrslBXVahEL7HLV 6EgXLWzk9Nh8jTKkGRBUxFw38VxdiwzcTCt/16zoELUw1uFVvmQVwrNe6q7bt2dvg4Ocb2bd8bSeb BRWABF7e0jQDveMecsF/GuVEk/kDMpKppXfzg6HAcWmBvln9a2ro4EHspD8jrDVL4TR2KkulMZXVh 6+HKwJFd+zW8p81vLOow==; 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 1gNQKj-0001wc-1W; Thu, 15 Nov 2018 22:41:57 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNQKH-0001OY-V4; Thu, 15 Nov 2018 22:41:31 +0000 Received: by mail-wm1-x342.google.com with SMTP id r11-v6so20268351wmb.2; Thu, 15 Nov 2018 14:41:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VgKwrWYvBpPwZu+JHqxzLiLOxskcy+PR9OfxhhLd1fo=; b=SHNCJWdyrTxI/X9eUqSIzECcQzWO/j6cBNxO5ayG3BjhBzczB7ufloPaBI+32YCU1M gmyxghnapEAlt7T5OxhBOrD+4axSydnqulwLBQa0rloZRYCdWse86wX4F1HCPLpzSsMr GQoDwXdfqrnt1hhQ5MNeWMlvzsducyPNcqbOb3LVNmVC/GiUz3PJqRxC90PwMJtvt8BB e34zQ8KuxtS3ugMTsgVhrqaeWp5RR0n8vFpNLqU0zPpcMyao5kAqrIaq5vYk9T69cTiE 1nCnpPA9KUSPjEPEjT8So2ZisqKhJQLvO61b6s+DoKCy+5TeaiIomH3+h5UOLS4m6aEF desA== 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:mime-version:content-transfer-encoding; bh=VgKwrWYvBpPwZu+JHqxzLiLOxskcy+PR9OfxhhLd1fo=; b=cgazDLhJiJfOS1JPkM3As35Oz+A0WXjDovMsPSpPJJRBPvBBa3m/TTkSV3qkM6s9NV YKs/0MzByYtDgjWe8angjI8PuAoBUrPLHTKTfpL9Fq1fFSwYcZX9n7L3xWtIzR9oQdrU lS2n4JHnAXLe9A0ccBn37+Y1GmBIi479nVHdySLOEtfJqWYspzUgmkFa9DfeuZGlo811 GyVnBg5JTFpXo52sHudXp3XtkC/1hfwimgrwVjsrCzS+sY6pkfKoikz3N4qd7KX9Reks Y7KYE4CnyiPq+zEu8b/Lu9dzGFmyainb7JNrYVJknoMu4X1RyM7MvGTdcaUJWLdz2A22 AKEw== X-Gm-Message-State: AGRZ1gKif50bKffnfIpq6ls/ot1jgI1CKPd2ewe6ceFu5Bohsxl0XjfS B04RUaPD2X5ALFVAZ3RymBlUpr/x X-Google-Smtp-Source: AJdET5cPbHQqh4dqF/sRbQymwaCkpgtWXSON8bLvuhgQinRizG3akn8pQbQXPvi+SP3Rez37ZVRkVg== X-Received: by 2002:a1c:6382:: with SMTP id x124-v6mr7004135wmb.145.1542321678962; Thu, 15 Nov 2018 14:41:18 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD717A100B85ACE585A885C51.dip0.t-ipconnect.de. [2003:dc:d717:a100:b85a:ce58:5a88:5c51]) by smtp.googlemail.com with ESMTPSA id x12sm2076388wmc.37.2018.11.15.14.41.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 14:41:18 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, jbrunet@baylibre.com, narmstrong@baylibre.com Subject: [PATCH v2 3/6] clk: meson: meson8b: mark the CPU clock as CLK_IS_CRITICAL Date: Thu, 15 Nov 2018 23:40:45 +0100 Message-Id: <20181115224048.13511-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115224048.13511-1-martin.blumenstingl@googlemail.com> References: <20181115224048.13511-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181115_144129_993538_6A7FF3B6 X-CRM114-Status: GOOD ( 16.60 ) 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: sboyd@kernel.org, Martin Blumenstingl , mturquette@baylibre.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We don't want the common clock framework to disable the "cpu_clk" if it's not used by any device. The cpufreq-dt driver does not enable the CPU clocks. However, even if it would we would still want the CPU clock to be enabled at all times because the CPU clock is also required even if we disable CPU frequency scaling on a specific board. The reason why we want the CPU clock to be enabled is a clock further up in the tree: Since commit 6f888e7bc7bd58 ("clk: meson: clk-pll: add enable bit") the sys_pll can be disabled. However, since the CPU clock is derived from sys_pll we don't want sys_pll to get disabled. The common clock framework takes care of that for us by enabling all parent clocks of our CPU clock when we mark the CPU clock with CLK_IS_CRITICAL. Until now this is not a problem yet because all clocks in the CPU clock's tree (including sys_pll) are read-only. However, once we allow modifications to the clocks in that tree we will need this. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet --- drivers/clk/meson/meson8b.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index a96bfee58a61..41a5025364f9 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -646,7 +646,8 @@ static struct clk_regmap meson8b_cpu_clk = { "cpu_scale_out_sel" }, .num_parents = 2, .flags = (CLK_SET_RATE_PARENT | - CLK_SET_RATE_NO_REPARENT), + CLK_SET_RATE_NO_REPARENT | + CLK_IS_CRITICAL), }, };