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 /* 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 >= swab16(ver)) #define GSWIP_BM_RAM_VAL(x) (0x043 - (x)) #define GSWIP_BM_RAM_ADDR 0x044 -- 2.50.1