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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E792EB64DA for ; Mon, 26 Jun 2023 12:24:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231128AbjFZMYT convert rfc822-to-8bit (ORCPT ); Mon, 26 Jun 2023 08:24:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229651AbjFZMYD (ORCPT ); Mon, 26 Jun 2023 08:24:03 -0400 Received: from unicorn.mansr.com (unicorn.mansr.com [81.2.72.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BBD12126; Mon, 26 Jun 2023 05:22:25 -0700 (PDT) Received: from raven.mansr.com (raven.mansr.com [81.2.72.235]) by unicorn.mansr.com (Postfix) with ESMTPS id 8A3AD15360; Mon, 26 Jun 2023 13:21:33 +0100 (BST) Received: by raven.mansr.com (Postfix, from userid 51770) id 144A4219FD1; Mon, 26 Jun 2023 13:21:33 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Samuel Holland Cc: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, Michael Turquette , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stephen Boyd , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/4] clk: sunxi-ng: Convert early providers to platform drivers References: <20211119033338.25486-1-samuel@sholland.org> <20211119033338.25486-4-samuel@sholland.org> Date: Mon, 26 Jun 2023 13:21:33 +0100 In-Reply-To: <20211119033338.25486-4-samuel@sholland.org> (Samuel Holland's message of "Thu, 18 Nov 2021 21:33:36 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Samuel Holland writes: > The PRCM CCU drivers depend on clocks provided by other CCU drivers. For > example, the sun8i-r-ccu driver uses the "pll-periph" clock provided by > the SoC's main CCU. > > However, sun8i-r-ccu is an early OF clock provider, and many of the > main CCUs (e.g. sun50i-a64-ccu) use platform drivers. This means that > the consumer clocks will be orphaned until the supplier driver is bound. > This can be avoided by converting the remaining CCUs to use platform > drivers. Then fw_devlink will ensure the drivers are bound in the > optimal order. > > The sun5i CCU is the only one which actually needs to be an early clock > provider, because it provides the clock for the system timer. That one > is left alone. > > Signed-off-by: Samuel Holland > --- > > (no changes since v1) > > drivers/clk/sunxi-ng/Kconfig | 20 ++++---- > drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 58 +++++++++++++-------- > drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 56 ++++++++++++-------- > drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 33 ++++++++---- > drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 40 +++++++++++---- > drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 35 +++++++++---- > drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 40 +++++++++++---- > drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 62 ++++++++++++++-------- > drivers/clk/sunxi-ng/ccu-sun8i-r.c | 65 ++++++++++++++---------- > drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 57 +++++++++++++-------- > drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 38 ++++++++++---- > 11 files changed, 332 insertions(+), 172 deletions(-) This broke the hstimer clocksource on A20 since it requires a clock provided by the sun4i ccu driver. -- Måns Rullgård 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 10302EB64DC for ; Mon, 26 Jun 2023 12:22:15 +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:In-Reply-To: Date:References: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=gy7Zqav3T7H2HHYcokjrtNI0v8ioKlHLpI5Iw1dtPbg=; b=4F4aUOHlTf9TYN IWlfwVPMAXDiomL57ho+IgSHCilGADmYJzoQvyqdLBJo/YkkxZRWUE+l+B9g5kf8KyP1hFbwfi/I1 KpZ4yI/cXop8dWJJMpsQkMQjxFBjdf8D/K4PQDAJX9g98OCbUaDofT2WQ+lGsmggwJq1oCjv3WlxJ SU7h2fnCzl34n5ts/3Jg9GPJiAGsBIaS3HyosA7MiyIGfzaWzwmNDA6JSsIJmwoiflt+sYH03MsIQ uJ/h1Lct88yRwoCgHO8gx8xkwNrOhhvKZb7EZo/B8LJU4St2Kd2EPv/OdmeC6T8FIUboe7prsl9nZ YF0EQk5B2Sjap4zHfl3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qDlE2-00ABsy-0P; Mon, 26 Jun 2023 12:21:46 +0000 Received: from unicorn.mansr.com ([2001:8b0:ca0d:1::2]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qDlDy-00ABrg-2y for linux-arm-kernel@lists.infradead.org; Mon, 26 Jun 2023 12:21:44 +0000 Received: from raven.mansr.com (raven.mansr.com [81.2.72.235]) by unicorn.mansr.com (Postfix) with ESMTPS id 8A3AD15360; Mon, 26 Jun 2023 13:21:33 +0100 (BST) Received: by raven.mansr.com (Postfix, from userid 51770) id 144A4219FD1; Mon, 26 Jun 2023 13:21:33 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Samuel Holland Cc: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, Michael Turquette , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stephen Boyd , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/4] clk: sunxi-ng: Convert early providers to platform drivers References: <20211119033338.25486-1-samuel@sholland.org> <20211119033338.25486-4-samuel@sholland.org> Date: Mon, 26 Jun 2023 13:21:33 +0100 In-Reply-To: <20211119033338.25486-4-samuel@sholland.org> (Samuel Holland's message of "Thu, 18 Nov 2021 21:33:36 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230626_052143_117053_F115417C X-CRM114-Status: GOOD ( 16.11 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Samuel Holland writes: > The PRCM CCU drivers depend on clocks provided by other CCU drivers. For > example, the sun8i-r-ccu driver uses the "pll-periph" clock provided by > the SoC's main CCU. > > However, sun8i-r-ccu is an early OF clock provider, and many of the > main CCUs (e.g. sun50i-a64-ccu) use platform drivers. This means that > the consumer clocks will be orphaned until the supplier driver is bound. > This can be avoided by converting the remaining CCUs to use platform > drivers. Then fw_devlink will ensure the drivers are bound in the > optimal order. > > The sun5i CCU is the only one which actually needs to be an early clock > provider, because it provides the clock for the system timer. That one > is left alone. > > Signed-off-by: Samuel Holland > --- > > (no changes since v1) > > drivers/clk/sunxi-ng/Kconfig | 20 ++++---- > drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 58 +++++++++++++-------- > drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 56 ++++++++++++-------- > drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 33 ++++++++---- > drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 40 +++++++++++---- > drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 35 +++++++++---- > drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 40 +++++++++++---- > drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 62 ++++++++++++++-------- > drivers/clk/sunxi-ng/ccu-sun8i-r.c | 65 ++++++++++++++---------- > drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 57 +++++++++++++-------- > drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 38 ++++++++++---- > 11 files changed, 332 insertions(+), 172 deletions(-) This broke the hstimer clocksource on A20 since it requires a clock provided by the sun4i ccu driver. -- = M=E5ns Rullg=E5rd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel