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: 9160601 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 641E360572 for ; Tue, 7 Jun 2016 11:22:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53E9825EF7 for ; Tue, 7 Jun 2016 11:22:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48C422793B; Tue, 7 Jun 2016 11:22:59 +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 11D6E281D2 for ; Tue, 7 Jun 2016 11:22:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754984AbcFGLWl (ORCPT ); Tue, 7 Jun 2016 07:22:41 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37539 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754390AbcFGLVB (ORCPT ); Tue, 7 Jun 2016 07:21:01 -0400 Received: by mail-wm0-f53.google.com with SMTP id k204so64388880wmk.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=CEnfKYsYk3dctmXtAcdG9eLDXYRzB5gIlh0T2aYa0lqF+TeFmzqkCvDtKrtAmBtUfg cQ7pz4sCzZYo/MM8AfFMaqeIjWrQS686QMt47XFdBjPv8TeMrKOWnb6dobtAR1a5p/7x vuxij3/ZRE2XAybUvlSHmiJkwqNxvmCky0Isqzn14yNs67acLK7haLBj9hzepuw08qdI XqEqtN2R4dbp9ye+j9nRekXNgi/EWUJZUOePxaYiAuTQhloYaxWRyniHDXm+ZwF2WHE3 RlclTM/KhBB7UGDrp8LXiOENECWrFKNX4OR/n6a3n9oj/ZdmXYxOoFLo5RiMBtJvbz52 7mow== X-Gm-Message-State: ALyK8tLJRMuF9evZ/Sc69Z8YhioR8gPegNN9nKvENq7Jy3Lz88zPG7/xAnl33t0XJ/j68iJ8 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-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. 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 */