Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1095329lqe; Sun, 7 Apr 2024 19:45:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjYOX34absk3T/80n/scgavXsLsQiqcF48kZNhO+rP5kNIHxXtLj4ibsd+Fp0T1UEfByboZ3X1M4pzQEL7xGVMMJhj/EsQPv86nVh71w== X-Google-Smtp-Source: AGHT+IEqF8wMF+42HKBSq2tUUDc8aHZlhHOU5yCSoN4vnSnmyYGK9d5QmifXYk1o/OnOfOUAP5Di X-Received: by 2002:a05:6359:100c:b0:186:21ca:b9ed with SMTP id ib12-20020a056359100c00b0018621cab9edmr2639967rwb.28.1712544314507; Sun, 07 Apr 2024 19:45:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712544314; cv=pass; d=google.com; s=arc-20160816; b=qJlYj4B+dl/qC7OwXCrVBcoKG+S8WfnSkPMk7xfZgEJFsKZu4DQGTwux9zuomVBsIe 3jzMj4CGgEztkE8LtaGWLMA3mCJB9RVzsyKEeXwxWkBscLQeors2S8hwFmAgegodWqsZ v8rjMLPFrUof5ZmhqkkQHuTONechK6r5JBoAGnjmSr1V6Fe4CM5TeEK82bmIuX5lmOoc fWl1JlenZzvvKWME+ae/uH8K/w31JLUZ+f4XJ8uXhpIG6+z8rSRBi30hfba5lriC+8V6 nzzkB/EhE8czq/UNyTXuQ5SQ1tNBnEF98L0YhgeYLBkCKfU79dmlsGPDh/TjTPBn9sjP HHiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=1o656Fu8f8GjKrEJBAGyJMEJKnp2YqOjeZvSPDocdKQ=; fh=t01VDKt26NMWqsYEX3SvS3JOmfbgwTVusASRQB23LwQ=; b=AymrrIcBcaq3iSVTYqK0MT1/u/Vxm1Y/dztS6r4aGy9wC3SzOIjFD4h94xADubDVec 9FcBt8iBYxSX/3ub25IrWFK1MxCf+C9ylujt1AcSp9006rKzoUu/tdSg/m5aLf+97cKs INn8dWoRFH00bJ9/PkBs0iwhghDTgEGRftKSzQ31Y9sLJzTMXG3+0JyE/zcJVxtckykS F2IvynJoBGnRUnrhH+198WqFvtQVpgDWK1zLDqHZKVvmH++w1cu/Ol/At0mq99s4x8Sx G5wH35FB+uQBgzHOuxDJS64SiLwfcpWX5lN8mriaQWt3uPjRBuQJATcGRABgUlN3i6nl mhSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ix8iBs74; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 21-20020a630f55000000b005dc89485b21si5182132pgp.535.2024.04.07.19.45.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 19:45:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ix8iBs74; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E75B6B20F24 for ; Mon, 8 Apr 2024 02:45:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D53B5184D; Mon, 8 Apr 2024 02:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ix8iBs74" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00C9437B; Mon, 8 Apr 2024 02:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712544304; cv=none; b=vGGIPI4L2ELs9xWezPcV/GfYMiWU3LkqVieAnpCr75hCiiAk5UC+/w9OqXFuHbtlZDP4rikZd8PXTuJunKRZ76kQELmXFPMrPwnwSDjeM5s0alZbv5EwkAsJp1GvVq1bQ8snGy7dMbXdiKSaHtc6lMApt/C1KVImvXkRzVAVi0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712544304; c=relaxed/simple; bh=zOcI/UJNgVpdplBO9a8CzD53CIl24xf01xvaj26Ddzs=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=KOS1U4BvmHG6lsZg/rVNyKzy+TVtZbqEjIliOy8vYi3huPkqTiLHTuinwpm+/svdIqJZqYBDWpkN0RipHDpBqq57Qhm8/UejnPZsHJoK5WpbdIWpnHcXNIDCFBleLOKdCq72796056yBYc/gGpMhrxQXgI1xbRho36lNgOFoDmE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ix8iBs74; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 697CFC433C7; Mon, 8 Apr 2024 02:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712544303; bh=zOcI/UJNgVpdplBO9a8CzD53CIl24xf01xvaj26Ddzs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Ix8iBs74GbMER3N197bHAgFr8QMr2bjO9qYtsebIIs7N4xcJDTMuFX6oRZSbx6oB8 T9hzT0kXSRgAM/Dl4crrID9/Xr3/05wtfH7EzbDY6wsmewdjW367zUgS3N3A4thA/x S1cLxM9Gu/UYiaWiVSjY1UXzuFFJRb6q/wjSHaU5WmYc4FVvkKHF3vkDC8XkwFeV0r AqcceuQsuuGIiaz3Xmj2fic3APmlHfsWpZa4UBkzGBqMPFxegJqlMBiVDLI60x/JrE JS9DOvGw7NvoMLWkcNMvAvF0UVvYgqRGJ3isoN6NxKcHlki6GNwx8EqQFM2ZnM8Kb1 AsHoDkBEMaXgA== Message-ID: Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <2082b46ab08755b1b66e0630a61619acac9d883f.1711714613.git.geert@linux-m68k.org> References: <2082b46ab08755b1b66e0630a61619acac9d883f.1711714613.git.geert@linux-m68k.org> Subject: Re: [PATCH v3] clk: starfive: jh7100: Use clk_hw for external input clocks From: Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Samuel Holland To: Albert Ou , Andy Shevchenko , Conor Dooley , Emil Renner Berthing , Geert Uytterhoeven , Hal Feng , Krzysztof Kozlowski , Michael Turquette , Palmer Dabbelt , Paul Walmsley Date: Sun, 07 Apr 2024 19:45:01 -0700 User-Agent: alot/0.10 Quoting Geert Uytterhoeven (2024-03-29 05:16:58) > The Starfive JH7100 clock driver does not use the DT "clocks" property > to find the external main input clock, but instead relies on the name of > the actual clock provider ("osc_sys"). This is fragile, and caused > breakage when sanitizing clock node names in DTS. >=20 > Fix this by obtaining the external main input clock using > devm_clk_get(), and passing the returned clk_hw object to > devm_clk_hw_register_fixed_factor_parent_hw(). >=20 > While name-based look-up of the other external input clocks works as-is, > convert them to a similar clk_hw-based scheme to increase uniformity, > and to decrease the number of (multiple identical) name-based look-ups. Why can't we use index based lookups and clk_parent_data? We don't want clk providers to call clk consumer APIs. >=20 > Fixes: f03606470886 ("riscv: dts: starfive: replace underscores in node n= ames") > Fixes: 4210be668a09ee20 ("clk: starfive: Add JH7100 clock generator drive= r") > Signed-off-by: Geert Uytterhoeven > Reviewed-by: Samuel Holland > --- > After this is applied, the workaround in commit 7921e231f85a349d > ("riscv: dts: starfive: jh7100: fix root clock names") can be reverted. >