From nobody Sat Oct 4 06:29:30 2025 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 9B7A527A925; Wed, 20 Aug 2025 01:56:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755654978; cv=none; b=MN6272C4RJ9GkvEsCqzHPAJxqeW0rInDvuCr9gLLvyfiLQkkDUPohGiZAp6Ma69y9RE4qadvYcgHKfnJxSErO3k1V5g0qnsCz09c5yBB6fe0fa+yS6HR8E65AmeRkxJzBSPwumDqVXbq76u+wQxLlvM969JlTjCwlGpDtg3Kxog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755654978; c=relaxed/simple; bh=v5Pkj/+ycC5msIajiniWEkrmd0ZhUZcJcyZPwfAHCKI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OFeDkAYUrNX6D7q24ktnz4P3Cu0AZsa4FNN8y5n9s50c5DlP3s+gJfW3/sxJoMsG5hamf1lt7Sq2CnVeciWl+rE9CMpPNLWCuVBYEfhgnJI27lb2skEFfKsALKYsUzeq5mbiR07XTo4eJ/BiJ2aaIlgdm2drImaetjhWy2qPydU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98.2) (envelope-from ) id 1uoY3g-000000006F1-0CJW; Wed, 20 Aug 2025 01:56:12 +0000 Date: Wed, 20 Aug 2025 02:56:08 +0100 From: Daniel Golle To: Hauke Mehrtens , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Philipp Zabel , Russell King , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Andreas Schirm , Lukas Stockmann , Alexander Sverdlin , Peter Christen , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: [PATCH net-next v3 8/8] net: dsa: lantiq_gswip: add support for SWAPI version 2.3 Message-ID: <2022eda2ddc191dc9f34cbb1e0e146bda0120316.1755654392.git.daniel@makrotopia.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add definition for switch API version 2.3 and a macro to make comparing the switch hardware version with the (byte-swapped) version macros more conveniant. Signed-off-by: Daniel Golle Reviewed-by: Vladimir Oltean --- v3: no changes v2: no changes drivers/net/dsa/lantiq_gswip.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/lantiq_gswip.h b/drivers/net/dsa/lantiq_gswip.h index 077d1928149b..5cebb051ac90 100644 --- a/drivers/net/dsa/lantiq_gswip.h +++ b/drivers/net/dsa/lantiq_gswip.h @@ -7,6 +7,7 @@ #include #include #include +#include #include =20 /* GSWIP MDIO Registers */ @@ -93,6 +94,8 @@ #define GSWIP_VERSION_2_1 0x021 #define GSWIP_VERSION_2_2 0x122 #define GSWIP_VERSION_2_2_ETC 0x022 +#define GSWIP_VERSION_2_3 0x023 +#define GSWIP_VERSION_GE(priv, ver) ((priv)->version >=3D swab16(ver)) =20 #define GSWIP_BM_RAM_VAL(x) (0x043 - (x)) #define GSWIP_BM_RAM_ADDR 0x044 --=20 2.50.1