From patchwork Wed Nov 14 22:57:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10683349 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 CDF6B14DB for ; Wed, 14 Nov 2018 22:59:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB3172BFF8 for ; Wed, 14 Nov 2018 22:59:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC25A2BFFB; Wed, 14 Nov 2018 22:59:58 +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 47B652BFF8 for ; Wed, 14 Nov 2018 22:59: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=enEgH4GuUiTB/JB21ntEyYucgp6TR82QN5twaGwQ29E=; b=lMce21DuvtW74i nvoSDIjYlv2DEq3YbL3qHSmekArUPMe/a4nKrpXWsiwcUGUO6skMz30g1zV03P5cbkp0rXlr7JJw1 8qae185KK5AJH7fbtPlQqkai5o5RVLfxq4Y+RxYJJ2p0IfiBLRYES51WA6QCY0HzJPQO+uvd1ms1d l8i9GKoXt/Q6dK6qhI8fdH+gl8hLzqnYDa5PBqVlgofujN+W5PcJMZYpv2A52tM5QvTWhjCfbBcSf 7wmQzGIdG7icLvJWeYNQzLYTXK14VWyAwJHzWhdCocTZqUlaCJ3+Usf88lZ+zmYqhqLBSRrvesCet EImjKFokTII+gpAbzQfw==; 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 1gN48a-0001c9-Gi; Wed, 14 Nov 2018 22:59:56 +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 1gN46q-00088P-Fm; Wed, 14 Nov 2018 22:58:09 +0000 Received: by mail-wm1-x342.google.com with SMTP id f2-v6so16182143wme.3; Wed, 14 Nov 2018 14:57:58 -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=ZpToRpzBghPIlSWFDMTCMs/livATbaezHsbunO8fvSA=; b=mfwiNurd87CBkFA/C87CCGI7bTZ+K1SisLRKZHceabEfVyWOJVuWqtdU8/MlBySqTL 4R2a/szkUVtkj5akRszQRrIqAanz3qMQzkGbtyei5hzHebjhIVtudzNBGtzNFmTv0e1U xDEGax3vKUhrVn+GNGDoEYLn6dPjyzcoCeAwk9VVIRZAyd9I2eY8isqzw9dctG1A8G0T DSsn2B5tjrKbOW04DmqCoTkBbB03lJ4wSaYcGBb2Qm/WrGW88OPO/93YpSK4tkUZX1HH fCljtvglQKZRGsFD2qjT7xsK8nL39DY4Mstq4P+F8KfAJgkMi+8Qn0QYTwFSs9KRIy9o OFaQ== 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=ZpToRpzBghPIlSWFDMTCMs/livATbaezHsbunO8fvSA=; b=R21gC+IXmnVTZegk5zKAu5elJj6YwPCe/CnjwBsYrLsG/kE6seyUgwv79ajkIkuwWg WTFeFV7+RApmDYnfdFTukdR1CuRDVIjLSX2myevKpETieZO4e+gDsf+bhpWvMcseMtze LRo8QcGCOlaYoUR1PgeigpM4eDsNfqMMmbKdQjGKthWtY8NWSFYDh9PpdtPH13X3waQ/ /CN0JuFR7gL9ZMNXROpU9eXMaLbL3XHhETaVkvk3Exs/wkieF7ZHpHryCIud5xHZeGNF 9dwUZ7lmHux4gzG9/WgRxz4DA54JyN/IzS0owM+SQH0yg+h5f7CbLdq+sUH+3Yh6zLED RQHA== X-Gm-Message-State: AGRZ1gJQlL/tE6nOXQts6djspKMos4Q3M7hj6KVHJPHlHcXgvtDgmfJT RBh6XC+gsKlMRhC9k+TRaqWUn3+o X-Google-Smtp-Source: AJdET5fOuZpnAt7CO3ajTrrKSSV+IFgNJfDUQZg3NGopPUo/go919dQlttxbfjiufJQtn9Ky/ZI45g== X-Received: by 2002:a1c:bb42:: with SMTP id l63-v6mr3292207wmf.32.1542236276292; Wed, 14 Nov 2018 14:57:56 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD717A100301AB549B11D5ACB.dip0.t-ipconnect.de. [2003:dc:d717:a100:301a:b549:b11d:5acb]) by smtp.googlemail.com with ESMTPSA id n7-v6sm18987784wrt.60.2018.11.14.14.57.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 14:57:55 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, jbrunet@baylibre.com, narmstrong@baylibre.com Subject: [RFC v1 5/7] clk: meson: meson8b: mark the CPU clock as CLK_IS_CRITICAL Date: Wed, 14 Nov 2018 23:57:23 +0100 Message-Id: <20181114225725.2821-6-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181114225725.2821-1-martin.blumenstingl@googlemail.com> References: <20181114225725.2821-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-20181114_145808_599093_14A47C8E X-CRM114-Status: GOOD ( 15.95 ) 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 8a3c346e110d..d566dd5bc567 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), }, };