Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8619379imu; Thu, 15 Nov 2018 14:42:37 -0800 (PST) X-Google-Smtp-Source: AJdET5dlX9LK9lFbkZDcyyDRZ/1MwIK8wyI+GMp7pkhtTaSAfWJmEz578jZAjjCodQ/gcJu7F/85 X-Received: by 2002:a62:670f:: with SMTP id b15mr8406764pfc.212.1542321756987; Thu, 15 Nov 2018 14:42:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542321756; cv=none; d=google.com; s=arc-20160816; b=GpLmQo88LilR6YX9pGlp1laLoZWaaJQjiGd2kMtgJkLGxp461GXJ8PB7LHVTuUeCVJ C0DAalHTD+7C7B/q5GKt85FPl0ohf+HF7XGUvkH4aibHzlDBRyaUdrrDqwugxxyhyc8m tXm8BviaMlUvhPgPd9PEKhCOwSTfLXqFLw5cO/yNQKABfrrvXGANQqjD4ix3NB47uxrl aIxyreTX4KgHCqjC9XSJWYHNAFiMt3Rzkzg/mjew7GLGDcoXl+vAbPfw/isUCX5X6NFe oSgzNl4+o/er+kZOKAg446+20x+aash+rr72tiiiQ/FmLhzU1czlrenOMzNcmK867tpk 6bLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VgKwrWYvBpPwZu+JHqxzLiLOxskcy+PR9OfxhhLd1fo=; b=ycw6e4G+AqAivVAg/gMOOHsNr7lxv2mmSSU5IlxW+gjQMIPrOQr4Cn8/FhXWN8Xz3M ClhJiE5r4ubJXf3vuDvZtQyPOPXaFQo0qPVxD0SzK7q83PDZL7QpNVI2t3wI4oVS4UWY dSswHYNTdBKD/6yhWudCLvRlzrWGbptEuGsFUYUjfUUmnthe0LBoaqPMncHhDNtW6rBM mkdiI9JjGdpESIh8d01BNhuAgyhr/Npp3tlwyx0SBQJIszH3hWr5aCUZI4ITZ9tjCz06 OdA3K+maVaaFtBcWQnhsPe6mtRYkpIjiwdtYNIfveEvCnRtAsBxVP1kbmiSL0yeU1iQC 3H6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=SHNCJWdy; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si27898641plk.304.2018.11.15.14.42.22; Thu, 15 Nov 2018 14:42:36 -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=@googlemail.com header.s=20161025 header.b=SHNCJWdy; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388993AbeKPIvH (ORCPT + 99 others); Fri, 16 Nov 2018 03:51:07 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55132 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729137AbeKPIvG (ORCPT ); Fri, 16 Nov 2018 03:51:06 -0500 Received: by mail-wm1-f65.google.com with SMTP id r63-v6so20408343wma.4; Thu, 15 Nov 2018 14:41:19 -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=N1z3h6lQixAZfURebr5oSOfvD2GUZoYzLFcV/sMEF06VKPE4b9a+7qvhNSAuWmoRkD 6I6aaw1oENW8l/KkcyXD1pE7/PF9sF6dspAw/X4N9QbEIFeYGL08621ND/uQW8E1t5BZ cUuDaFBbSjhv1pHSoleyeCRGIJwFsVREQjBqjwNwEgQqx3huaLUvscjn+vmXzLDX92ec TLC/bs5KPPkfG/tks/HukKdCQSntOjOo4B3FsQqigaQ4wMX6120EGj675zpRh9EhOm8b M3DvWKy+VEHJtp5KWTDzc2Ye6Ngu1bznwG64uFs1z/mnmIBw366M1EfuJryfQvxHWKdN TSzw== X-Gm-Message-State: AGRZ1gJaFlciA4NZCJb3d5biL9CWABjdOtB5WV/iohv1cwZ2/FgCV1F5 NIHE4reTY/IWTOS+ReXEn1M= 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mturquette@baylibre.com, sboyd@kernel.org, Martin Blumenstingl 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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), }, }; -- 2.19.1