From patchwork Thu Mar 20 09:10:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 14023569 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 923FE1A238C; Thu, 20 Mar 2025 09:12:10 +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=1742461932; cv=none; b=nnXSeeioKfWF0Z1KZG12gnHhkV15aQ5CWhsfGN9oe7eWqsN9kh+SNLYnj/nuaL7e/PjjLbDhcdVCwdiBMcsewdIyS8A/QtPsloKd+4rmbwB2c9QHc6mYdUesOmx2CJUN/+9kiZ4O00CDQXkLt57nv5waYDIftNaKpmpuN/BhebY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742461932; c=relaxed/simple; bh=5OEd/jiuYGssZoZ0Tgu1UY/NTBK2/z7FneBxkI7hFf4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hG/jQb3F0yXsZzbNRhRGpiS5xCWf1LWIsHCXJfh653LZ9HIEwPXktnyG54h5V7aABW6ce5M4ahU89K6CHJX9++Xzp/wH76GrxOoO8an+AhALdEEOAdO02U4qviNX8RIlk9WGRc0bvjoc9lLtof6OZdRIuDbLNySiG4atv56dc00= 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: zZsObvxmTKi3dmLKAQoCxQ== X-CSE-MsgGUID: yd9akMm3TpS4dqkRpckSFg== Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 20 Mar 2025 18:12:10 +0900 Received: from localhost.localdomain (unknown [10.226.93.24]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 7AFC94001B61; Thu, 20 Mar 2025 18:12:07 +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 v6 16/18] can: rcar_canfd: Add only_internal_clks variable to struct rcar_canfd_hw_info Date: Thu, 20 Mar 2025 09:10:47 +0000 Message-ID: <20250320091101.33637-17-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250320091101.33637-1-biju.das.jz@bp.renesas.com> References: <20250320091101.33637-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 existing SoCs support an external clock, but RZ/G3E has only internal clocks. Add only_internal_clks to struct rcar_canfd_hw_info to handle this difference. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das --- v5->v6: * No change. v4->v5: * Collected tag. * Improved commit description by "All SoCs supports extenal clock"-> "All existing SoCs support an external clock". v3->v4: * No change. 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 20e591421cc6..7ad27087a176 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -546,6 +546,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_regs:1; /* Has shared classical can registers */ + unsigned only_internal_clks:1; /* Has only internal clocks */ }; /* Channel priv data */ @@ -2045,7 +2046,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);