Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3708803imu; Mon, 28 Jan 2019 09:24:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN4baS/qNi6/MEWlAzfLrOV+PHVEZVjcAJ4CGs33RwMQuLS5sbO//07sRi/dszeOwYF3+NqM X-Received: by 2002:a17:902:f091:: with SMTP id go17mr23095141plb.235.1548696250008; Mon, 28 Jan 2019 09:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696249; cv=none; d=google.com; s=arc-20160816; b=MGiv94NmFspK5ruQvqrWN2Ss8Li74/6kb00jpFIHH1p7BkExQY+d8mBzfyVVdXkryq oEKcjIPrqb8AiUmu60foTqHPRj6d9pwfBM4ul+WorQcxaDwzR4FAuDWzz+og5+9vKpTN 9LtefRV/kGuuHtfRESY1MT2TEjL6c5LtfDJlZsva84vev8dwPsp2hOKePntaLxTCl8ho EItV9CsNb8k2o3szyiBgDzRhvBCxtYAbqtEC0Idr0YBgphqczxPdS7EKCAqDTWdYMRRj rTQLRz3uk/l6vjUT742INvPTQ+S6V88bur6cYYxsZxXYakmB5YmsGZNSuyf0EcLfDeIH +8DQ== 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=7WItHy9ZPrVQ4JOqbP0LieE6RvrUnxVc9amcyTGglcU=; b=T8o5lCBmjASy4jSOojvD5vAOQvUwRd/vFOjti5BUUFNEbOIS4Avzm5/AKjm+w0fAsd 7wRI5YG4LVfrEy45sahc1yfcKiNtOTeakHLgI8Hncyidf3qGSFFa4yT3NB1xcA3ss5Ie XsvvD5I3W7P94Uo/zQ/aaC55EHOQgWRYAQv1cDUizftOjsmMweCRRT+AQPD0M1pyFEV6 QBGKlDkMTgzJCJho1vCPe+dd4f2ig3PxoS5iZVyRXzxQ76KSYsEn1IRpNuWW6VQZWMOS zLkxd0Vqk0HXEfqVHiK7bAuHKtwwnEik6jIdRs6QOUHT0NrFL6E6c8HQbpuwSfd8q0Ts 1T1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rZbe4OGy; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b26si18894302pgl.539.2019.01.28.09.23.54; Mon, 28 Jan 2019 09:24:09 -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=@kernel.org header.s=default header.b=rZbe4OGy; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731048AbfA1RXt (ORCPT + 99 others); Mon, 28 Jan 2019 12:23:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:47722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730093AbfA1QCY (ORCPT ); Mon, 28 Jan 2019 11:02:24 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C3CEC21916; Mon, 28 Jan 2019 16:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691343; bh=Ba0R+3g9W4HxNnMVLMF/nf8iIUSZJx7lxNUDRwOGYLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rZbe4OGyNXzFnGCC0yj+wRpsPv1NF9chgVMYhTDewfPY1RbEeozDfn7dgLNrF2uyj 7ZtXh6276fDFhbPHMDA1A+ZcmIdWEJrQ947r9uQuoeyK12S5j1k395FnmyItmxIB5L jI3ou8lmPABmR8YXuSXK4NqAZDMlbrk0RoUed48U= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Martin Blumenstingl , Neil Armstrong , Sasha Levin , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 062/258] clk: meson: meson8b: mark the CPU clock as CLK_IS_CRITICAL Date: Mon, 28 Jan 2019 10:56:08 -0500 Message-Id: <20190128155924.51521-62-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Blumenstingl [ Upstream commit 0dad1ec65bc30a549aba38d34a727309bbf41bc8 ] 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 Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181115224048.13511-4-martin.blumenstingl@googlemail.com Signed-off-by: Sasha Levin --- 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 0da8334f2e43..9d79ff857d83 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -634,7 +634,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