Browse Source

drivers: nxp_enet: Correct PTP clock dependencies

The dependencies should be in a 'depends on' clause.
Also, 'depends on PTP_CLOCK' is redundant because this is
within 'if PTP_CLOCK' already.

Additionally, conditionally include the PTP header in the mac driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
pull/71649/head
Declan Snyder 1 year ago committed by Alberto Escolar
parent
commit
9ac2ee91f2
  1. 4
      drivers/ptp_clock/Kconfig.nxp_enet
  2. 2
      soc/nxp/imxrt/imxrt10xx/soc.c
  3. 2
      soc/nxp/imxrt/imxrt11xx/soc.c

4
drivers/ptp_clock/Kconfig.nxp_enet

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
config PTP_CLOCK_NXP_ENET
bool "NXP ENET PTP Clock driver"
default y if DT_HAS_NXP_ENET_PTP_CLOCK_ENABLED && \
(PTP_CLOCK || NET_L2_PTP)
default y
depends on DT_HAS_NXP_ENET_PTP_CLOCK_ENABLED && NET_L2_PTP
help
Enable NXP ENET PTP clock support.

2
soc/nxp/imxrt/imxrt10xx/soc.c

@ -64,7 +64,7 @@ const clock_enet_pll_config_t ethPllConfig = { @@ -64,7 +64,7 @@ const clock_enet_pll_config_t ethPllConfig = {
.enableClkOutput1 = true,
#endif
#endif
#if defined(CONFIG_PTP_CLOCK_MCUX)
#if defined(CONFIG_PTP_CLOCK_MCUX) || defined(CONFIG_PTP_CLOCK_NXP_ENET)
.enableClkOutput25M = true,
#else
.enableClkOutput25M = false,

2
soc/nxp/imxrt/imxrt11xx/soc.c

@ -437,7 +437,7 @@ static ALWAYS_INLINE void clock_init(void) @@ -437,7 +437,7 @@ static ALWAYS_INLINE void clock_init(void)
#endif
#endif
#ifdef CONFIG_PTP_CLOCK_MCUX
#if defined(CONFIG_PTP_CLOCK_MCUX) || defined(CONFIG_PTP_CLOCK_NXP_ENET)
/* 24MHz PTP clock */
rootCfg.mux = kCLOCK_ENET_TIMER1_ClockRoot_MuxOscRc48MDiv2;
rootCfg.div = 1;

Loading…
Cancel
Save