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: 9160595 X-Patchwork-Delegate: sboyd@codeaurora.org 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 9C74160801 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 8BC9E281D2 for ; Tue, 7 Jun 2016 11:22:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80BD42834F; 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=unavailable 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 36BE7281D2 for ; Tue, 7 Jun 2016 11:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754922AbcFGLW0 (ORCPT ); Tue, 7 Jun 2016 07:22:26 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35842 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754422AbcFGLVC (ORCPT ); Tue, 7 Jun 2016 07:21:02 -0400 Received: by mail-wm0-f42.google.com with SMTP id n184so132189556wmn.1 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=MEqxEcy9UEBVhTgFXDS2VfbBb9ZOzYc2Xenxh4RQium5GmDSmF2o49kJTCRrDtVwdL yE9mE3hmFsSMi1m6WF9NbhrlgyN+LcmBqSyezoo02zOta9lOC5CQQ54+8k09jLZdmC7q bWC458wVVwTN2+/uXAn92EsZTbOct2HOc7tw9F7ukRFCaTdiWjacKZ5GgjM++r3OP1OQ EaYwv41hrte3+OWVs0m5W6JEhgUJ9lHjIcbGzbXpPLkUGcKGzLdhrTJNPmRhXR9dS7uP /GvBRXySCgbFgdKbd5QvvCFeplNwmAwW4/qtB0X0SInkXSUDFCjVvbOdZLTXb5X8NxpP uWvw== X-Gm-Message-State: ALyK8tJ34/D5cP+SyXosUAWYj2BFBdF3SFvAkClvCpJZc/suZzrIpfTJ546bDfIFqq5H0gBu 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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