From patchwork Tue Feb 25 15:40:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13990136 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81BB71514EE; Tue, 25 Feb 2025 15:41:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740498103; cv=none; b=bsXlsOpWivr/t93ut9vpFgUirxuszRHy2R/6UZ7XVkgkRxSmq+OPEhhRdV7ElSa01DtxID/YAYjPIONvgX1HBrwXILCyK0hreSILAuIed+BXUgxGyVDWrjhMWjFMR4PIJfyoaqAhDXnhKVe33uv5omyttfhRA0SDWXw4FVqsuHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740498103; c=relaxed/simple; bh=WoYdvXrmAgoqdxXmkMmu1zcEVpswiQ5GXjyALW575cQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p2pw2UKkziTGcXPQM+vpiyLpgpoNwl6cjgDe8iLOWuwyxFuOtEyNt50Vv1JNQ49zb03At6jVh+pumomvg33NY8Cf7kakOxvkWd/MWhIRvZa3hVFd/Ojq7YN8dNGiKrl3/PBS19zedqn0Uuzo1Ph4Am2BBw1RQ5THbarLvoY3YGk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-CSE-ConnectionGUID: NxeD7wtNSsiBPLrJXqrUKg== X-CSE-MsgGUID: HhQtbunMT0C6s+MMWoj1UQ== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 26 Feb 2025 00:41:40 +0900 Received: from localhost.localdomain (unknown [10.226.92.81]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 91FB1400FD08; Wed, 26 Feb 2025 00:41:37 +0900 (JST) From: Biju Das To: Marc Kleine-Budde , Vincent Mailhol Cc: Biju Das , Wolfram Sang , Geert Uytterhoeven , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , linux-can@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 09/11] can: rcar_canfd: Add only_internal_clks variable to struct rcar_canfd_hw_info Date: Tue, 25 Feb 2025 15:40:48 +0000 Message-ID: <20250225154058.59116-10-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250225154058.59116-1-biju.das.jz@bp.renesas.com> References: <20250225154058.59116-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 All SoCs supports extenal clock, but RZ/G3E has only internal clocks. Add only_internal_clks to struct rcar_canfd_hw_info to handle this difference. Signed-off-by: Biju Das --- v2->v3: * No change v1->v2: * No change. --- drivers/net/can/rcar/rcar_canfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index 09a9e548b022..7ae06e3c4d85 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -558,6 +558,7 @@ struct rcar_canfd_hw_info { unsigned multi_channel_irqs:1; /* Has multiple channel irqs */ unsigned ch_interface_mode:1; /* Has channel interface mode */ unsigned shared_can_reg:1; /* Has shared classical can registers */ + unsigned only_internal_clks:1; /* Has only internal clocks */ }; /* Channel priv data */ @@ -2055,7 +2056,7 @@ static int rcar_canfd_probe(struct platform_device *pdev) fcan_freq = clk_get_rate(gpriv->can_clk) / info->postdiv; } else { fcan_freq = clk_get_rate(gpriv->can_clk); - gpriv->extclk = true; + gpriv->extclk = !gpriv->info->only_internal_clks; } addr = devm_platform_ioremap_resource(pdev, 0);