From patchwork Wed Nov 14 22:23:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 151128 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6249027ljp; Wed, 14 Nov 2018 14:24:39 -0800 (PST) X-Google-Smtp-Source: AJdET5ezFszz+FSpjfEWi68zizChiiX6oKa8R8GjNNixMaewbudRxXXZVW6Ivtlyw+F8QhUCWCmT X-Received: by 2002:a62:5504:: with SMTP id j4-v6mr3802464pfb.166.1542234279522; Wed, 14 Nov 2018 14:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542234279; cv=none; d=google.com; s=arc-20160816; b=0RCZoAZXPDmICmXdAFOq8nr9Vd7V/zaxKBOzme3Nc2Kg+9uRLKSgGgiukXcbeFAzI3 +EXD0BRRVQfd6MA2rrxRN/N541bRZvnRZUQRQMkrNHMcjmBnQCHA19+9oD9AVRFJhRlU UA4z+1fD0DZY7OpBmVM6gByuxP8gAROkhxOwp+WZxkaPjt6wAaffg5HKsOFjT0Gj/d3x ZPrSdb1yYHJH/Ap7qzds9m4uGgULIqtDxXUpZS13xawkt+3PIAUtrg3XSGHwwclqhUI1 lCVNiq1D67S5UGMMCsuHu/B378AkFUR7IPScpnGtOY4B/3Vn4G0kiNfFVCzpdV5eFRws WcgQ== 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=Fm2nsTu5DgV7MahBDDzWviI+oRuXEIvUe6UAQUKcv9s=; b=GReB81LMixihQVqslXRucE8QE39xNUjULReNmNSycF0Iog9GxdbNylwFWqU0tezUqL j2Mjc4LBgOJMsRh2SqsKIC5fObWA3kkMB9zfj+soZ8dIWGU8lUV8I3lw/UBhK29xhUqq 2zmUFKbRoaZ/eJ2gBq0Sq5dT32RVMGfmKwAfA9MVQSFJzyPbr+6JZCVERsMKFFbzkbKi QPAgxKEf330FO5mLZ/qyiTVbMucqxN3Pj/L2F0iR21cc5riheqHXbsTZc9l+t6xiDloA y12n3ApWtQvvKJ7dUSTjT8TP5WyCH6lexavW4n1gJSRa3YwW45WTL+0NIJR6Jy0iRg/o VsuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="oLs/Z2hR"; 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 b124si929753pfg.47.2018.11.14.14.24.39; Wed, 14 Nov 2018 14:24:39 -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="oLs/Z2hR"; 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 S2388431AbeKOI3k (ORCPT + 32 others); Thu, 15 Nov 2018 03:29:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:36652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732360AbeKOI3k (ORCPT ); Thu, 15 Nov 2018 03:29:40 -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 313C122529; Wed, 14 Nov 2018 22:24:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234276; bh=8WrDsZ4kKm/oVsjSplgvqLOtdVCKMMm0ezO0p/64XwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLs/Z2hRPnwqC1uaXsVcM2jviNMAmyTMOj4CrS2KlYOSPN1/FLl1MIWjhq4qYYQWR D1yfXiFPd9JeCZWPBTJKJnwOzK4nt9YLJjpW5436erl2dD/Q2jfvr1kfWWCCwS4H1Z UDJ2JqwtO9ACUGluWvDrxLRYfwZzwDPlSpdJFsrw= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jerome Brunet , Stephen Boyd , Sasha Levin , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH AUTOSEL 4.18 37/59] clk: meson: axg: mark fdiv2 and fdiv3 as critical Date: Wed, 14 Nov 2018 17:23:09 -0500 Message-Id: <20181114222335.99339-37-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222335.99339-1-sashal@kernel.org> References: <20181114222335.99339-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(+) -- 2.17.1 diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index bd4dbc696b88..cfd26fd7e404 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -320,6 +320,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, }, }; @@ -344,6 +345,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, }, };