From patchwork Tue Jan 8 12:12:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 10751951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 494BD17D2 for ; Tue, 8 Jan 2019 12:12:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 373BE28BF2 for ; Tue, 8 Jan 2019 12:12:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AC7A28C18; Tue, 8 Jan 2019 12:12:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CDF0328BF2 for ; Tue, 8 Jan 2019 12:12:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=yUSMp+fiYaH1gQTzKofZr3cZ0hu9+K1JeWNJmUpdtHE=; b=JcqzxQKOQfttFtNwsZ/KewbyXw mXT5H8MIIGuPyJ+fL7O+YAl8LSrV5sk1I56WwrzEcqyI2gSNOC6mNXizsPdDSeJUyQklqMoRbHPTv 9FNOJsFmG7BhBVBq56MgdSTWLckNSYIfnr0jxJpy5oOwMgDLPEHmf0IMk/qXh+FDV6zYAB5XkONs3 MpwqBKpbewJCXcvpKMJ58SS0jaNt5wCjRWtKvoR/PEPAOJV42/HgZ+9VxmmAS6ap8kLI3lPAZXAUz PRFQhJ7X0OWEvXSniAIplyhOwFXZhJmU5JE70OO6lKWyrEqLYKdaczcU91EmlsNaBFlCOXlCLdyzx RWs5X3/Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggqFJ-0000vI-0v; Tue, 08 Jan 2019 12:12:37 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggqF0-0000fU-H3; Tue, 08 Jan 2019 12:12:19 +0000 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 1FEE320850; Tue, 8 Jan 2019 12:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546949538; bh=GbMzRensU03GT9hjWsSQCVuqqG+tPntmwIoS4ac4+Fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oCNSQy50IPlll4Xu2ka1u4t7+FyEbf98Y+EjdA+edI5PryZwRs/NCaYEHCbs7B6Jv y/YfcR11K/kOXCr1PrNlay6mugj/63Y41g4gO60u6AljVTAGpA1PBkqBkyWhWsDCHu BeYfG2LMqUY/qPmLNtTToSnPCLS82dKus8wQunek= From: matthias.bgg@kernel.org To: mturquette@baylibre.com, sboyd@kernel.org, kevin-cw.chen@mediatek.com, mars.cheng@mediatek.com Subject: [PATCH v3 1/3] clk: mediatek: Add MUX_FLAGS macro Date: Tue, 8 Jan 2019 13:12:06 +0100 Message-Id: <20190108121208.2473-2-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190108_041218_578371_447F313F X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sean.wang@mediatek.com, linux-kernel@vger.kernel.org, jasu@njomotys.info, matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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, \