Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp788848imu; Fri, 16 Nov 2018 10:10:58 -0800 (PST) X-Google-Smtp-Source: AJdET5cxfrG1xgM6WS0EreXBQZGRRoMczbnNx1YgevQTh43kHzE7WoXeQwoLGAs0g1Th/lhhXq2P X-Received: by 2002:a17:902:9004:: with SMTP id a4-v6mr11737921plp.334.1542391858038; 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=kk5TziiuGN0Eumxzt9Mg1MfP672XVQEByzK3YAM1gLjYkoW1PJuayEBSzQtyR1x968 D036tgNL1eyth1nGi3A624SnL+zAC/r6vB3lTkr/uglf5QyEoKOhIlmYZ8nZaWZjNXYn +iwcl1a0LUtHiENkXQ8F463+6wZcHOUipIwS+XHawTrB8JI1T4UTFfnkXswMDJ0QgudT 5cbxiczVF0LiGZIgQ4ekobjKPfvP0IkFdgfInwnTebjSIrsSpLKAVQ5RP5FtWJLLHZYp tH5bGMmBLBWccmAfZmKMgAuvOyO58/UqEPeSYgsIQRHlyxNivl8iRYL0xGFyK0YHbN6K mQvw== 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=0TgGhAUFmkIzvCREp+n3djh2SoztBvgkrUI5npib7cE=; b=TCBnCTrqqfA/efBF1l++9y9AfP+mQdDlOCRxMPLTyLsK47zkvc/G2cNXVJkGTNxXSk juRCZMO3u/ad4RCgT82PcTJXlagFMNlLvlm4bZF5YuocLTTnUVrhu9jBS8vGfSAyfdcv dSCRZsgoJI7GXbMYFYTHVbvLRlS0R/GhXtjEfNmjpmwHkT/miXlpTyxhOah5cbdMfAym MKSFOpBs9viAAattLfx25JFlQOCAGiyQkVgSbD01u6QD/S5zAJauFVlbhwrgLHe5Dyet lC1B+yOyUG8+usJiZhegIKwoZ4173g/j4Cs1ri6a1Dqqj3mYFiA8ytbJuUlA36CHvhA3 EEaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vF4HyBQQ; 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 b4-v6si34480453pfa.25.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=vF4HyBQQ; 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 S1729224AbeKQEWq (ORCPT + 99 others); Fri, 16 Nov 2018 23:22:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:47374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727462AbeKQEWq (ORCPT ); Fri, 16 Nov 2018 23:22:46 -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 A462920892; Fri, 16 Nov 2018 18:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542391761; bh=koYjs/O6S2ll2adIR5ogmR06oyaBPZBKmqmStcHTAZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vF4HyBQQct2k9CKxqcQ2tmqMtxK7ZqzDnXzVeVD0sqaV9s1e35UGVQq2PPlJGlP4V vsfyPZ5Dr13utXR2Q+NZBmrZZeBhTGUZogQVBw1qy7K3kQO3fw6meoqa4Y/1dOF3LI buQIlpodly3vCZ5+khtz+mPzLaS1IJffmLTx4xIk= 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 1/3] clk: mediatek: Add MUX_FLAGS macro Date: Fri, 16 Nov 2018 19:08:59 +0100 Message-Id: <20181116180901.17737-2-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 outputs of certain MUXes 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-mtk.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h index f83c2bbb677e..daab6ee94788 100644 --- a/drivers/clk/mediatek/clk-mtk.h +++ b/drivers/clk/mediatek/clk-mtk.h @@ -111,7 +111,11 @@ struct mtk_composite { MUX_GATE_FLAGS(_id, _name, _parents, _reg, _shift, _width, \ _gate, CLK_SET_RATE_PARENT) -#define MUX(_id, _name, _parents, _reg, _shift, _width) { \ +#define MUX(_id, _name, _parents, _reg, _shift, _width) \ + MUX_FLAGS(_id, _name, _parents, _reg, \ + _shift, _width, CLK_SET_RATE_PARENT) + +#define MUX_FLAGS(_id, _name, _parents, _reg, _shift, _width, _flags) { \ .id = _id, \ .name = _name, \ .mux_reg = _reg, \ @@ -121,7 +125,7 @@ struct mtk_composite { .divider_shift = -1, \ .parent_names = _parents, \ .num_parents = ARRAY_SIZE(_parents), \ - .flags = CLK_SET_RATE_PARENT, \ + .flags = _flags, \ } #define DIV_GATE(_id, _name, _parent, _gate_reg, _gate_shift, _div_reg, \ -- 2.19.1