From nobody Tue Apr 7 01:05:28 2026 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C2E339F164; Tue, 17 Mar 2026 09:42:23 +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=1773740546; cv=none; b=pV9iYv7Io5kiHJEA3wXI7lMy3RpBWFyZb0p2SdgR4fsYqL2BCmrs2i9GPAtHJ6BUT86OTLImxt40gKVzQaR+ZhIndBvujXSHk0hctyqPSnnC39jCcHjaxiSuUt1Xz8dvWpymFQtn/3YXPq2P0y2AL6cSvNER19nwb7JUivBUlmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773740546; c=relaxed/simple; bh=qP4I8G9zNImRW0K3+hJs+IDbBZErpgqcOxRSKe0y7x8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rW4MxosZAsLemBHePyoMKL01WK6/rIpnQPHHDzgMX1oXjaVGe9GoDnVuRy1PNc7fQKgYvbN7L+pu9H3DoSB2glA/yGOKr25vywnOsU1wWzQZ5fOQ10fNZRGFLORUEY6Rw+Fvj5EhLHj0QLcRHnjZnJzJQ4bhuUKmMGK3tJ0vCW4= 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.171 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: r0V9xmgxSDa27bLOxoizcA== X-CSE-MsgGUID: HjXUgoI6SoykPguj+Jd0zA== Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 17 Mar 2026 18:42:23 +0900 Received: from [127.0.1.1] (unknown [10.226.78.135]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id BC3284016D6A; Tue, 17 Mar 2026 18:42:20 +0900 (JST) From: Michael Dege Date: Tue, 17 Mar 2026 10:42:00 +0100 Subject: [PATCH net-next 07/13] net: renesas: rswitch: make helper functions available to whole driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-rswitch_add_vlans-v1-7-3a57bfa0f2d1@renesas.com> References: <20260317-rswitch_add_vlans-v1-0-3a57bfa0f2d1@renesas.com> In-Reply-To: <20260317-rswitch_add_vlans-v1-0-3a57bfa0f2d1@renesas.com> To: Yoshihiro Shimoda , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Dege X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1773740518; l=2846; i=michael.dege@renesas.com; s=20251023; h=from:subject:message-id; bh=qP4I8G9zNImRW0K3+hJs+IDbBZErpgqcOxRSKe0y7x8=; b=18DRQRcTtFPHSrsQYdL4fD8P56EQskkIb2lPO1r74ea89RjPr1Q/UZONwAAIUCs+hDWQx2mwY q/iCKcPm4/LB6HLETY9FZDvj70ZbA/pr/a0u4Z2ceGZcNVqUw40NLDb X-Developer-Key: i=michael.dege@renesas.com; a=ed25519; pk=gu1rwIcCrAxNMv2I8fIfiQvt51xzZwnQy4Ua/DscQt8= These functions will be needed in L2 and vlan handling. Remove static declaration and add function prototype to rswitch.h. Signed-off-by: Michael Dege --- drivers/net/ethernet/renesas/rswitch.h | 6 ++++-- drivers/net/ethernet/renesas/rswitch_main.c | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/renesas/rswitch.h b/drivers/net/ethernet/= renesas/rswitch.h index bf123b564ed1..ff2a84057f01 100644 --- a/drivers/net/ethernet/renesas/rswitch.h +++ b/drivers/net/ethernet/renesas/rswitch.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* Renesas Ethernet Switch device driver * - * Copyright (C) 2022-2025 Renesas Electronics Corporation + * Copyright (C) 2022-2026 Renesas Electronics Corporation */ =20 #ifndef __RSWITCH_H__ @@ -1218,5 +1218,7 @@ struct rswitch_private { =20 bool is_rdev(const struct net_device *ndev); void rswitch_modify(void __iomem *addr, enum rswitch_reg reg, u32 clear, u= 32 set); - +int rswitch_reg_wait(void __iomem *addr, u32 offs, u32 mask, u32 expected); +int rswitch_gwca_change_mode(struct rswitch_private *priv, enum rswitch_gw= ca_mode mode); +int rswitch_etha_change_mode(struct rswitch_etha *etha, enum rswitch_etha_= mode mode); #endif /* #ifndef __RSWITCH_H__ */ diff --git a/drivers/net/ethernet/renesas/rswitch_main.c b/drivers/net/ethe= rnet/renesas/rswitch_main.c index f8ceb7f66903..b16f7aca4a69 100644 --- a/drivers/net/ethernet/renesas/rswitch_main.c +++ b/drivers/net/ethernet/renesas/rswitch_main.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* Renesas Ethernet Switch device driver * - * Copyright (C) 2022-2025 Renesas Electronics Corporation + * Copyright (C) 2022-2026 Renesas Electronics Corporation */ =20 #include @@ -32,7 +32,7 @@ =20 #define RSWITCH_GPTP_OFFSET_S4 0x00018000 =20 -static int rswitch_reg_wait(void __iomem *addr, u32 offs, u32 mask, u32 ex= pected) +int rswitch_reg_wait(void __iomem *addr, u32 offs, u32 mask, u32 expected) { u32 val; =20 @@ -168,8 +168,8 @@ static int rswitch_fwd_init(struct rswitch_private *pri= v) } =20 /* Gateway CPU agent block (GWCA) */ -static int rswitch_gwca_change_mode(struct rswitch_private *priv, - enum rswitch_gwca_mode mode) +int rswitch_gwca_change_mode(struct rswitch_private *priv, + enum rswitch_gwca_mode mode) { int ret; =20 @@ -1153,8 +1153,8 @@ static int rswitch_gwca_ts_request_irqs(struct rswitc= h_private *priv) } =20 /* Ethernet TSN Agent block (ETHA) and Ethernet MAC IP block (RMAC) */ -static int rswitch_etha_change_mode(struct rswitch_etha *etha, - enum rswitch_etha_mode mode) +int rswitch_etha_change_mode(struct rswitch_etha *etha, + enum rswitch_etha_mode mode) { int ret; =20 --=20 2.43.0