From patchwork Tue Jun 7 11:19:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 9160593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8DD3F60572 for ; Tue, 7 Jun 2016 11:22:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CC7C2793B for ; Tue, 7 Jun 2016 11:22:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 710D4281FE; Tue, 7 Jun 2016 11:22:41 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 120102793B for ; Tue, 7 Jun 2016 11:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754921AbcFGLW0 (ORCPT ); Tue, 7 Jun 2016 07:22:26 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37553 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754363AbcFGLVC (ORCPT ); Tue, 7 Jun 2016 07:21:02 -0400 Received: by mail-wm0-f51.google.com with SMTP id k204so64389484wmk.0 for ; Tue, 07 Jun 2016 04:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uXdDBzcl8Jz7q8dGoSI74eMfFXRz63cw57+XBe9bIvg=; b=K2M/gA1Ri3yY4TaTqjO8652r4h6Q6MLemISztWQGYHs9D1MCOFKy421AkvCs6kzpNW FCs1vpH0xbXJPzYFJ8j5b9zdhq1OmarP8vqNbWljpRWoV7Cjg+tpOvb+LeFkRtFqTbPt SDzhtRSruHv3Jig1Uixx6SjnJK1ZzSrv3VAH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uXdDBzcl8Jz7q8dGoSI74eMfFXRz63cw57+XBe9bIvg=; b=DLXIUPuoCtEu0J0ZTZ/H6STOa4Uwr+xmxG6D9ORqjPF069ByUmS+jkftXmj52BB7UU r1fZe2DOMToP+IYQJT0teDHmpislg4MBtGwDWsFpbNzAT7PWjXd8RXiEcBqOpq/L13BI sfcfc6Fs1UMkAcn7vH0uvefh7+hozF6FMyo0wSB1xkwxU9+a60lgdFxh/+wpQdm9Ld+F /fYfH6gLT7DDqaA4fQEu2W77+WwXGJXPVUDLaD4oiiO3rkP0h2IcLF5YxSExzSv4uING Y1aWCdG3mtk/wE23aCehvZv7dSgHmerXxMBHI/a2DajCR8075q+KDCI8oSe5z2ojo92P NRiA== X-Gm-Message-State: ALyK8tJarxp27C3s7GswZj2cpWhBvQN+7J4Mt7kZxbX8wqaM28ankrvwy4zgcrWQ8A7wBQ7f X-Received: by 10.28.129.20 with SMTP id c20mr2336876wmd.46.1465298460833; Tue, 07 Jun 2016 04:21:00 -0700 (PDT) Received: from localhost.localdomain (host81-129-171-215.range81-129.btcentralplus.com. [81.129.171.215]) by smtp.gmail.com with ESMTPSA id t199sm14466371wmt.11.2016.06.07.04.20.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jun 2016 04:21:00 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@stlinux.com, maxime.coquelin@st.com, patrice.chotard@st.com, mturquette@baylibre.com, sboyd@codeaurora.org, broonie@kernel.org, linux-clk@vger.kernel.org, linux-spi@vger.kernel.org, Lee Jones Subject: [PATCH 2/6] clk: st: clkgen-fsyn: Detect critical clocks Date: Tue, 7 Jun 2016 12:19:26 +0100 Message-Id: <20160607111930.10375-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160607111930.10375-1-lee.jones@linaro.org> References: <20160607111930.10375-1-lee.jones@linaro.org> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Utilise the new Critical Clock infrastructure to mark clocks which much not be disabled as CRITICAL. Clocks are marked as CRITICAL using clk flags. This patch also ensures flags are peculated through the framework in the correct manner. Signed-off-by: Lee Jones --- drivers/clk/st/clkgen-fsyn.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c index dec4eaa..09afeb8 100644 --- a/drivers/clk/st/clkgen-fsyn.c +++ b/drivers/clk/st/clkgen-fsyn.c @@ -1027,7 +1027,7 @@ static const struct clk_ops st_quadfs_ops = { static struct clk * __init st_clk_register_quadfs_fsynth( const char *name, const char *parent_name, struct clkgen_quadfs_data *quadfs, void __iomem *reg, u32 chan, - spinlock_t *lock) + unsigned long flags, spinlock_t *lock) { struct st_clk_quadfs_fsynth *fs; struct clk *clk; @@ -1045,7 +1045,7 @@ static struct clk * __init st_clk_register_quadfs_fsynth( init.name = name; init.ops = &st_quadfs_ops; - init.flags = CLK_GET_RATE_NOCACHE | CLK_IS_BASIC; + init.flags = flags | CLK_GET_RATE_NOCACHE | CLK_IS_BASIC; init.parent_names = &parent_name; init.num_parents = 1; @@ -1115,6 +1115,7 @@ static void __init st_of_create_quadfs_fsynths( for (fschan = 0; fschan < QUADFS_MAX_CHAN; fschan++) { struct clk *clk; const char *clk_name; + unsigned long flags = 0; if (of_property_read_string_index(np, "clock-output-names", fschan, &clk_name)) { @@ -1127,8 +1128,11 @@ static void __init st_of_create_quadfs_fsynths( if (*clk_name == '\0') continue; + of_clk_detect_critical(np, fschan, &flags); + clk = st_clk_register_quadfs_fsynth(clk_name, pll_name, - quadfs, reg, fschan, lock); + quadfs, reg, fschan, + flags, lock); /* * If there was an error registering this clock output, clean