Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp127265imj; Thu, 14 Feb 2019 16:54:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IbbpyuCKsEmgA67HF1hmf3Q0DNCbIcNjK36j8nrQQtt3mYjoh2C+e0+noYYVW/tP4C8CvNm X-Received: by 2002:a62:1112:: with SMTP id z18mr6972131pfi.173.1550192072841; Thu, 14 Feb 2019 16:54:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550192072; cv=none; d=google.com; s=arc-20160816; b=jjUosdVZbtnQYPGhoxU1yIHt9Ez56Hqxp+aAv3SM2hlflFtN1hcyneFmdhuaPTUO6U JgxQZRdJNqELsPV3furDFqBhc+WiZ8+W2XImjl9AznzujgQiyczYcuV12f4vnmmsJLcH LMjzLrdBNd40jOKXnHczG8MoY0REBDR9PmnTLJHrNcmrX9RSsxC063aFPQXDgTaqBorb AD2U2Q2Ed0+oLtgMTOwad7Y7GLxkda4hTOC4GvFjV17BUVzsSTBTL3KTbXMhYsP7RW7D qW5tEAoryTGl4hdwrKp0JKtEUQf4s/SGkKAupftgZ70K/vLIdOhZQFLl+EG3YMBA4Kq4 CL3Q== 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=Flkn9XivyhqupkNZZZTFFSgedx1Zf5FGMAe95VxmwmQ=; b=jCxTqKKlzKDfiPfSTxYiUzcg/UKb4saUvwDitYmBqW+akGmxcCDRQ5+pi9/QGZrfr+ FLi36EfbJBnEvZviceXrXByu3P1qES8tEvBp88QlwSI4et0tVUtIjvRuBnW/u1GvYp8L jp5tfG4M2opuv321jzk6YUUKr7XDk8ZYgJxwZCd0of8B5h1v5NXyJNxcOiJ7KFxrlMtl DIk8ZkJtD9QGhljoJFBJkugOc4PqI710bI5zqJehyAsRsJUMj30VSHRYcf7TP2me5qW+ eXsoEvQ/aORNpIZpjbY2RI0D7j9ONxqhZQUIE4DwbLLb/LCSyPr9QZ2tEI9PFetUAzkO fkKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T8bZfAGX; 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 c1si3698604pgt.247.2019.02.14.16.54.17; Thu, 14 Feb 2019 16:54:32 -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=T8bZfAGX; 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 S2439665AbfBNQcZ (ORCPT + 99 others); Thu, 14 Feb 2019 11:32:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:36326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728867AbfBNQcY (ORCPT ); Thu, 14 Feb 2019 11:32:24 -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 18F5F222DA; Thu, 14 Feb 2019 16:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550161944; bh=GbMzRensU03GT9hjWsSQCVuqqG+tPntmwIoS4ac4+Fg=; h=From:To:Cc:Subject:Date:From; b=T8bZfAGXAiMXSF3lC2oWdTr9u+o2hGATuJby8133xEJI8cPF6Gw4Dmd3pJRfYtDwv NZFtu/Bck1UYCQvphugUn81DUnpe9ZKOgD0klfqEyi5+1kQah2NrZ+ctGG815FVDLh JRPCBBgM6m0/Hdu7R+uAdXAdkFXmiY60b0iKQREM= 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 1/3] clk: mediatek: Add MUX_FLAGS macro Date: Thu, 14 Feb 2019 17:32:18 +0100 Message-Id: <20190214163218.26148-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 outputs of certain MUXes as CLK_IS_CRITICAL. Signed-off-by: Jasper Mattsson Acked-by: Mars Cheng 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.20.1