Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2599596pxb; Sun, 17 Oct 2021 20:07:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx53ak9IC57yz3O3JHKmY8kbnTKoj85X8ZSX2Vr1bu9sdbPGSETIlRFJ8XlRbUReQOhrksq X-Received: by 2002:a63:f306:: with SMTP id l6mr20843262pgh.72.1634526441804; Sun, 17 Oct 2021 20:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634526441; cv=none; d=google.com; s=arc-20160816; b=CPgUUxPqMxIezZ/mDug5cUkmp6w2mwfKIu9ZidLvjTMRZPeD82BT7cLayundV36VlT nrNYe5HKVomhjFpi+RdBtM7vLh5nMgcGX8xS6g9J6lPQk8Bw2uptXqj+nYbVc75goKoB oxintn771xm+/J4vcjDTfbg5BJTMshyrH7qOOFZqmDmOEWvi3kbXNP4QqBi55k4OQZI8 uJm5sMrByufmwc6yCSDJA7fvHM2ro9reaMVwi0J0zHVXjpwn07dqkqQirXJqz+pwIfuf rlHAp+1B6WhQjK1cIkrPFwcOKLbxLY/16YlpqE0jSHv7Cgnn5yKRS06YFjTXNX1TLC5q Fj9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=QNUJyl7CqYF0RbqP23fSOKnChSyYkX1cJLYbSZI3y6c=; b=I99Lzm9GqyRjt7R1MAUDz23GxACJ9sLKxZZD3yHDEdgJdvTWy5YK0Lj+5SHj5K+TEH g9pdCxgb7cNPTB+ILDO94Rwqp9j6wviglRPRCt7+tGP5FExoFx5DhFocJRX0d6ZQ3HU2 oD/nl1JCi11V/SUQGhsWAwX3WqoFHZoYGHWxJJNITZDyHoiiYAobIkhvynFRCNAJ2Sa5 ZEZDgncXnFH+QT1auKuRKOEqB0zxmaLwexoU3mScY2ATQuRLMBEN1rVlDwNwQsrB980N EqNe3uq/y/fvifuWJH7kx6L5wtaGqCCbt8BclZwJ/dynlehZbT9Fk+RYl403kfChJ9Xn /iAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nZAIRxyI; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h191si2962950pge.456.2021.10.17.20.07.08; Sun, 17 Oct 2021 20:07:21 -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=@kernel.org header.s=k20201202 header.b=nZAIRxyI; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243114AbhJOVeI (ORCPT + 99 others); Fri, 15 Oct 2021 17:34:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:44026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243106AbhJOVeH (ORCPT ); Fri, 15 Oct 2021 17:34:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7644360F6F; Fri, 15 Oct 2021 21:32:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634333520; bh=QNUJyl7CqYF0RbqP23fSOKnChSyYkX1cJLYbSZI3y6c=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=nZAIRxyIefzTQjuUcjAkQS6tBZGi2E/PNKa9rWuzxuoJnPleMLaww7w9jfjjNCK/D zaRcmRQ+ui7QHF5dmiLXHIOdAO5r1LzJ+yxpm4PBqHqY65mNCqcGjbpWYIQ7pVHdz+ NSRpMQ9r/He8bVWLknOglcDKVwI9FzTPIXUhSpTbijf+hWy+Y/GX8oDqID/4kSSPxJ 9wQayXlqa7eV3WekC1JYV68kFLt8F1oLDkmQDjz4TdBFFLe3V5vMjDr9KnbR8Ay+u7 Y+tFDnMHQHAdIRKl4Rs5Cm2eUumJApiS9//z5zfVxFHHcoCuBqKzlEnK1ZsoLHVfLG y9fmX2seZ78JA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <67995168-e0fc-0916-7c34-3efedf4bad00@gmail.com> References: <20210702225145.2643303-1-martin.blumenstingl@googlemail.com> <20210702225145.2643303-2-martin.blumenstingl@googlemail.com> <4eb964ac-4fff-b59d-2660-2f84d8af5901@gmail.com> <67995168-e0fc-0916-7c34-3efedf4bad00@gmail.com> Subject: Re: [PATCH v1 1/6] clk: divider: Implement and wire up .determine_rate by default From: Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko =?utf-8?q?St=C3=BCbner?= , linux-rockchip@lists.infradead.org To: Alex Bee , Martin Blumenstingl Date: Fri, 15 Oct 2021 14:31:59 -0700 Message-ID: <163433351924.1688384.17959086273596597053@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Alex Bee (2021-10-15 12:14:36) >=20 > Am 14.10.21 um 23:34 schrieb Martin Blumenstingl: > > 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). > Indeed, that whole series would need have to reverted, which is clear=20 > (to me) when looking at the patches. > > 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) >=20 > Yes, your patch papers over the actual issue (no best parent-selection=20 > in case determine_rate is used) and fixes it for now - as expected. >=20 > But it is not a long-term solution, as we will be at the same point, as=20 > soon as round_rate gets removed from clk-divider. For me, who is=20 > semi-knowledged in clock-framework, it was relatively hard to figure out = > what was going on. "I'll do this later" has often been heard here. >=20 > Though, I don't fully follow why moving the priority of determine_rate=20 > lower would have been necessary anyways: from what I understand=20 > determine_rate is expected to be the future-replacement of round_rate=20 > everywhere and should be preferred. This is the only place I can see where we would have to keep round_rate around, to mesh together rate rounding with parent selection. We can probably stop using round_rate in the framework and only use it in the composite code. It's not a big deal but it's sort of annoying that we won't be able to fully remove round_rate from the clk_ops without resolving this. Long term it may make sense to get rid of the composite clk code entirely. It's pretty confusing code to read and encourages use of the "basic clk types" which I'd like to see be used via direct function calls instead of through clk_ops structures.