From patchwork Fri Nov 16 18:09:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 10686755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 61E1014BD for ; Fri, 16 Nov 2018 18:10:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5291F2D724 for ; Fri, 16 Nov 2018 18:10:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 467F42D746; Fri, 16 Nov 2018 18:10:27 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A49B2D724 for ; Fri, 16 Nov 2018 18:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g/vIGf9fpygyQJdhm1/1HyRQ/OtTrSsmV4p/xLFTbBY=; b=NUthTugPX9ecLB cS53TdF4jOIe86CeoBqrwnyp4XYUWQeO6QQtc5q2Tm01wq6VdVlmWZf0YRucwMUESKzN6AIcOdm3p +i7vMKRZmB6IGVaI9QnEdkmDOIrtHRNJNZDw71ZPA+vD5ARVhF8pPTslaVpKE7gYtKZLmacRw7pjO 2yE62Zwhd5kIaPUa4tin+YaqXZgD5bQZBMIIUkAAicJJbjDX374XIkwDNWL5+RJNHVWKrIkV+a95K LKMukJlKaroH8/DurOrD1ds5w7s3jU6J8nD/s0hgbwpOGaDBn+DpMmtqcp8/O6qVCfEEMSWYOhst0 EM5RaGvCwxS0C44F/ukQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNiZS-0004Nd-JE; Fri, 16 Nov 2018 18:10:22 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNiYk-0002HH-4b; Fri, 16 Nov 2018 18:09:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Qkn2UF5R3OYglv4Kc6B4F8TwQhIOV+m3Ar09x+RN83Y=; b=WTKvOaCiSw/AiClkVKKuvMSe8U MrLKhNb28YuO98AOhaaz9ctAhAg3w/nklRxMmyvax+Kj2dbQybxXaJ22xV1EQcPsgvAh8JSQ+nHgO EQAHnSKQYKOvjGx5EcDwEWCdN5KLQ7lraTQ5L4BQzydR6bP1mnEZwSOOhiyo3jmCqC9rTO1Jwhzrg rD6Z/bm6H8Ow2zibl2Pw3PY9hcFtiuomO3GFXkaeuP8CL1uge/ANCQfdU8G19aWPh+dLJxuyCESRf 1ecFyxklMWwskQY3kutwsE44TkdlSHSmr98eouIXz+++bC154XUP2QRhmmjMZ+aNytLbCCLWqzLei +7WkJYlQ==; Received: from mail.kernel.org ([198.145.29.99]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNiYh-00062q-4S; Fri, 16 Nov 2018 18:09:36 +0000 Received: from ziggy.de (unknown [93.176.147.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E56922086C; Fri, 16 Nov 2018 18:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542391763; bh=LhHNEdjEs4rrpLVEQp3kQ55FDm4QGJbhZjnMbBd5oZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=erReW1O1CohS1GaP++mSZY+hxB6NNE70evw9KwFO/1oc0hVq310nhUj3aolx5paxe Xt6bVtWXEMm1p6z4trtQmk9I9qwdMbFDgCwr7/vKe0eCi5HuB/VsSpz3oPzMjznKoV vPRmun9J8nZGHwz/nDk6a5PIFaggD/KuB/xCwa6U= From: matthias.bgg@kernel.org To: mturquette@baylibre.com, sboyd@kernel.org, matthias.bgg@gmail.com Subject: [PATCH v2 2/3] clk: mediatek: Add flags to mtk_gate Date: Fri, 16 Nov 2018 19:09:00 +0100 Message-Id: <20181116180901.17737-3-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181116180901.17737-1-matthias.bgg@kernel.org> References: <20181116180901.17737-1-matthias.bgg@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181116_180935_336237_5EAF6A9F X-CRM114-Status: GOOD ( 15.83 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sean.wang@kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, jasu@njomotys.info, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jasper Mattsson This is required to mark gates as CLK_IS_CRITICAL. Fixes: 96596aa06628 ("clk: mediatek: add clk support for MT6797") Signed-off-by: Jasper Mattsson Signed-off-by: Matthias Brugger --- drivers/clk/mediatek/clk-gate.c | 4 +++- drivers/clk/mediatek/clk-gate.h | 3 ++- drivers/clk/mediatek/clk-mtk.c | 2 +- drivers/clk/mediatek/clk-mtk.h | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/clk/mediatek/clk-gate.c b/drivers/clk/mediatek/clk-gate.c index 934bf0e45e26..9628d4e7690b 100644 --- a/drivers/clk/mediatek/clk-gate.c +++ b/drivers/clk/mediatek/clk-gate.c @@ -157,7 +157,8 @@ struct clk *mtk_clk_register_gate( int clr_ofs, int sta_ofs, u8 bit, - const struct clk_ops *ops) + const struct clk_ops *ops, + unsigned long flags) { struct mtk_clk_gate *cg; struct clk *clk; @@ -172,6 +173,7 @@ struct clk *mtk_clk_register_gate( init.parent_names = parent_name ? &parent_name : NULL; init.num_parents = parent_name ? 1 : 0; init.ops = ops; + init.flags = flags; cg->regmap = regmap; cg->set_ofs = set_ofs; diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h index 72ef89b3ad7b..9f766dfe1d57 100644 --- a/drivers/clk/mediatek/clk-gate.h +++ b/drivers/clk/mediatek/clk-gate.h @@ -47,6 +47,7 @@ struct clk *mtk_clk_register_gate( int clr_ofs, int sta_ofs, u8 bit, - const struct clk_ops *ops); + const struct clk_ops *ops, + unsigned long flags); #endif /* __DRV_CLK_GATE_H */ diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c index 9c0ae4278a94..ef410413bb0b 100644 --- a/drivers/clk/mediatek/clk-mtk.c +++ b/drivers/clk/mediatek/clk-mtk.c @@ -130,7 +130,7 @@ int mtk_clk_register_gates(struct device_node *node, gate->regs->set_ofs, gate->regs->clr_ofs, gate->regs->sta_ofs, - gate->shift, gate->ops); + gate->shift, gate->ops, gate->flags); if (IS_ERR(clk)) { pr_err("Failed to register clk %s: %ld\n", diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h index daab6ee94788..987ff2855249 100644 --- a/drivers/clk/mediatek/clk-mtk.h +++ b/drivers/clk/mediatek/clk-mtk.h @@ -162,6 +162,7 @@ struct mtk_gate { const struct mtk_gate_regs *regs; int shift; const struct clk_ops *ops; + unsigned long flags; }; int mtk_clk_register_gates(struct device_node *node,