Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4662513imu; Tue, 8 Jan 2019 04:13:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN5X7TCqrMLwpE1gQWsZp55JO3nYwfu0ENf8N9Ixwd++F8ZwGY6wC1PSyd+0IjsjvgtajCpJ X-Received: by 2002:a17:902:e012:: with SMTP id ca18mr1544274plb.218.1546949639160; Tue, 08 Jan 2019 04:13:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546949639; cv=none; d=google.com; s=arc-20160816; b=ioXVt+HRGVy5VLKNhjNtyGwXz5YxcYx9+7ell+J8VbW/PyPccixl1y8QclHeibiojS UJeyXDAW4OQQxJlSmDmPOt9EMdnA7AvKlM3NinoWvp9R38cZf18JK3OAk3tcOJrAWvMa OOm9GG6ULtTIwE39Gf3hIehwVyFtMjAhN+rxOEoArFX6lzCmC5Put8GCs5LDkPEvOQxl aDvKuaPcntExcpVs2kA3P/slynCpUVeA3eU/d57vtZpRFrADWxGzfZFlE69YQDEXvNRS CQP74s4W36ntXIZ2N56YxhU5AbtOwk7PWgZoJJAyTTjKVW54txNc+9h7KxP2QbLxhDE2 4Dkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=VnZl7oT9pACxtLzsbm1i6SFINZc4E7H0K4d5BtVsQPE=; b=GyNmrj52d3Df4hiEWiSfCwIdBLTIR+v+iPdO8LwRpt7KIwrDWOhcaDZYxZbWeYz3st wkidJZWruCPP2SIxzb7kWKrUL1ZxTRCfoSBS7lWK0YN34UboEbLs38MANW6dN4X7wdxL GUCICQxRQOVFMHvsdXGFIrp08GMDqShVEglIPDbf85hVjBPwLP8/C6hqJYltF+1qbUCx lIF8u2LLbkQkZD0bFmrDddOtO/fdFlMdFMHB64ZtAmGGF/CQQA31W9mVip56uTItmrBx Pm7V9sgpAG10HFANSnf5tweNH7jOvwCks6UIDiVAxxk35pwhSWQZv6T+tZuAfXPD0E0o p/pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yFZjEtDs; 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 2si14500676pgj.104.2019.01.08.04.13.43; Tue, 08 Jan 2019 04:13:59 -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=yFZjEtDs; 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 S1728984AbfAHMMY (ORCPT + 99 others); Tue, 8 Jan 2019 07:12:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:34424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728760AbfAHMMV (ORCPT ); Tue, 8 Jan 2019 07:12:21 -0500 Received: from localhost.localdomain (unknown [37.223.143.46]) (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 A0DF32087E; Tue, 8 Jan 2019 12:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546949540; bh=es46TivW9Kpxp/jDOK1Lil3w0c11Tvpf4AabeEtZPO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yFZjEtDs1AZHXXn7vAbebvOgp5xSSloJB1xI8pzf/dzV4CeNstN8HZulOetH/GTNS tUbKqABuYjWE+sThWZA30NwUdhaPzPDxEw35WZdzjqFVVR2W2r/ezWxTdK/sw0gvS6 Y0yw5lmsg2Lg2ihtWbCHe8EGnBhxZuwhYs+lClZc= 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 v3 2/3] clk: mediatek: Add flags to mtk_gate Date: Tue, 8 Jan 2019 13:12:07 +0100 Message-Id: <20190108121208.2473-3-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190108121208.2473-1-matthias.bgg@kernel.org> References: <20190108121208.2473-1-matthias.bgg@kernel.org> 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