Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5117098pxb; Thu, 14 Oct 2021 19:57:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFuN1J5EDTLhxg9GeH3eOJ/ZgB5O3eyqQP636Np/xSfzZfPPBTFwIOlhRYWWw5G5wlrLCY X-Received: by 2002:a17:90b:38d0:: with SMTP id nn16mr10342190pjb.96.1634266663968; Thu, 14 Oct 2021 19:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634266663; cv=none; d=google.com; s=arc-20160816; b=torGg2HWCT40cg+pKgyYO9MEC5ZdSFhcWOUBR8+5UwmK2JKzr82QSITu0P97qCY+32 XlhNY4VkzP2W70r50YVT/Wm6RuIhsGqs9oDz0J/GExFlN5AbzAo5pxSeqXQ41LgZYbi0 fz+RNo9C16cuB3esvgTyYkQHhZrvepYUg7H3ivSWoiZxYb2swxIebRpu6O+VXHUs0nJc 4ZE6OMGjbbncx6vbTC1/BbWKhLHEYUAJV6/KUncbPShQFpB4tj+rHeX+lrOYyjW39pVx whV0CgxD3GCIZxM7pHoUuhqPGtSsO4Gm/EZcrPvWl/0jvwdEnHXNQr0p8PGZNi1zTBvp rEFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0G1ek7ZBrsfvEMx8aW2NfxaGqkDzfGWBoT86b86MplI=; b=i0eGkwALv84NyRuC5NGt5m1Iuz8nxXIPfEdkm7+xx4Rt+8gAamXDo6pDrljFf9UJDr EHVMDUKJGnTHNXCHMUkLuyRZkJyXz1W1YgeAu4wEGQ/G3twFfjDA3Umzoy0k7zbChyz8 RtLpnRthlorHJttJMmw1qCqo0LlejtkXhXVPmjRp8pCvV2ctEt/71iasBlthS2K5VrSt Y4er3nGodWTjm/dFAosuCh/06gQSQM7PRVAIS2n80EU3RWS/T+dbcZ5nfNEKh424JKD+ hae126QuPKdFlLnjf7OzCUQN4WVi3CmxyZ10UEHUMGMFx1c8qH5Zu+xxqAgKSNMqTXRq i1SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=FToFnMkK; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c10si7792817pgk.43.2021.10.14.19.57.31; Thu, 14 Oct 2021 19:57:43 -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=@googlemail.com header.s=20210112 header.b=FToFnMkK; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233160AbhJNVhN (ORCPT + 99 others); Thu, 14 Oct 2021 17:37:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231180AbhJNVhM (ORCPT ); Thu, 14 Oct 2021 17:37:12 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A971C061570; Thu, 14 Oct 2021 14:35:07 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id w14so29528193edv.11; Thu, 14 Oct 2021 14:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0G1ek7ZBrsfvEMx8aW2NfxaGqkDzfGWBoT86b86MplI=; b=FToFnMkKD4MKFnKjPCwfsoy2mnqVDS3sRZgXtzPItTWybAxQwe2cMJhIghTLzkEmj9 9idEwv9rNR3SMPkWxaOc3HLd0xKUqO98kvf+SzXgUfdZbXgLMMSkyRHGmNH2GCRyuxmS LgRQvte/s4lmjMMlRtuLYHAsmPIfdnbDIl6rm17rJ+bH57P+tI879CPN+3tI4bWA1yLH XMqpaFQA6yzjwLMcUANR2rHQOZF0WjDp0WHc39wvkRC/JC/oijVYp/NBJH6VNRvXe9WJ oTnJleLPpHS4xZVGS01WNvVAIlVh+VPh1oIIghiStnGEqUrPAB5OyzSQTUiwnZwwbtM6 d3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0G1ek7ZBrsfvEMx8aW2NfxaGqkDzfGWBoT86b86MplI=; b=CGLapjVzhcIn+/3kiK9oF6NCpYi7Bnch4YTDAyEM3Rd896sDT6+GW+RjGAVvXUTzh3 lSJYniFiwJU8eY0UMI7AlBbNwVB5VVU9mhCPsEeljtZCmxP9lvmOMJL92fTX2gglgers wDRRAwE2ZBKjWw40ae1rtCmwuqE2wMShZFNo5aXkW1UQ1U+CvInY/PK30M/A/3zScd/l 0HcjK69lK+/7F7UnCseAfnyXRWTsJj0DxV1QnXnJIW7/S9VUeOornDTm/gc7zvhECEBl pQ0tlAZ83Slr+g9y0MBgREU6PyJnALM7So9ORlTmC620gY3TmEk+b19qniKT4NX9L7Ly YwGQ== X-Gm-Message-State: AOAM533KB7hSP/wyBoRoeWYA1HIWoCly2lRm8Qk4vituICfc6lzqExQ2 3cWBCFhsTQL19IpZ27+V8Kh9hC8x0+t9J8yvRmk= X-Received: by 2002:a17:906:a986:: with SMTP id jr6mr1858072ejb.520.1634247305465; Thu, 14 Oct 2021 14:35:05 -0700 (PDT) MIME-Version: 1.0 References: <20210702225145.2643303-1-martin.blumenstingl@googlemail.com> <20210702225145.2643303-2-martin.blumenstingl@googlemail.com> <4eb964ac-4fff-b59d-2660-2f84d8af5901@gmail.com> In-Reply-To: From: Martin Blumenstingl Date: Thu, 14 Oct 2021 23:34:54 +0200 Message-ID: Subject: Re: [PATCH v1 1/6] clk: divider: Implement and wire up .determine_rate by default To: Alex Bee Cc: linux-clk@vger.kernel.org, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= , linux-rockchip@lists.infradead.org Content-Type: multipart/mixed; boundary="0000000000001e2ebd05ce56dabf" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000001e2ebd05ce56dabf Content-Type: text/plain; charset="UTF-8" On Thu, Oct 14, 2021 at 2:11 PM Martin Blumenstingl wrote: [...] > > Reverting this commit makes it work again: Unless there is a quick and > > obvious fix for that, I guess this should be done for 5.15 - even if the > > real issue is somewhere else. > Reverting this patch is fine from the Amlogic SoC point of view. > The main goal was to clean up / improve the CCF code. > Nothing (that I am aware of) is going to break in Amlogic land if we > revert this. Unfortunately only now I realized that reverting this patch would also require reverting the other five patches in this series (since they depend on this one). For this reason I propose changing the order of the checks in clk-composite.c - see the attached patch (which I can send as a proper one once agreed that this is the way to go forward) Off-list Alex also suggested that I should use rate_ops.determine_rate if available. While I agree that this makes sense in general my plan is to do this in a follow-up patch. Changing the order of the conditions is needed anyways and it *should* fix the issue reported here (but I have no way of testing that unfortunately). Alex, it would be great if you (or someone with Rockchip boards) could test the attached patch and let me know if it fixes the reported problem. Best regards, Martin --0000000000001e2ebd05ce56dabf Content-Type: text/x-patch; charset="US-ASCII"; name="0001-clk-composite-Also-consider-.determine_rate-for-rate.patch" Content-Disposition: attachment; filename="0001-clk-composite-Also-consider-.determine_rate-for-rate.pat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