From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BAD9C432BE for ; Wed, 1 Sep 2021 05:42:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 22D2461074 for ; Wed, 1 Sep 2021 05:42:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 22D2461074 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DjRXFpESRzU8x4gPp+wtiKjT43exxY9EUowm7W1xhss=; b=mDdrn5OkkiD0rl gG5ptiVyaFJyi6ICHjkoqbZ6FijtPVP6TS/XVaiI2QLoSA7iUsfFHxhRqAVmjBVKcWHP6YUk1zF5e 5tIiwOwZCGoBW1LbSBq/5LiHu6tPQRhHa/niLH/pTOk71lQA98Q2yYeBuEomd4fn0Wi9pGjOXEmiI CGCExYBoGcCrKI0cOBkz/AhGrKg1X2YxpDTy5aYjVuwZGQbiqcUuRqeDQSbSnch7H1+Dasxkqae8g buidwVDlZlh93NxhRRDRCB88gGYDGrs5vXuLwiu+nBkTlA+BUR24PEhPyX3QLEnxqHWT6xgxgJ71u G1fl7UWCCo/tuFmdCVkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLIyv-003vFI-6R; Wed, 01 Sep 2021 05:40:17 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLIyc-003v9Z-Mb for linux-arm-kernel@lists.infradead.org; Wed, 01 Sep 2021 05:40:03 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id EE038580568; Wed, 1 Sep 2021 01:39:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 01 Sep 2021 01:39:57 -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=xm7Y8fEf134No HobrQ9IyVP5eZVPNtG57R+gyfqDAkc=; b=oBUtnAYl2+2Rs7fk7WmqGOp4/X/I3 yYLn/YDjlsYtXq6TARIViIGiXbDZEwN79+0stclM63Tzz8LMthK/V6W3tOVBQ0c5 zv+m2jbDVQPcZUIzVacv8LYMN7dPlcG80Qdz3teX1atoaE8hVeyOyxKEJ86aDz8i OwKnVlG4kzwyUWPWb1FgoAeCqMgZF9FJ4JNTriJBrnUS3PbTFGXgwAcn14p85vce HZ+B3YH9IaTiDNT6zdOEPuRbu8LRPQksz01BU0MmNKIlZq/ooPWpEIiVhzfS8xBT fav61RCojVWyClLLgOwutQiP4fRV9lGTLu+HNen6tXWyHJGl6JYkR8M1g== 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=xm7Y8fEf134NoHobrQ9IyVP5eZVPNtG57R+gyfqDAkc=; b=H+BjWZNP iApnlLx6xJnVvdHoL3AW2yelZ0jFvHXTB7OnplEa6LZIdUYUt7RIF925BC/OW+45 0Nu/halsRAEG5q4JGhCgtp33IIL5/yilzgPFe2vdIzwpV/vj408uyOl2lhEQGTLV 1rIlUO4mdtioMgd1OHeZj3Fbjxj/58+PYS1OcKfvjO6R+F4w8qQ5CWbUTG3SqVC1 4IRn/RxsAppJx3taZab2jSTd1C08we69lOMt64Tswunu5liauov0U7t/OiCCwgU/ +XL5rzY6bcZUPMeTK8D3K0GEf9f+lZewynxkTq+XCE6GmpdP4F4bcVzJ54sMZ4VE PwnGG+8BR5ISjg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvvddgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Sep 2021 01:39:57 -0400 (EDT) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Rob Herring Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Samuel Holland Subject: [RFC PATCH 3/7] clk: sunxi-ng: mux: Add macro using CLK_HW_INIT_PARENTS_DATA Date: Wed, 1 Sep 2021 00:39:47 -0500 Message-Id: <20210901053951.60952-4-samuel@sholland.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210901053951.60952-1-samuel@sholland.org> References: <20210901053951.60952-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210831_223958_862940_E62A0A56 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some muxes need the flexibility to specify a combination of internal parents (using .hw) and external parents (using .fw_name). Support this with a version of the SUNXI_CCU_MUX_WITH_GATE macro that uses CLK_HW_INIT_PARENTS_DATA to provide the parent information. Signed-off-by: Samuel Holland --- drivers/clk/sunxi-ng/ccu_mux.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu_mux.h b/drivers/clk/sunxi-ng/ccu_mux.h index f165395effb5..5aa5a6f49bd8 100644 --- a/drivers/clk/sunxi-ng/ccu_mux.h +++ b/drivers/clk/sunxi-ng/ccu_mux.h @@ -73,6 +73,20 @@ struct ccu_mux { SUNXI_CCU_MUX_TABLE_WITH_GATE(_struct, _name, _parents, NULL, \ _reg, _shift, _width, 0, _flags) +#define SUNXI_CCU_MUX_DATA_WITH_GATE(_struct, _name, _parents, _reg, \ + _shift, _width, _gate, _flags) \ + struct ccu_mux _struct = { \ + .enable = _gate, \ + .mux = _SUNXI_CCU_MUX(_shift, _width), \ + .common = { \ + .reg = _reg, \ + .hw.init = CLK_HW_INIT_PARENTS_DATA(_name, \ + _parents, \ + &ccu_mux_ops, \ + _flags), \ + } \ + } + static inline struct ccu_mux *hw_to_ccu_mux(struct clk_hw *hw) { struct ccu_common *common = hw_to_ccu_common(hw); -- 2.31.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel