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: 69492 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1922933qgf; Tue, 7 Jun 2016 04:22:35 -0700 (PDT) X-Received: by 10.98.95.197 with SMTP id t188mr31506167pfb.162.1465298555584; Tue, 07 Jun 2016 04:22:35 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18si34586721pfa.119.2016.06.07.04.22.30; Tue, 07 Jun 2016 04:22:35 -0700 (PDT) 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=@linaro.org; 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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754948AbcFGLW1 (ORCPT + 31 others); Tue, 7 Jun 2016 07:22:27 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37553 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754438AbcFGLVC (ORCPT ); Tue, 7 Jun 2016 07:21:02 -0400 Received: by mail-wm0-f53.google.com with SMTP id k204so64389487wmk.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=P2xBu4fGVR4csG0ZDw1vjtoI9UHJlseF5OtP1uEJB2RxtxfNQCj06/NggD5FA/rLQl swILI8kVNzqAB2hmNaFxYTRNEBHRkPbiVHw5WydeqyCsJQPBiRSx98ezEvDv5wgH/8ye SMZYm6AoG3S97OTvU+tOULHgCCHTW+Hs2p3C6HU9Jny/4yqRRK9fTldYqAG7gCDWHlA2 bP634GXQgXa8wGwJku63zMHI+AX1Fdu8GPDYya3PXo+rrjpVTPhgwm0aA2Dr0MDOwfNf fZyVIWMvuzFdLXFssUpKLXws6yUReBGEwUWg8x2Pe5abZBGEL/lusM3+K/jsE/F34izy iZlg== X-Gm-Message-State: ALyK8tIZppFWQy2BRNVvduu0ykIb2ERYJzQr6MM0jzlVXOsR6NEfjhPU7yNCbqc4a+UuZFF9 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.8.3 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