Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7276773imu; Wed, 14 Nov 2018 14:42:53 -0800 (PST) X-Google-Smtp-Source: AJdET5f6boxAJb38BYw3f7v7fOTTzA29dNN2ae87JFVrESScqcFSGuJYL80VlaIQxzHcc8eSLF9w X-Received: by 2002:a62:6d07:: with SMTP id i7-v6mr4000639pfc.146.1542235373697; Wed, 14 Nov 2018 14:42:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542235373; cv=none; d=google.com; s=arc-20160816; b=WTpDhQQ3wv2LDpNUFdgbBBOUBHYk4Gs/OeW7JAvSndh77wb8NZb4Nl76rM7x9TPYoN nL6geIxSDFgt6H8vj0R/KppnUQq3az/dXlSWA5nn7UL63RT11A9icttDuGrpZIC0mxhh NIQ3mEW82WwrprVKaXEMnEii16iJpGOmn+1V2b2Ezbxli9XUbizNkqUVxAw2eLC8sYJo qTP7+nG2m2LfdoNtBh0NiFzFQGsVMOBRRKTZ/52DkosPpLiboBJ01n6aikgsdjlhg56v dAR//I+cNBI7kWlUzyvBi/4UsAkOk82obB/2xvogAbl1HHZY2nC/Easwo23ACmnOsnwS aXYQ== 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; bh=RI2rb08ZKuxEXnMUxV0KaIg1d21CjJEX4MHQUlUDxpY=; b=Zano/tfG+IdMF1QZv9AinKQ9fQuLDnfsLP+qJpgMAyiC9kHP1Vjxd/JWgFT+Sexqmt CirwBLHQzKJA4eQ/qyu9jtG//liy0ziLMTrBQvrDE46JCD5feCoAUMPwbflQ5ijk0sQC PmAIT/uSiRIzEFeRgJmJ/LREjZ8pGfV3kvsCjQQHENJUbuXgeBf2osQN7jqMgdcKziPi uDLGeHhct6juXDnlnp+ftXvvHJmqGne+u2wnIsiqaMKrE3A/FiZBiOWKClCQJeEr/izj VftOKdqtllMF6bgcsgMOi9fT4EXOTJQf9Bdb8ogVpqI0dfS4PwLfcJrN8hcE86mT5v2o fsJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eUJGPjhi; 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 d37-v6si25206491plb.167.2018.11.14.14.42.38; Wed, 14 Nov 2018 14:42:53 -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=eUJGPjhi; 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 S1729081AbeKOIrO (ORCPT + 99 others); Thu, 15 Nov 2018 03:47:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:34392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728689AbeKOI1W (ORCPT ); Thu, 15 Nov 2018 03:27:22 -0500 Received: from sasha-vm.mshome.net (unknown [64.114.255.114]) (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 6C42022513; Wed, 14 Nov 2018 22:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234139; bh=xNiRCS4AfeOQtRse7eeCVDZeEpPpA502djnbNXIq+Wc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eUJGPjhi9Y6kEnLGGIK1Dr41ApxJxQFb73MT/uuOgVl0jrYfp+WMp7bJwaA4tnEkv PW2djxlHHuKjMYwoXdFu43g7r+QQDyEsU/tU3ouZ6DeqcrW707gg6ZSe6Yi/hxbw6d VeVukN3Uwmv+JKFEOPPRpCWH1gGyUedS8LCKMAic= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jerome Brunet , Stephen Boyd , Sasha Levin Subject: [PATCH AUTOSEL 4.19 47/73] clk: meson: axg: mark fdiv2 and fdiv3 as critical Date: Wed, 14 Nov 2018 17:21:41 -0500 Message-Id: <20181114222207.98701-47-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222207.98701-1-sashal@kernel.org> References: <20181114222207.98701-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jerome Brunet [ Upstream commit d6ee1e7e9004d3d246cdfa14196989e0a9466c16 ] Similar to gxbb and gxl platforms, axg SCPI Cortex-M co-processor uses the fdiv2 and fdiv3 to, among other things, provide the cpu clock. Until clock hand-off mechanism makes its way to CCF and the generic SCPI claims platform specific clocks, these clocks must be marked as critical to make sure they are never disabled when needed by the co-processor. Fixes: 05f814402d61 ("clk: meson: add fdiv clock gates") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/meson/axg.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 00ce62ad6416..8cf74fc423e6 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -319,6 +319,7 @@ static struct clk_regmap axg_fclk_div2 = { .ops = &clk_regmap_gate_ops, .parent_names = (const char *[]){ "fclk_div2_div" }, .num_parents = 1, + .flags = CLK_IS_CRITICAL, }, }; @@ -343,6 +344,18 @@ static struct clk_regmap axg_fclk_div3 = { .ops = &clk_regmap_gate_ops, .parent_names = (const char *[]){ "fclk_div3_div" }, .num_parents = 1, + /* + * FIXME: + * This clock, as fdiv2, is used by the SCPI FW and is required + * by the platform to operate correctly. + * Until the following condition are met, we need this clock to + * be marked as critical: + * a) The SCPI generic driver claims and enable all the clocks + * it needs + * b) CCF has a clock hand-off mechanism to make the sure the + * clock stays on until the proper driver comes along + */ + .flags = CLK_IS_CRITICAL, }, }; -- 2.17.1