Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp127295imj; Thu, 14 Feb 2019 16:54:36 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibftgk3C8XTjVQ1EYaLXOkoeTHFYG/88/JvGOzfq+Qi0X2uASZx0pTKsmtjQKRSybzikk3c X-Received: by 2002:a63:4005:: with SMTP id n5mr2628853pga.86.1550192076225; Thu, 14 Feb 2019 16:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550192076; cv=none; d=google.com; s=arc-20160816; b=DbjVYr0mQe06o6nQGZIXm/WoiUlwX+HAOKh1IlC1YefsmVPIfDyAfV3v32qGzb5q0B eifjxtjm7SDi3iwAbEauBOV6usU2Ynt97IGUMONOv0BpBP01OkyKAAOkYfHMVAnAvB9k dlboUhmgNxH2vOI2YMkb7Nok0yYXzEQJzLvcv3/0SMdXd2oHCGuCmi1zuxRLNQymplyA DPQs43Vp7fSnV1B2gRBmW+FL9cFu8TgVm4RljtnJ41ngwTVSGsiJBd3mcTO0myeDO/w0 BpoB/toEFkippkPIh1GxzuExeDfFFA6U3xiADIqaxM84PYy8Y6rx03JgX+iO8IYT+V78 zJZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VnZl7oT9pACxtLzsbm1i6SFINZc4E7H0K4d5BtVsQPE=; b=oNI51RJSC8vqcfiQL4kpi9mmj0FvWKDi67V1LOdnkA0Gyzr76vQa2WF0vlx3wkuky2 FZjsO7uLc4porscQFsZjoZsVHOG3HezJ/Myw5798rKSReRYR2Kfuqwh899DvGxaBKTNi 0fRAzp+gmylSJ5ak6A4gqfk5+uc+Tf4r1imM/+S/3s/bBtVuHQh9lIxlll20mNkOVdrj Q0noluURXJVDhUt4/K5Psjm6JgNYM47pqz46ekQ5OpuXC8Pm8blyRNLnRQRJez9zpgCB kGuES9FBke2QEPLB7hIOHoPyoLK+YMLrJ/vV4NAg5veyciYP7VAceyQWHR4+keIPBSWw GCrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZkGopDZr; 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 sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24si3468159pgv.66.2019.02.14.16.54.20; Thu, 14 Feb 2019 16:54:36 -0800 (PST) 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=@kernel.org header.s=default header.b=ZkGopDZr; 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 sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405287AbfBNQcg (ORCPT + 99 others); Thu, 14 Feb 2019 11:32:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:36502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728867AbfBNQcg (ORCPT ); Thu, 14 Feb 2019 11:32:36 -0500 Received: from ziggy.de (unknown [37.223.146.9]) (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 5A637222DA; Thu, 14 Feb 2019 16:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550161955; bh=es46TivW9Kpxp/jDOK1Lil3w0c11Tvpf4AabeEtZPO4=; h=From:To:Cc:Subject:Date:From; b=ZkGopDZrRtdv7IYtksHgIvCdA9juJGcDX7uNQ+8Mm6VXScZkCq88sEk7zLHDQf2nG 2DBJh3JQa6QAC/Jb3IyVgtF9/NXcbgCiJroyuI8amcREsHC067GYxjWF5FRXwRpvMk rIpLwxxc/5Ii+1m+ZGTHxc2oGUfkq6sjWkmWOSKw= From: matthias.bgg@kernel.org To: mturquette@baylibre.com, sboyd@kernel.org, kevin-cw.chen@mediatek.com, mars.cheng@mediatek.com Cc: sean.wang@mediatek.com, matthias.bgg@gmail.com, jasu@njomotys.info, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v4 2/3] clk: mediatek: Add flags to mtk_gate Date: Thu, 14 Feb 2019 17:32:30 +0100 Message-Id: <20190214163230.26203-1-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jasper Mattsson This is required to mark gates as CLK_IS_CRITICAL. Signed-off-by: Jasper Mattsson Acked-by: Mars Cheng 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, -- 2.20.1