mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 01:11:51 -04:00
net: dsa: microchip: adapt port offset for KSZ8463's PTP register
In KSZ8463 register's layout, the offset between port 1 and port 2 registers isn't the same in the generic control register area than in the PTP register area. The get_port_addr() always uses the same offset so it doesn't work when it's used to access PTP registers. Adapt the port offset in get_port_addr() when the accessed register is in the PTP area. Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com> Link: https://patch.msgid.link/20260727-ksz-new-ptp-v3-5-caba39e680e3@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
b3422f60e9
commit
ac99cc6cd3
@@ -2831,6 +2831,9 @@ static u32 ksz8_get_port_addr(int port, int offset)
|
||||
|
||||
static u32 ksz8463_get_port_addr(int port, int offset)
|
||||
{
|
||||
if (offset >= KSZ8463_PTP_CLK_CTRL)
|
||||
return offset + 0x20 * port;
|
||||
|
||||
return offset + 0x18 * port;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user