From patchwork Tue Jun 7 11:19:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 9160599 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 9B16960572 for ; Tue, 7 Jun 2016 11:22:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AA0B25EF7 for ; Tue, 7 Jun 2016 11:22:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F610281FE; Tue, 7 Jun 2016 11:22:58 +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 E4AFC2793B for ; Tue, 7 Jun 2016 11:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754988AbcFGLWl (ORCPT ); Tue, 7 Jun 2016 07:22:41 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37539 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754376AbcFGLVB (ORCPT ); Tue, 7 Jun 2016 07:21:01 -0400 Received: by mail-wm0-f49.google.com with SMTP id k204so64388877wmk.0 for ; Tue, 07 Jun 2016 04:21:00 -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=sYU/Y5rpl0iHuylkWZ1cFIJJ6WQdXWbtFC9yrUz/tHo=; b=cpNZiTZO+W1hpPnJe7Z5DmdPER07ctQ4tktA5arI5KdkHQUUz646Kgj+XexcCFT0pL eI2LFWuXo5b2RVYIB8QfcIPvkcAbWI9b1enNeEPlm4WNnJsnwiMB/g3cvcC4BK68twkN 0Efacq5EOAfP3qEBNMeF/YMaBNdxax9FjrBHI= 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=sYU/Y5rpl0iHuylkWZ1cFIJJ6WQdXWbtFC9yrUz/tHo=; b=PgcMk3Fq/yORQ+9uoYEWe4WMCvX8X2RCjsX6E11a4+mdC3FWy+qP94+iAwyCmllZ9s q8XFFfQDvewZGaEu0xssS48dXm+mXV2WfE7aLSjbsTuHFCC2qbiqtUlQBg2drwtXXjaR iD0YuiYClecVdLQfgiSTcg35FXs+2y0JH+eM4sSiVDaxskVE2/q9x8droPapJhE+7oZW h20Huep++aq+bKw1bzNT3UW2uJ5XA7yJbVJ6ZHD3dASYPc3VfX5nJKyV7UX3Ln/dGKSo Gbvo2Y/DYldbJpNxBWEB2JpN8ZRJCyAsov4IhCuhzJMrwV2nCLpcAbmV87nIFruGm1TC B9NA== X-Gm-Message-State: ALyK8tIX4iLlrNJSz5XYYe8WqtSsJaZzlIql4DwlGaqw+BOjyAqG1i+MPATI237y6Ex35+NH X-Received: by 10.28.147.19 with SMTP id v19mr2186547wmd.13.1465298459816; Tue, 07 Jun 2016 04:20:59 -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.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jun 2016 04:20:59 -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 1/6] clk: st: clk-flexgen: Detect critical clocks Date: Tue, 7 Jun 2016 12:19:25 +0100 Message-Id: <20160607111930.10375-2-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. While we're at it, reduce the coverage of the flex_flags variable, since it's only really used in a single for() loop. Signed-off-by: Lee Jones --- drivers/clk/st/clk-flexgen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c index 627267c..546bd79 100644 --- a/drivers/clk/st/clk-flexgen.c +++ b/drivers/clk/st/clk-flexgen.c @@ -267,7 +267,6 @@ static void __init st_of_flexgen_setup(struct device_node *np) const char **parents; int num_parents, i; spinlock_t *rlock = NULL; - unsigned long flex_flags = 0; int ret; pnode = of_get_parent(np); @@ -308,12 +307,15 @@ static void __init st_of_flexgen_setup(struct device_node *np) for (i = 0; i < clk_data->clk_num; i++) { struct clk *clk; const char *clk_name; + unsigned long flex_flags = 0; if (of_property_read_string_index(np, "clock-output-names", i, &clk_name)) { break; } + of_clk_detect_critical(np, i, &flex_flags); + /* * If we read an empty clock name then the output is unused */