Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp788849imu; Fri, 16 Nov 2018 10:10:58 -0800 (PST) X-Google-Smtp-Source: AJdET5fa+QVH7yKZx4hKcPUJaIuvd6z8SeVWHol1fBWRNVAHpOm1jR+sh4TnTLdjIqHxqb6SDJ/L X-Received: by 2002:a63:1766:: with SMTP id 38mr10652855pgx.299.1542391858035; Fri, 16 Nov 2018 10:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542391858; cv=none; d=google.com; s=arc-20160816; b=lpbEnIwYy5wHByn1TUAFW4c3Bh+E3R5h+TVZvYOGJ+//EXz2BUcwGF9oeeE6QYl5if fH6+yj/2TOt/tqVThYlVMA/WeLnWgtSd5fdDNMOVVeok6cFOkBmYAUHh2vcIQXAHqC8g oxylHrqRwtbwez8de8Cfy8V/zkpg5n+2Wc0Jx+dAKNWQbGH0xr5AObQKRBwZuIyex/6I u13uJiYzUkUN5/fzNWWchoUT4D6iGXzidpypTfea2Nql5mUAxDs07V69CRP/fCRj6EhI KEMqvaOY6dgawFp0o9nfs52Jbgrk5SHOr90dw9HCa9yqBJC406cxwZtZ1v27DeL9lSOi WgfA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qkn2UF5R3OYglv4Kc6B4F8TwQhIOV+m3Ar09x+RN83Y=; b=H+lkX0yn51AM5RrD6Y9pRC/hn9xPEQrCblecrO7F6J8Yl8Y4NcLnL3ZkcuezpfiDYH i0sNIeYoq9qB9NcrkfjsPnz15Hja303/rpFYHO9r3zi8zAnkvJ1XeutnQSoKANakhy37 XWCFgWI4AAw2A6D0H/gjbhHss7XDi4jpNSBRi/RhLW6AUdhO6IeOXnkDZ6wUnEImIACy OTThGWOHXVjuLJ8rvZqUXQfH69tKCPKFMdwvZUtn++Be0iC4Ii+a/amzF9ZswZLUDORc +VFq8BAJ9Z4k+M2JRtqJHnZYFByHyvckpiDizDNHLslRt8N2Uucbl4NTME72dQEaxxyf 3xLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=erReW1O1; 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 k15si29899627pgi.99.2018.11.16.10.10.24; Fri, 16 Nov 2018 10:10:57 -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=erReW1O1; 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 S1729377AbeKQEWt (ORCPT + 99 others); Fri, 16 Nov 2018 23:22:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:47396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727462AbeKQEWs (ORCPT ); Fri, 16 Nov 2018 23:22:48 -0500 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 Cc: jasu@njomotys.info, sean.wang@kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org 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 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. 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, -- 2.19.1