Article View: linux.kernel.netdev
Article #3817Re: [PATCH net-next 15/37] can: rcar_canfd: Allow the CAN FD clock to be sourced from fck
From: netdev-bot+sashiko
Date: Fri, 16 Oct 2026 02:37
Date: Fri, 16 Oct 2026 02:37
87 lines
8535 bytes
8535 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The patch adds a third fCAN source (fck/pclk, used when
`info->fcan_pclk` is set), but the clock comments and the boot banner…
--
can: rcar_canfd: Allow the CAN FD clock to be sourced from fck
This commit adds an fcan_pclk hardware info flag. With it set, the fCAN
clock falls back to the peripheral clock (fck) when the external can_clk
is unavailable, the rate is divided by info->postdiv and can_clk is set
to NULL. All existing rcar_canfd_hw_info instances now set fcan_pclk = 0
explicitly.
Link: https://lore.kernel.org/all/1d9719e3-10ff-4cd8-b729-55fea93c37ce@wanadoo.fr
Link: https://patch.msgid.link/20260902141544.565763-4-claudiu.beznea+renesas@tuxon.dev
> diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
> index b7c4fe3477ac..f9173774387f 100644
> --- a/drivers/net/can/rcar/rcar_canfd.c
> +++ b/drivers/net/can/rcar/rcar_canfd.c
[ ... ]
> @@ -2190,13 +2196,20 @@ static int rcar_canfd_probe(struct platform_device *pdev)
> */
> gpriv->can_clk = devm_clk_get(dev, "can_clk");
> if (IS_ERR(gpriv->can_clk) || (clk_get_rate(gpriv->can_clk) == 0)) {
> - gpriv->can_clk = devm_clk_get(dev, "canfd");
> - if (IS_ERR(gpriv->can_clk))
> - return dev_err_probe(dev, PTR_ERR(gpriv->can_clk),
> - "cannot get canfd clock\n");
> + if (info->fcan_pclk) {
> + fcan_freq = clk_get_rate(gpriv->clkp);
> + gpriv->can_clk = NULL;
> + } else {
[Severity: Low]
Should the clock comments and the probe banner be updated for this new
fck source? Several places still describe only the external and canfd
clocks.
The comment just above this block in rcar_canfd_probe() still says:
/* fCAN clock: Pick External clock. If not available fallback to
* CANFD clock
*/
With fcan_pclk set, the fallback is fck (gpriv->clkp), not the canfd
clock.
In struct rcar_canfd_global, the field comments also don't cover this
case. Here can_clk is NULL and the fCAN source is clkp:
struct clk *can_clk; /* fCAN clock */
...
bool extclk; /* CANFD or Ext clock */
The banner at the end of rcar_canfd_probe() wasn't changed either:
dev_info(dev, "global operational state (%s clk, %s mode)\n",
gpriv->extclk ? "ext" : "canfd",
On this path extclk stays false. Won't the banner then say "canfd clk"
for a controller that has no canfd clock and runs from fck / postdiv?
The later "can: rcar_canfd: Add support for Renesas RZ/G3S" patch sets
.fcan_pclk = 1 in r9a08g045_hw_info. After that, an RZ/G3S board whose
can_clk is missing or has a rate of 0 would print this label.
Also, the new bitfield comment calls this clock pclk:
unsigned fcan_pclk:1; /* Has fcan sourced from pclk. */
The commit message and the code call it fck. Could the comment use the
same name?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261015015336.816543-2-mkl%40pengutronix.de
Technical Details
Message-ID:
<179211822725.434549.10997986390340946212@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347074-linux-kernel-netdev=dewy.ruReferences:
<20261015015336.816543-16-mkl@pengutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347074-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 15/37] can: rcar_canfd: Allow the CAN FD clock to be sourced from fck Date: Fri, 16 Oct 2026 02:37:07 +0000 Organization: Usenet Network Message-ID: <179211822725.434549.10997986390340946212@kernel.org> References: <20261015015336.816543-16-mkl@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2670486"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:kQl2KM7lix2g8xJZ5cdPxQjxwqI= sha256:IMbCJkIzJ3+khTdo0i46VWo20JdZB12O/0+f9g/+ubU= sha1:6VFy1DcxQWNSmrGswT1gggbvdas= sha256:2jqKdP0Ke09zWJp6d7AF6Eq3alqPN/PWrAQxb9FIeRA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 12703110446; Fri, 16 Oct 2026 05:37:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.34 X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bCvSaX-bhTIj; Fri, 16 Oct 2026 05:37:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-347074-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 09DAA110444; Fri, 16 Oct 2026 05:37:24 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id E372E3C859; Fri, 16 Oct 2026 02:37:10 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 570003A0B36; Fri, 16 Oct 2026 02:37:09 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CsIS3kSy" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3C4EC397AFF; Fri, 16 Oct 2026 02:37:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792118229; cv=none; b=s25TDg8+qf+HwPAZfEHfH6u6ALE+NUPzAVuB+byUq3CIjyvq+aGJoK/Dc9ngDwkjn7bOFu0vjhu/X5W5p0xjRlxjMzYJgBZfGoaE1Syn2emRgEeqAfhhTYFT6j4IeJwQQjO+In9VP58sk723gRob37uVr8jpTh4bQf3TanSEndk= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792118229; c=relaxed/simple; bh=XmbJZ5gVp+VdglOj++8Q85yj9yJmdz54MqAQoP2R/2Q=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=qPj9UzZutaqUXofFhScA4+/HXyqfJm33jrS/3ZTm/azoVdzOdn4ZCza8l7XQH/mFIy+4xlsX9RSs2ZGB2vsBVeS/F68FeLjR9ood4pCdMkhcgjw2Gjt1bNbNecBVMahecnaCOgXSBGXtdHmknMfiVHnD+o1iwUEpDsGsAnVAafw= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CsIS3kSy; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE28C1F000C6; Fri, 16 Oct 2026 02:37:07 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792118228; bh=e071zChG8ty1BKjvsY62Yo0YM+G7HEVzPLaqm31EDT8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=CsIS3kSyqnD8RjdkYrmf5hoYSKS7Oaijq5J2tTNiuh1fS9kCduDjHs+dJTzzH+hjg HwphC9XD1BwV5Pmv/UKZef3GQ1pcM9Q8BUiDB6uxX1Xt0m8P1mjXDtCiDL/1dzGo4s SLqBTi+HRWcDzj0hplA0EeQpRRTAxKjEJSbvt7iAFiiQSKnQ4c8+AY+SqhdStH31Ji TH2aaX6FHHCBsDVFjJCKcmAOwIPc1H1xk/DGn18A8p34gIwsIa2ZVlNOgkB7LGOt/3 no6oq/MnVZRatAw68OKiw8gELAKONRu6Sjl3WtQ1tfaB1Pz0i1wFT/iz3sTTiU5Rh+ wdiUzGNTZ/hKg== X-Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org, kernel@pengutronix.de, socketcan@hartkopp.net, kurt.van.dijck@eia.be X-In-Reply-To: <20261015015336.816543-16-mkl@pengutronix.de> X-sashiko-severity: Low X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>