From nobody Tue Feb 10 06:43:01 2026 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4287421A444; Tue, 28 Oct 2025 13:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761658375; cv=none; b=Smy0eES1BiVIIxi/wipUr2UXejaMGW3BdoBFT3TBtqGTArc63DvoRKaxAA+3/xG1OxF+qiXY9bi7HXRCn5jr7y4aSM+TJh/137+7ZuQdbmrEgCGPs46yH6Br5NXDujOGbAkJStMTmyEmWr8fhSOgCZVc29bLW5pHIM59Hin8PJU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761658375; c=relaxed/simple; bh=JxuZMMLycjvZiMgMi6hZsoTDhEKLY6jLBkbmnnISYtU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j/GXRA1YE2XMhY98qYvSqvgM5fXqTdjCdcGn/JFtSxM/knHiLB4m6VDwGqJY/Wg5MsCtl7S7Y1PALh9DFK8bgh6Y2u5nwju9ndOZhzKRBl7A898xKjq0fPKCEKxUCvxO/jrYTIIz6Yq0EtUzVqb3ZOHBqNZaFu1sam32DHtNOMw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-CSE-ConnectionGUID: n5i7MZjyTCWdAlKZ3xhqYQ== X-CSE-MsgGUID: MlYX72qOSBSxbGTNMAGHeA== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 28 Oct 2025 22:32:51 +0900 Received: from demon-pc.localdomain (unknown [10.226.92.5]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6857C41B5F49; Tue, 28 Oct 2025 22:32:46 +0900 (JST) From: Cosmin Tanislav To: Cc: Fabrizio Castro , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Michael Turquette , Stephen Boyd , Philipp Zabel , linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Cosmin Tanislav Subject: [PATCH 04/14] spi: rzv2h-rspi: make clocks chip-specific Date: Tue, 28 Oct 2025 15:31:35 +0200 Message-ID: <20251028133151.1487327-5-cosmin-gabriel.tanislav.xa@renesas.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251028133151.1487327-1-cosmin-gabriel.tanislav.xa@renesas.com> References: <20251028133151.1487327-1-cosmin-gabriel.tanislav.xa@renesas.com> 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" The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have different clocks compared to RZ/V2H. Set the number of clocks and the name of the transfer clock in the chip-specific structure to prepare for adding support for them. Signed-off-by: Cosmin Tanislav Reviewed-by: Fabrizio Castro --- drivers/spi/spi-rzv2h-rspi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c index 7a7a576c17dd..a1f17ec8727b 100644 --- a/drivers/spi/spi-rzv2h-rspi.c +++ b/drivers/spi/spi-rzv2h-rspi.c @@ -66,10 +66,11 @@ #define RSPI_SPSRC_CLEAR 0xfd80 =20 #define RSPI_RESET_NUM 2 -#define RSPI_CLK_NUM 3 =20 struct rzv2h_rspi_info { + const char *tclk_name; unsigned int fifo_size; + unsigned int num_clks; }; =20 struct rzv2h_rspi_priv { @@ -373,11 +374,11 @@ static int rzv2h_rspi_probe(struct platform_device *p= dev) return PTR_ERR(rspi->base); =20 ret =3D devm_clk_bulk_get_all_enabled(dev, &clks); - if (ret !=3D RSPI_CLK_NUM) + if (ret !=3D rspi->info->num_clks) return dev_err_probe(dev, ret >=3D 0 ? -EINVAL : ret, "cannot get clocks\n"); - for (i =3D 0; i < RSPI_CLK_NUM; i++) { - if (!strcmp(clks[i].id, "tclk")) { + for (i =3D 0; i < rspi->info->num_clks; i++) { + if (!strcmp(clks[i].id, rspi->info->tclk_name)) { rspi->tclk =3D clks[i].clk; break; } @@ -452,7 +453,9 @@ static void rzv2h_rspi_remove(struct platform_device *p= dev) } =20 static const struct rzv2h_rspi_info rzv2h_info =3D { + .tclk_name =3D "tclk", .fifo_size =3D 16, + .num_clks =3D 3, }; =20 static const struct of_device_id rzv2h_rspi_match[] =3D { --=20 2.51.1