Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19062228rwd; Wed, 28 Jun 2023 04:42:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4eTHQqm+sjcY4H7Px1I5hctyAyOuMvXIozjDM0pAjKQ3Lagooso+GuCk+xiNrJIFeI1KYh X-Received: by 2002:a17:903:11cc:b0:1b0:1608:d7eb with SMTP id q12-20020a17090311cc00b001b01608d7ebmr13891345plh.5.1687952567237; Wed, 28 Jun 2023 04:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687952567; cv=none; d=google.com; s=arc-20160816; b=Dgwk9ZuZ+/blJFQOmaZ3/IQ64ADkzAiUcwOTBRpmjDdV9NkewOAaWyTeE5HySs7EMI Ay5TbCOylFfIhGtRNDoo3QZz/afvClr4VFXnYy1yEiPhn6q4nTcJjvTFYZMxVUbnIR78 alpPdX5WChcYqnTNo2w6jX6Eufoc7Ir1ZpRNvjfumw3LY13jF3H7ZV2WZHk0Q6UyJHgQ ff5gxiZotvPvy14PKHTdW+XAbgq8gquZGFPcpcLeP5ae1sn2hr79JXuZ6lgwB6B1U+tj HXoF1awCXVrFdrlXcVLrzcU9q6OVeEz3Y0G+Xab6hoetcC8cwjkM0WYjsh0Du5vGzTSs eZmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=TE40ASPTrqwVIm8xbNR5+wr11gQFkNATBxYj0JxUJYs=; fh=668c0s/f6SitzINdNnWkEIGLERwBNAHMyXp2yvkghCE=; b=M7hiol+BHHAZ1RlsZjIxeOxKKvDko7KFsg4r3iBUwZ1BqtuYa6vBH4ytyer68qUxnG 6gaWc9MEikS6NI/gsXXyy5dxyOUUEVEdNgeRPKnzuw/jNc75OrWby5jUTwMdLzyVm/Fd M+TKb/V/4MobNPWokPgtkOx1bSDEBGaoPQY4ODqOFDdzvIe4bKmmTUBr7t5ccVaeT/Yi aKQKv40AHJ1bGlQvFLgD8ukpJv62iutmo6dphKWgmTxpr+lQhByqTC4rFpAyCB6Q3uye Gllv3ws8xf4SCA+P9vPVMpd6yTX1LtrVjliEE2UIeqG8pAKcR3zZ3K39nr3iNIZAsudf 0AMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a170902ce8b00b001b694ecf48esi1639799plg.100.2023.06.28.04.42.34; Wed, 28 Jun 2023 04:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231494AbjF1LIG convert rfc822-to-8bit (ORCPT + 99 others); Wed, 28 Jun 2023 07:08:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbjF1LIC (ORCPT ); Wed, 28 Jun 2023 07:08:02 -0400 Received: from unicorn.mansr.com (unicorn.mansr.com [IPv6:2001:8b0:ca0d:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E41F1FEF for ; Wed, 28 Jun 2023 04:07:58 -0700 (PDT) Received: from raven.mansr.com (raven.mansr.com [81.2.72.235]) by unicorn.mansr.com (Postfix) with ESMTPS id 0B96E15360; Wed, 28 Jun 2023 12:07:57 +0100 (BST) Received: by raven.mansr.com (Postfix, from userid 51770) id 81069219FD1; Wed, 28 Jun 2023 12:07:56 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Maxime Ripard Cc: Samuel Holland , 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: Wed, 28 Jun 2023 12:07:56 +0100 In-Reply-To: (Maxime Ripard's message of "Wed, 28 Jun 2023 09:44:18 +0200") 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maxime Ripard writes: > On Mon, Jun 26, 2023 at 01:21:33PM +0100, M?ns Rullg?rd wrote: >> 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. > > The A10 is probably broken by this, but the A20 should be able to use > the arch timers just like all the other Cortex-A7-based SoCs. > > Do you have a dmesg log that could help debug why it's not working? The A20 works as such since, as you say, it has other clocksources. However, the hstimer has become unusable. If anyone was using, for whatever reason, it won't be working for them now. Before this change, the kernel log used include this line: clocksource: hstimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns Now there is only a cryptic "Can't get timer clock" in its place. As it is now, the hstimer driver is nothing but a waste of space. I figure it ought to be fixed one way or another. -- M?ns Rullg?rd