Skip to contentSkip to conversation

ptp: netc: Add dependency on NXP_ENETC4

PATCH In review Peter Robinson 4 participants 5 messages Oct 5, 2025 – Oct 9, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptp: netc: Add dependency on NXP_ENETC4

The NETC V4 Timer PTP IP works with the associated NIC so depend on it, plus compile test, and default it on if the NIC is enabled similar to the other PTP modules.

Fixes 87a201d59963e ("ptp: netc: add NETC V4 Timer PTP driver support")
---
 drivers/ptp/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/ptp/Kconfig +2 -0
index 5f8ea34d11d6d..a5542751216d6 100644
@@ -255,6 +255,8 @@ config PTP_S390
 
 config PTP_NETC_V4_TIMER
 	tristate "NXP NETC V4 Timer PTP Driver"
+	depends on NXP_ENETC4 || COMPILE_TEST
+	default y if NXP_ENETC4
 	depends on PTP_1588_CLOCK
 	depends on PCI_MSI
 	help
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Peter Robinson

The NETC V4 Timer PTP IP works with the associated NIC so depend on it, plus compile test, and default it on if the NIC is enabled similar to the other PTP modules.

Fixes 87a201d59963e ("ptp: netc: add NETC V4 Timer PTP driver support")
---
  drivers/ptp/Kconfig | 2 ++
  1 file changed, 2 insertions(+)
drivers/ptp/Kconfig +0 -0
index 5f8ea34d11d6d..a5542751216d6 100644

drivers/ptp/Kconfig config PTP_S390 · line 262

Quoted 8 lines
drivers/ptp/Kconfig +2 -0
@@ -255,6 +255,8 @@ config PTP_S390
 
  config PTP_NETC_V4_TIMER
  	tristate "NXP NETC V4 Timer PTP Driver"
+	depends on NXP_ENETC4 || COMPILE_TEST
+	default y if NXP_ENETC4
  	depends on PTP_1588_CLOCK
  	depends on PCI_MSI
  	help

LGTM,

maintainer
#2 lore raw
In reply to Peter Robinson
Quoted 5 lines · On Sun, 5 Oct 2025 21:49:42 +0100 Peter Robinson wrote:

The NETC V4 Timer PTP IP works with the associated NIC so depend on it, plus compile test, and default it on if the NIC is enabled similar to the other PTP modules.

Fixes 87a201d59963e ("ptp: netc: add NETC V4 Timer PTP driver support")

You put a Fixes tag here, suggesting this is a fix. What bug is it fixing? Seems like an improvement to the default kconfig behavior, TBH. If it is a bug fix please explain in the commit message more. If not please drop the Fixes tag and repost next week. Also..

Quoted 10 lines
---
 drivers/ptp/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/ptp/Kconfig +0 -0
index 5f8ea34d11d6d..a5542751216d6 100644

drivers/ptp/Kconfig config PTP_S390 · line 258

Quoted 4 lines
drivers/ptp/Kconfig +1 -0
@@ -255,6 +255,8 @@ config PTP_S390
 
 config PTP_NETC_V4_TIMER
 	tristate "NXP NETC V4 Timer PTP Driver"
+	depends on NXP_ENETC4 || COMPILE_TEST

.. why? Does the clock driver not work at all without the networking driver? Or you just think that they go together?

drivers/ptp/Kconfig config PTP_S390 · line 259

Quoted 1 line
drivers/ptp/Kconfig +1 -0
+	default y if NXP_ENETC4

Isn't this better written as:

default NXP_ENETC4

?

Quoted 3 lines
drivers/ptp/Kconfig +0 -0
 	depends on PTP_1588_CLOCK
 	depends on PCI_MSI
 	help
#3 lore raw
Quoted 6 lines · Jakub Kicinski
Quoted 4 lines · On Sun, 5 Oct 2025 21:49:42 +0100 Peter Robinson wrote:

The NETC V4 Timer PTP IP works with the associated NIC so depend on it, plus compile test, and default it on if the NIC is enabled similar to the other PTP modules.

Quoted 7 lines
Quoted 1 line
Fixes 87a201d59963e ("ptp: netc: add NETC V4 Timer PTP driver support")

You put a Fixes tag here, suggesting this is a fix. What bug is it fixing? Seems like an improvement to the default kconfig behavior, TBH. If it is a bug fix please explain in the commit message more. If not please drop the Fixes tag and repost next week. Also..

I don't believe it works without the associated hardware so it seems like a bug to me, There's likely nuance and opinion. I labelled as a fix so it lands into the same kernel release as opposed to the next one.

Quoted 11 lines
Quoted 11 lines
---
 drivers/ptp/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/ptp/Kconfig +0 -0
index 5f8ea34d11d6d..a5542751216d6 100644
@@ -255,6 +255,8 @@ config PTP_S390
 
Quoted 6 lines

drivers/ptp/Kconfig config PTP_S390 · line 258

Quoted 3 lines
drivers/ptp/Kconfig +1 -0
 config PTP_NETC_V4_TIMER
      tristate "NXP NETC V4 Timer PTP Driver"
+     depends on NXP_ENETC4 || COMPILE_TEST

.. why? Does the clock driver not work at all without the networking driver? Or you just think that they go together?

It is my understanding that it doesn't, it's also the way the PTP_1588_CLOCK_QORIQ does it, hence i did that way.

Quoted 5 lines

drivers/ptp/Kconfig config PTP_S390 · line 259

Quoted 1 line
drivers/ptp/Kconfig +1 -0
+     default y if NXP_ENETC4

Isn't this better written as:

default NXP_ENETC4

I did it the same way as the other HW drivers such as PTP_1588_CLOCK_QORIQ and PTP_1588_CLOCK_DTE did in that Kconfig file for consistency

Quoted 6 lines

?

Quoted 3 lines
drivers/ptp/Kconfig +0 -0
      depends on PTP_1588_CLOCK
      depends on PCI_MSI
      help
#4 lore raw
Quoted 12 lines
Quoted 11 lines
Quoted 5 lines

The NETC V4 Timer PTP IP works with the associated NIC so depend on it, plus compile test, and default it on if the NIC is enabled similar to the other PTP modules.

Fixes 87a201d59963e ("ptp: netc: add NETC V4 Timer PTP driver support")

You put a Fixes tag here, suggesting this is a fix. What bug is it fixing? Seems like an improvement to the default kconfig behavior, TBH. If it is a bug fix please explain in the commit message more. If not please drop the Fixes tag and repost next week. Also..

Quoted 5 lines

I don't believe it works without the associated hardware so it seems like a bug to me, There's likely nuance and opinion. I labelled as a fix so it lands into the same kernel release as opposed to the next one.

The NETC timer and ENETC are two PCIe devices, and the timer provides PHC for ENETC to use. From hardware perspective, the timer is PHC supplier and ENETC is the consumer, the timer should work properly even if ENETC is not working. For example, the timer can still provide PPS event, outputs periodic pulse signal captures external timestamps and so on.