Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp729895rdb; Fri, 22 Dec 2023 03:25:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdoz0ZxFPMsHIy07dGph6WPKxnFSVZzXusrQ+vBOpag20PHtoSm72S7kxNA/CfZ5CxljR/ X-Received: by 2002:a05:620a:472a:b0:77f:b144:9325 with SMTP id bs42-20020a05620a472a00b0077fb1449325mr1726792qkb.28.1703244332683; Fri, 22 Dec 2023 03:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703244332; cv=none; d=google.com; s=arc-20160816; b=e5m9Dl1WnEfT2wipbEVSVUFChgerj5gAixNuMxOtEgfCKXsa5gQBXcW8DeqW5t8fY+ dQke7IGKWeOnnrQFpbhCoNjcx+heeTOfEHbJvWY+cIF/Rsi+jSTFRvWSAHTMwuPtOWSa 0NInClTS77COCzz7oEO9wIILy4Vlu3QLaUKGth1xrdWp7+BaX1zxn3Qqoqv2A0bMvjgb EmmXzt6EODoZAimSvQfj7iBF+KU2+sP+ejszxhIhZ8h7ImUbCu1qI43qNQTcYtRrtRXG ujuvbBpFtoFV7Jr6rzbVNUoaDvOX56qZlJl1t+1eCEbYsVvUc1TF29mwcufYGdVqRLB3 jDCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:to:cc:subject:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=XK/HZcj+ulUoisKiFJSL4FfIuOQN1JBlybYK7NvCE1U=; fh=HYk7fA1eVgvNuK1D024S7Sh0DDeokAItx2xI9L+1sa8=; b=T2rh+YOrNgmvGKEzsDKi507MLKUXwa5msRjnwYwli/N+SPjggn2SHsFXFWPjXXIyhH giKKhTb7ebdtpgldTdV0GUmtXo7F/TcI5+hp2aaGNjde39cEnOj2uRNWg/V5kUDOHnq4 Nh1/2EIMAVfq65motdwvm4rq1zQhN7IQyEu7IGQAVpZyrdSv4/bjShrFFdbiZynBZmAS DqvAIYxNOFEqruHLWh0wVb6I277MHLcNXzSbFZqCB2ZmC04ZQFSSi1WRAEJTsJrf1nGv 8Ix62VnB2ZYFYNNcSUJAJMV/9A5vz4Blr35D3xBX0zZrLwSD5ua4sdc0WzyDfRkz1K/r ZGyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pTNTeZ3F; spf=pass (google.com: domain of linux-kernel+bounces-9658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bs41-20020a05620a472900b0077f6ff697c6si4538031qkb.164.2023.12.22.03.25.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 03:25:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pTNTeZ3F; spf=pass (google.com: domain of linux-kernel+bounces-9658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 720EF1C223DB for ; Fri, 22 Dec 2023 11:25:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ABF701773B; Fri, 22 Dec 2023 11:25:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="pTNTeZ3F" X-Original-To: linux-kernel@vger.kernel.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 0CA3B182A8; Fri, 22 Dec 2023 11:25:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 93301E0009; Fri, 22 Dec 2023 11:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1703244313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XK/HZcj+ulUoisKiFJSL4FfIuOQN1JBlybYK7NvCE1U=; b=pTNTeZ3F8iO+oHNN0CFGBJv6rwoAwkO6bzR/4fsL86vHWakDr0HsGN+CqCAaebxJUI9qh/ mkdST+E723X8dDwaYOjc/kchkXOk0BazEgmInUQwYiFVXPTcRy+nWGTg4yAhc5A0NvxuUR c0Tp3uDrS3vfpNbsAqJz+yDYAzjlXsBJ85JnRqgqhAIeH18Ch6/1COci4Olq56yUTND80k dSHfp0OnYi1NMaklVkyT5dHWMTWc/AhrhQ+aEvvpiw5ixxYvjprJbolDMTzqMnMo0vITJt ylcktyWEU+uxTvYGGo8ed4d5bwvkeoUnJ3LFy2QjWqCMxirMSAs3syGWRCw//w== 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 Content-Type: text/plain; charset=UTF-8 Date: Fri, 22 Dec 2023 12:25:12 +0100 Message-Id: Subject: Re: [PATCH 3/5] clk: eyeq5: add controller Cc: "Vladimir Kondratiev" , , , , , "Thomas Petazzoni" , "Tawfik Bayouk" To: "Stephen Boyd" , "Conor Dooley" , "Gregory CLEMENT" , "Krzysztof Kozlowski" , "Michael Turquette" , "Rob Herring" , "Thomas Bogendoerfer" From: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: aerc 0.15.2 References: <20231218-mbly-clk-v1-0-44ce54108f06@bootlin.com> <20231218-mbly-clk-v1-3-44ce54108f06@bootlin.com> In-Reply-To: X-GND-Sasl: theo.lebrun@bootlin.com Hello, I've seen all your comments, thanks for that. I have a follow up about one: On Wed Dec 20, 2023 at 12:09 AM CET, Stephen Boyd wrote: > Quoting Th=C3=A9o Lebrun (2023-12-18 09:14:18) > > Add the Mobileye EyeQ5 clock controller driver. See the header comment > > for more information on how it works. > > "See the header" is like saying "Read the code" which is pretty obvious. > Remove this sentence and tell us why only the PLLs are supported at the > moment or something like that. > > > This driver is specific to this > > platform; it might grow to add later support of other platforms from > > Mobileye. > >=20 > > Signed-off-by: Th=C3=A9o Lebrun > > --- > > MAINTAINERS | 1 + > > drivers/clk/Kconfig | 11 +++ > > drivers/clk/Makefile | 1 + > > drivers/clk/clk-eyeq5.c | 211 ++++++++++++++++++++++++++++++++++++++++= ++++++++ > > 4 files changed, 224 insertions(+) > >=20 [...] > > diff --git a/drivers/clk/clk-eyeq5.c b/drivers/clk/clk-eyeq5.c > > new file mode 100644 > > index 000000000000..74bcb8cec5c1 > > --- /dev/null > > +++ b/drivers/clk/clk-eyeq5.c [...] > > + of_clk_add_hw_provider(np, of_clk_hw_onecell_get, data); > > +} > > + > > +CLK_OF_DECLARE_DRIVER(eq5c, "mobileye,eyeq5-clk", eq5c_init); > > Please use a platform driver. I've been trying to do that but I had a stall at boot. I initially associated it with the UART driver acquiring a clock too early but instead it is the CPU timer clocksource driver that consumes one of our clock way earlier than any platform driver initialisation. The clocksource driver we are talking about is this one for reference: https://elixir.bootlin.com/linux/v6.6.8/source/drivers/clocksource/mips-gic= -timer.c Its usage of TIMER_OF_DECLARE means it gets probed by timer_probe -> plat_time_init -> time_init -> start_kernel. This is way before any initcalls. Our prior use of CLK_OF_DECLARE_DRIVER meant that we got probed by of_clk_init -> plat_time_init. I'm guessing we are not the first one in this situation; any advice on how to deal with it? Thanks, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com