ENET timestamp IRQ still needed to be enabled from IP.
This is a fix-up for below commit:
faa55bd44b drivers: ptp_clock_nxp_enet: avoid configuring
IRQ handlers again
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Assertion checked whether pointer is NULL.
Assertion should check whether pointer is *not* NULL.
Fixed by changing check in assertion.
Signed-off-by: Frank Duerr <frank.duerr@ipvs.uni-stuttgart.de>
Converted ENET_Ptp1588Configure to ENET_Ptp1588StartTimer during reset.
This is to avoid configuring IRQ handlers again in hal driver with
ENET_Ptp1588Configure.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
The rate adjustment should be based on nomianl frequency, but not
current frequency. Then any PTP stack with PID control could adjust
frequency well.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
The enet handle in mac driver was not shared with ptp driver
properly. This was causing wrong TX timestamp.
This patch is to fix it.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
c8d8dce755 introduced a regression whereby driver config should hold
module device pointer, except it didn't.
This commit adds module_dev to the driver config.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1. Correct node label in k64 overlay for ptp test
- Not sure if this actually matters since it appears
that actual hardware is no longer tested in net tests
2. Include fsl_enet with <> instead of "".
3. Build the ptp clock driver only if the ethernet driver is built
- Technically I think the 1588 timer should be able to be used
even if the ethernet mac is not used, but I would imagine this
to be an extraordinarily rare, weird, and niche use case, so to fix
the current CI error caused by net test disabling ethernet drivers,
couple the ptp clock driver to the ethernet driver in the build
configuration.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Simplify the driver header implementation, so that there are not
structs and unions different per each situtaion, and make just one
function for the enet module drivers to call on each other. Also,
capitalize existing enums.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>