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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6AA53C0015E for ; Mon, 3 Jul 2023 10:45:35 +0000 (UTC) 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:Message-ID:Date: In-reply-to:Subject:Cc:To:From:References:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=+d4H4MFoRM6P15NGKbUJo3e1qpjhNOdbEGUrE801IrM=; b=C//wd5iguqVS0tyE4RGYNgbNfE y0sHCLOkUzcYo3Fs1i98gpQIAHo1p2xAaSALHCtMO6HY8s3VoU4tSAdxQJt1MLF9OS0XoDNzMuaQH a3Arp5tQLJaprOakviDZpCmDDV2/bk2WKhQMNNMrokNOOs2uqonu0vyH9hIrJ+zsOmbZjDL7ozOcK YdlyJIsLoNIF9vbeGp4LGx3NrjZh/84c5ow6olT0psJ9Ik6ct5TnFyYCQCaSV4MwXm1OyBCkTpnpA lWsMuTQKx7tP83PO2UXA1FuyzKmsGAPVZd4dojOBE8LKRfyPJc1U3S2WVonbkFOj7/qH2lj6jyNWR PwmW1SEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGH3h-00AHvh-2B; Mon, 03 Jul 2023 10:45:29 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGFyh-009xIs-0z for linux-arm-kernel@bombadil.infradead.org; Mon, 03 Jul 2023 09:36:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:Message-ID: Date:In-reply-to:Subject:Cc:To:From:References:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zBBsuTVav6vfnGbrZf+Lz4bRJkmuMheylCTqMuDos48=; b=lfBethN1RvoHjoEz+JgG5v1Lyw 5iCyIRxj/oElglyQP/LIGYcIOF1prdsKy4vRxzflmkqjFHIy6erI9qbHrQr0s5L5zMBKIBds0eT5g m+iFyCUQKmyCrEGTMjXCOgeA7Q+rHOIEfigAS6snq+aT30MFdm1arGy1CISeGyPzmLxTJZcfd/bGP ByTB7yWjOsfbKX8wTQPoPsdnvfPKK7qs+lc4ok0zBPWp61MputANEPLYnGrzQXGzQIFpqO9JjxnWj fpppxXSuf2T//P6GVnd6KfOB7cP3GMESm/MHKVneKNoZTJeZ4PVaQUdEHIniJ9V5jUHgJ+ZxrfIiy I/EjHuyA==; Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGFyd-00A37h-0U for linux-arm-kernel@lists.infradead.org; Mon, 03 Jul 2023 09:36:13 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Qvgbp2SrFz9snc; Mon, 3 Jul 2023 11:29:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oltmanns.dev; s=MBO0001; t=1688376550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zBBsuTVav6vfnGbrZf+Lz4bRJkmuMheylCTqMuDos48=; b=SE+0JRdHcYANbRAfup4b7XMw745p4opXWmIMTCefwWUXzM/Gu7Q5gvZbRjq2mHSr/1+/uC JEsbcAbcDcTTnSuIh2uxqJ87CS3uj2ybDl47j0yhFYBdhH6DiL5Lkz+xcfiKKGZE2HVO1H y8590C3vyeYHHMeCqdzptH3wSgPrHHaGX/xnYFlp+rH2BfXw72uA67MFmDIrlJq2tlALF1 0rorKXrMMH8n4hc22DkhOi7McBvtqzegVR7HOBg1oJV451l//enKeEcgXkP+NHBhVDp8lF vNruh85DGZ86zRaZngdXio2TMbdh8minYAYdTIOn9p4L+UMu1XIS49Pf2guwHA== References: <20230702-pll-mipi_set_rate_parent-v3-0-46dcb8aa9cbc@oltmanns.dev> <20230702-pll-mipi_set_rate_parent-v3-8-46dcb8aa9cbc@oltmanns.dev> From: Frank Oltmanns To: Maxime Ripard Cc: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara , Roman Beranek , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 8/8] clk: sunxi-ng: a64: select closest rate for pll-video0 In-reply-to: Date: Mon, 03 Jul 2023 11:28:59 +0200 Message-ID: <878rbxs5r8.fsf@oltmanns.dev> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230703_103611_445165_87E38B4D X-CRM114-Status: GOOD ( 13.91 ) 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 On 2023-07-03 at 09:50:05 +0200, Maxime Ripard wrote: > [[PGP Signed Part:Undecided]] > On Sun, Jul 02, 2023 at 07:55:27PM +0200, Frank Oltmanns wrote: >> @@ -541,7 +542,7 @@ static const char * const tcon1_parents[] = { "pll-video0", "pll-video1" }; >> static const u8 tcon1_table[] = { 0, 2, }; >> static struct ccu_div tcon1_clk = { >> .enable = BIT(31), >> - .div = _SUNXI_CCU_DIV(0, 4), >> + .div = _SUNXI_CCU_DIV_FLAGS(0, 4, CLK_DIVIDER_ROUND_CLOSEST), >> .mux = _SUNXI_CCU_MUX_TABLE(24, 2, tcon1_table), >> .common = { >> .reg = 0x11c, >> @@ -549,6 +550,7 @@ static struct ccu_div tcon1_clk = { >> tcon1_parents, >> &ccu_div_ops, >> CLK_SET_RATE_PARENT), >> + .features = CCU_FEATURE_CLOSEST_RATE, >> }, >> }; > > I'm not super comfortable with having to set it twice for dividers (or > composite clocks). Could we set CLK_DIVIDER_ROUND_CLOSEST automatically > if CCU_FEATURE_CLOSEST_RATE is set? You're of course right. If I'm not mistaken, I can use SUNXI_CCU_M_WITH_MUX_TABLE_GATE_CLOSEST that I introduced in div patch (PATCH 7). Otherwise I'll create a similar macro for use with tcon1. > > I'm guessing we would need it for muxes as well? > Yes, it's already in the mux and div patches. Best regards, Frank > > Maxime > > [[End of PGP Signed Part]] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel