]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dsa: mv88e6xxx: remove duplicated register definition
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 16 Sep 2025 20:34:58 +0000 (21:34 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Sep 2025 01:21:07 +0000 (18:21 -0700)
There are two identical MV88E6XXX_PTP_GC_ETYPE definitions in ptp.h,
and MV88E6XXX_PTP_ETHERTYPE in hwtstamp.h which all refer to the
exact same register. As the code that accesses this register is in
hwtstamp.c, use the hwtstamp.h definition, and remove the
unnecessary duplicated definition in ptp.h

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/hwtstamp.c
drivers/net/dsa/mv88e6xxx/ptp.h

index f663799b0b3b42b3cd71ae7a5b2915d1badb2ca8..6e6472a3b75ad7761f7b176ed21df9a25dd59b23 100644 (file)
@@ -570,7 +570,7 @@ int mv88e6xxx_hwtstamp_setup(struct mv88e6xxx_chip *chip)
        }
 
        /* Set the ethertype of L2 PTP messages */
-       err = mv88e6xxx_ptp_write(chip, MV88E6XXX_PTP_GC_ETYPE, ETH_P_1588);
+       err = mv88e6xxx_ptp_write(chip, MV88E6XXX_PTP_ETHERTYPE, ETH_P_1588);
        if (err)
                return err;
 
index d66db82d53e18f4b81304dbf8eb7114adfd3e353..a8dc34f1f8bf830f6caa88ea9b39e5ba8a0c53c1 100644 (file)
 #define MV88E6352_TAI_TIME_LO                  0x0e
 #define MV88E6352_TAI_TIME_HI                  0x0f
 
-/* Offset 0x00: Ether Type */
-#define MV88E6XXX_PTP_GC_ETYPE                 0x00
-
 /* 6165 Global Control Registers */
-/* Offset 0x00: Ether Type */
-#define MV88E6XXX_PTP_GC_ETYPE                 0x00
-
 /* Offset 0x01: Message ID */
 #define MV88E6XXX_PTP_GC_MESSAGE_ID            0x01