Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4674943pxb; Tue, 28 Sep 2021 01:08:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF+a7QiWFiK6qC6Qv4r+FtJV3CPerpirflzMZdqls+k/KIGs789uaixs7U9Pg7B8vp8Pmf X-Received: by 2002:a17:906:784:: with SMTP id l4mr5085163ejc.469.1632816503197; Tue, 28 Sep 2021 01:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632816503; cv=none; d=google.com; s=arc-20160816; b=ZFVmI9uCFfBSG5PSJ7DfL8S0WMgAqAnoThoQjyPwTSoM1goj0Lk5LM/z3xVAg9jiI0 ZpgX/hq/ulUV+6L3g2ma5OSmWwxDf1SvjjV0FLwTvjKNiQGIafn7q2PA1kYMfG1mINRB jxpB4V5fsh1IFqxj2+CyU263dsNHAbFCdexTMlYmCi1uIy8r29t6bLzuEEy8B1b4qXQr L8uKRWO1KNxrPpw3nqqQRN/HUUrhIGnmCz4Dl63WiO5Df5Fvun+hbga3glCU3Q+u/nSc ahVUdylm8T3BvutZbGAvJwU+JTAf221ditvYRzhfX+pupcT6uhNuvLx0JZofekS4bCbp wM/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Gebz/40zT+RiTUUUWaWiMLhZd+FwHe7fYQoeo7vkMek=; b=FSe/qCSeOMEhja7EMTUFqBxBBB6tH0qUsr2qWXrgpCN3ZpGenlpxAe6Kv1EOEd0XnY iQkZUYDfEwhWM8syZSwLb+PcsciiSPEdWjV63hVzxyH8hJy1aNDzB4bwMbVZed57GSNx PeIy9XQc49brjSg7Hsadnyk4FCr80N7LpKBv93kOLHPp8e6mX/kP3nmbvCz1hqCum21M VjmAESR0nnvAFGAuOluveLLKeF4uughV9p+HzVnFhjYERiDeyG0jo8A+ZtEk+whet2tY DjsHo/w+fo5GOs5uYYtKkRn5h0Q15rml2b7OMitwFSQMYEVftntipStj1hA6vPzQZd3F Wmsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=t9WhNWrI; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ZyezsCjj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si20082960edm.533.2021.09.28.01.07.57; Tue, 28 Sep 2021 01:08:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=t9WhNWrI; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ZyezsCjj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239568AbhI1IGL (ORCPT + 99 others); Tue, 28 Sep 2021 04:06:11 -0400 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]:33561 "EHLO wnew3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239287AbhI1IF3 (ORCPT ); Tue, 28 Sep 2021 04:05:29 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 098862B0146F; Tue, 28 Sep 2021 04:03:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 28 Sep 2021 04:03:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=Gebz/40zT+RiT UUUWaWiMLhZd+FwHe7fYQoeo7vkMek=; b=t9WhNWrIl5jFdMawjprxVELGu443e HXX46hFbuEY2Hf8PwYujgRQdN6TBk2odSNxf/j3ZYIxqsoVNTDr8qo9bpUW72jAd YxSxBpq3vMsDd9XiwdaTMKbq1VrqN+S/t/RzTIEqxrebZAdWgle3vr2zp3NaEDD3 EXA9OeRFaS2DYFCNj9bx6sK/L8CgyaUlblU6gqVF96vGZyvIdK0z+fbstwkihqII x0qIs83kD2ayuM6Ql8JpZBLaZMhGLa9wJuv9ilDpTJ/mu67CNWhpo+ZCWs2yJC0K XRdz9kz4zS0L4pfhTlWDRzwOyOEgMXmOjal3jZVVPFd0zLiwbuC8QZvRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=Gebz/40zT+RiTUUUWaWiMLhZd+FwHe7fYQoeo7vkMek=; b=ZyezsCjj G/ScdXrnh6/8LuHY7lmJmGOMvqPJcLpi9hIvycADHrSHddcWQnDajdh9qTWyexkd TMGfmmERwqhnj4SWefcmaS7ynH7bzF18JvkJJuJNqzEEq+BVFdvY6yIdqEmgo9VN Ay6uxLeoK9RCHKsoV5z+EHDXHpicNkkRDIvaOA+9TBLLNC0skJbrYKwZ/jFkX/HB /0EPJsGIkI3FI/AepEitzffKuJWXvjVeizk2tm0WDpWfZWB3xvjYxwjT6wgBCLhg 7NvQITvIR5ZA1O8dF53M2r7O5OgVOjapkOXt3ti4SYLel0XRVvn+ct3KEjFgQaw3 xLyYMQwAs0qYTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejledguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheej vdfgjeehueeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Sep 2021 04:03:43 -0400 (EDT) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Rob Herring Cc: Michael Turquette , Stephen Boyd , Alessandro Zummo , Alexandre Belloni , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-rtc@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Samuel Holland Subject: [PATCH v2 3/9] clk: sunxi-ng: div: Add macro using CLK_HW_INIT_FW_NAME Date: Tue, 28 Sep 2021 03:03:29 -0500 Message-Id: <20210928080335.36706-4-samuel@sholland.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210928080335.36706-1-samuel@sholland.org> References: <20210928080335.36706-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To use the external clock references from the device tree, instead of hardcoded global names, parents should be referenced with .fw_name. Add a variant of the SUNXI_CCU_M_WITH_GATE initializer which does this. Signed-off-by: Samuel Holland --- Changes since v1: - None. drivers/clk/sunxi-ng/ccu_div.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu_div.h b/drivers/clk/sunxi-ng/ccu_div.h index 6682fde6043c..4f8c78a4665b 100644 --- a/drivers/clk/sunxi-ng/ccu_div.h +++ b/drivers/clk/sunxi-ng/ccu_div.h @@ -166,6 +166,20 @@ struct ccu_div { SUNXI_CCU_M_WITH_GATE(_struct, _name, _parent, _reg, \ _mshift, _mwidth, 0, _flags) +#define SUNXI_CCU_M_FW_WITH_GATE(_struct, _name, _parent, _reg, \ + _mshift, _mwidth, _gate, _flags) \ + struct ccu_div _struct = { \ + .enable = _gate, \ + .div = _SUNXI_CCU_DIV(_mshift, _mwidth), \ + .common = { \ + .reg = _reg, \ + .hw.init = CLK_HW_INIT_FW_NAME(_name, \ + _parent, \ + &ccu_div_ops, \ + _flags), \ + }, \ + } + static inline struct ccu_div *hw_to_ccu_div(struct clk_hw *hw) { struct ccu_common *common = hw_to_ccu_common(hw); -- 2.31.1