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=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 79224C433B4 for ; Tue, 18 May 2021 07:39:32 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 EFD9661108 for ; Tue, 18 May 2021 07:39:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFD9661108 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID: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=Ko84wtPD75ZhhqcmcrMj8NZYgowLe/vQY/uVh8NR8Kw=; b=BWlCc+1K9ZKr6v4R8Cfmv+tQA CLX/U7HMuEqryFzwe5iU3mCSUIvKo7m1sGRi78iOyK2PEfJmuziz8FGECsjJYomS7bUNVzbzlWj4Y 8PuCFJ3TxaGoRMsHX5xwL8FIl+BYdEU8XyYXh7sc2f4hH3EGQB8l/vwk0SU2T9US52737K8w2O+A4 xaCXTkOIbSNZSPCU/k4EsHBJmSmjTBWjX6ydsNCpbYBpSxivPl7apxNCvbPQuO75xcFGRBZyiSoEr phU/ESSqZlKPQL/zuywFyrEL07Zmbw82J2l8wpztGyuUZ0xw4xPyc219fcC6BKMLpo/QH/oOcybvR f1W308QGw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liuIl-00HOrQ-GW; Tue, 18 May 2021 07:38:03 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liuIb-00HOpa-PD for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 07:37:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:Date: Message-ID:In-reply-to:Subject:Cc:To:From:References:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=n5szVkmDytzCFFysXlMeXwZdOmvmm3DgEonzhUe+NZs=; b=3+PtfDTRhWGqS7zsTXO/gJz2Nn 8H1CZnpitP8TtkmppoIWrv802eDnF6/3zIdfSnXn3IJpNDg4nYDpI6p91kwjIyVGQT7WUTWxm3gbS TuGnfnC1ruGpCPFNk7sYj9qz0+6eaLDGMv9ZgmruTvxy/ib1Ps/6ei+eQJ99rkGGibE685RAJ4SGv lAbsq7Kmji11KT1FG4j+d3jKbjZP8NSpe96bWpT+afBDkTklNCZ4etzSWVlANdDQ1s2Z9/mskfMVX 2D/K/DjADXIntVY/7Mcrff4dRpDHpBuwmzrehht302iclZDQDBG+ypOaZUpQ72uR1ICcYoK9xS6Xy QsKPrFOw==; Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liuIX-00EQ9a-KP for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 07:37:52 +0000 Received: by mail-wr1-x42c.google.com with SMTP id r12so9041362wrp.1 for ; Tue, 18 May 2021 00:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version; bh=n5szVkmDytzCFFysXlMeXwZdOmvmm3DgEonzhUe+NZs=; b=E9wXKYF6dL0El8ZNRN65Z6CmACcbkRqJR3ZdX8ValaoldrM/XVIlDGsbcVc9xM+eIL qNvdHiv/6JBpkiFlAvlqvlZn1/nKz9+JP/QfDvqQSCqcgZ5rUSU+0wE0TH4SYRoHgMPJ bQE4TSBPniexesWLhEm+mpLR0LM1++5YwBNGa6bNyk073bQxgjhIllLpWRoHNFGNeggN zhjsU/phSkKoOOTRiq26uymQ1N5S2qjEtjSxxpX+nQRoEHt924OgQe2pz8DSg/mi8cDO wizZ6nWKkVlz19TbhpglLLQK9n3n+Jf82tptgiaIrqEAzsVBoITATd61rVnfLIr40eGe 4rPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=n5szVkmDytzCFFysXlMeXwZdOmvmm3DgEonzhUe+NZs=; b=bD685gbkhJ897KHMH7TkdxxQc4jFNbLhnapJ6hKqJKs65mWIkJc1SM0GOpjERSl6I+ XtaaBwTOkAlMH5f7dwvhhh+/oAvSoYQ6sCLR6PxpPNutrycrAyu5DT2B6GxrFfjtiNvT 3NIwjhzyxaonLFlkSxAUtcg3T82ZO2grSuf95dhUuiPVxN82m7wUr42Cf3Ufi48Zfdh7 J2qRoRuA1HqkaaR0E5MXXW/AwZMb3hTr59VvrwvVxRNJC57tf+5KojulWernXSxHYy87 bUpADR/U2wNnrrQcQMiF+UbRElNeP0wTdpmSgmCnGhvReWeALmZwSZQ/AhySIX9Xx/IV 0dFg== X-Gm-Message-State: AOAM531SzTCO9fFYlSsvY1cswfDg8V6vGvFS4vgVl3PEieYcq7idQ8AD DpL4a7vaHbMo+vVQ4UGZr1Lh+IMGHqOlDA== X-Google-Smtp-Source: ABdhPJxPm4kXQ/GUstw9/tmCmcx/mApmQsELG0ZEwn97QcrRxaG2c/FQ3PsX076/9/osBLg+SZV2eQ== X-Received: by 2002:a5d:63c1:: with SMTP id c1mr5049978wrw.71.1621323467412; Tue, 18 May 2021 00:37:47 -0700 (PDT) Received: from localhost (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.gmail.com with ESMTPSA id p6sm5037371wma.4.2021.05.18.00.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 00:37:47 -0700 (PDT) References: <20210517203724.1006254-1-martin.blumenstingl@googlemail.com> User-agent: mu4e 1.4.15; emacs 27.1 From: Jerome Brunet To: Martin Blumenstingl , mturquette@baylibre.com, sboyd@kernel.org, narmstrong@baylibre.com, linux-clk@vger.kernel.org Cc: khilman@baylibre.com, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH RFC v1 0/3] clk: meson: rounding for fast clocks on 32-bit SoCs In-reply-to: <20210517203724.1006254-1-martin.blumenstingl@googlemail.com> Message-ID: <1jwnrw1ohh.fsf@starbuckisacylon.baylibre.com> Date: Tue, 18 May 2021 09:37:46 +0200 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_003749_752685_83CEDD01 X-CRM114-Status: GOOD ( 20.72 ) 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 Mon 17 May 2021 at 22:37, Martin Blumenstingl wrote: > On the 32-bit Amlogic Meson8/8b/8m2 SoCs we run into a problem with the > fast HDMI PLL and it's OD (post-dividers). This clock tree can run at > up to approx. 3GHz. > This however causes a problem, because these rates require BIT(31) to > be usable. Unfortunately this is not the case with clk_ops.round_rate > on 32-bit systems. BIT(31) is reserved for the sign (+ or -). > > clk_ops.determine_rate does not suffer from this limitation. It uses > an int to signal any errors and can then take all availble 32 bits for > the clock rate. > > I am sending this as RFC to start a discussion whether: > - this is a good way to solve it? .determine_rate() was meant to replace .round_rate() so I guess it is good to do it :) > - what are the alternatives? I don't see any ATM. Even with determine_rate(), 4.29GHz limitation seems a bit low nowadays. In AML SoC, most PLLs should be able to reach 6GHz ... hopefully we won't need that on the 32bits variant ;) > - getting some feedback on areas that need to be improved > > > As always: any feedback is welcome! > Overall, looks good to me. > > Thank you! > Martin > > > Martin Blumenstingl (3): > clk: divider: Add re-usable determine_rate implementations > clk: meson: regmap: switch to determine_rate for the dividers > clk: meson: pll: switch to determine_rate for the PLL ops > > drivers/clk/clk-divider.c | 39 +++++++++++++++++++++++++++++++++- > drivers/clk/meson/clk-pll.c | 26 +++++++++++++---------- > drivers/clk/meson/clk-regmap.c | 19 ++++++++--------- > include/linux/clk-provider.h | 6 ++++++ > 4 files changed, 68 insertions(+), 22 deletions(-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel