]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: microchip: Use regs[] to access REG_PTP_RTC_SUB_NANOSEC
authorBastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Mon, 5 Jan 2026 13:08:05 +0000 (14:08 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 8 Jan 2026 12:01:16 +0000 (13:01 +0100)
commit5b1fe74facc2abab66cee1d18a74807f457983ff
tree8a74c8c4b97521bbdbd842227913c4af0da29c95
parent776ad30de04e26b705ce2c36d7efe99aa6f12d6f
net: dsa: microchip: Use regs[] to access REG_PTP_RTC_SUB_NANOSEC

Accesses to the PTP_RTC_SUB_NANOSEC register are done through a
hardcoded address which doesn't match with the KSZ8463's register
layout.

Add a new entry for the PTP_RTC_SUB_NANOSEC register in the regs[]
tables.
Use the regs[] table to retrieve the PTP_RTC_SUB_NANOSEC register
address when accessing it.
Remove the macro defining the address to prevent further use.

Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20260105-ksz-rework-v1-6-a68df7f57375@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h
drivers/net/dsa/microchip/ksz_ptp.c
drivers/net/dsa/microchip/ksz_ptp_reg.h