From patchwork Fri May 27 20:38:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rhyland Klein X-Patchwork-Id: 9138989 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 05B4860759 for ; Fri, 27 May 2016 20:39:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB45825D97 for ; Fri, 27 May 2016 20:39:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFF1D28159; Fri, 27 May 2016 20:39:51 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 7AFF125D97 for ; Fri, 27 May 2016 20:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933138AbcE0UjC (ORCPT ); Fri, 27 May 2016 16:39:02 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:5074 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932666AbcE0UjA (ORCPT ); Fri, 27 May 2016 16:39:00 -0400 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Fri, 27 May 2016 13:38:56 -0700 Received: from HQMAIL101.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Fri, 27 May 2016 13:36:22 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Fri, 27 May 2016 13:36:22 -0700 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 27 May 2016 20:38:54 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server id 15.0.1130.7 via Frontend Transport; Fri, 27 May 2016 20:38:54 +0000 Received: from rklein-work.nvidia.com (Not Verified[10.2.71.238]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 5, 8150) id ; Fri, 27 May 2016 13:38:54 -0700 From: Rhyland Klein To: Peter De Schrijver , Thierry Reding CC: Michael Turquette , Stephen Boyd , Alexandre Courbot , , , , Stephen Warren , Rhyland Klein Subject: [PATCH v2 11/11] clk: tegra: WARN if clk in the init_table has enable Date: Fri, 27 May 2016 16:38:14 -0400 Message-ID: <1464381494-27096-12-git-send-email-rklein@nvidia.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464381494-27096-1-git-send-email-rklein@nvidia.com> References: <1464381494-27096-1-git-send-email-rklein@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 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 Enabling clocks through the init_table mechanism is deprecated. Clocks that need to be enabled early and stay on should be marked as CRITICAL. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c index b2cdd9a235f4..898fe922c742 100644 --- a/drivers/clk/tegra/clk.c +++ b/drivers/clk/tegra/clk.c @@ -262,6 +262,11 @@ void __init tegra_init_from_table(struct tegra_clk_init_table *tbl, WARN_ON(1); } + /* Using the init_table to enable clks at boot is + * deprecated. Clks that need to be enabled through early + * boot, they should be marked as CLK_IS_CRITICAL + */ + WARN_ON_ONCE(tbl->state); if (tbl->state) if (clk_prepare_enable(clk)) { pr_err("%s: Failed to enable %s\n", __func__,