net: phy: nxp-c45-tja11xx: read ext trig ts on TJA1120
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Mon, 31 Jul 2023 09:16:18 +0000 (12:16 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Aug 2023 04:06:26 +0000 (21:06 -0700)
commit08e6547c8468863734a847154aee390f2a44befe
tree305a0eb0d474533ddb9af6d547b824a77c24f839
parentc552c110d4794fc12e0faa4d1cc928fccdfce3f2
net: phy: nxp-c45-tja11xx: read ext trig ts on TJA1120

On TJA1120, the external trigger timestamp now has a VALID bit. This
changes the logic and we can't use the TJA1103 procedure.

For TJA1103, we can always read a valid timestamp from the registers,
compare the new timestamp with the old timestamp and, if they are not the
same, an event occurred. This logic cannot be applied for TJA1120 because
the timestamp is 0 if the VALID bit is not set.

Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Link: https://lore.kernel.org/r/20230731091619.77961-11-radu-nicolae.pirea@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/nxp-c45-tja11xx.c