drivers: eth: mcux: Separate PTP clock from gPTP support
It is possible that user wants to access PTP clock but does not need gPTP support. The networking txtime sample does exactly this. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
567860a5e2
commit
476b1885ce
2 changed files with 5 additions and 5 deletions
|
@ -71,7 +71,7 @@ config ETH_MCUX_HW_ACCELERATION
|
|||
config PTP_CLOCK_MCUX
|
||||
bool "MCUX PTP clock driver support"
|
||||
default y
|
||||
depends on PTP_CLOCK && NET_PKT_TIMESTAMP
|
||||
depends on PTP_CLOCK || (NET_PKT_TIMESTAMP && NET_GPTP)
|
||||
help
|
||||
Enable MCUX PTP clock support.
|
||||
|
||||
|
|
|
@ -833,7 +833,7 @@ error:
|
|||
eth_stats_update_errors_rx(get_iface(context, vlan_tag));
|
||||
}
|
||||
|
||||
#if defined(CONFIG_PTP_CLOCK_MCUX)
|
||||
#if defined(CONFIG_PTP_CLOCK_MCUX) && defined(CONFIG_NET_GPTP)
|
||||
static inline void ts_register_tx_event(struct eth_context *context,
|
||||
enet_frame_info_t *frameinfo)
|
||||
{
|
||||
|
@ -865,7 +865,7 @@ static inline void ts_register_tx_event(struct eth_context *context,
|
|||
ts_tx_rd = 0;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PTP_CLOCK_MCUX */
|
||||
#endif /* CONFIG_PTP_CLOCK_MCUX && CONFIG_NET_PKT_TIMESTAMP */
|
||||
|
||||
static void eth_callback(ENET_Type *base, enet_handle_t *handle,
|
||||
#if FSL_FEATURE_ENET_QUEUE > 1
|
||||
|
@ -880,10 +880,10 @@ static void eth_callback(ENET_Type *base, enet_handle_t *handle,
|
|||
eth_rx(context);
|
||||
break;
|
||||
case kENET_TxEvent:
|
||||
#if defined(CONFIG_PTP_CLOCK_MCUX)
|
||||
#if defined(CONFIG_PTP_CLOCK_MCUX) && defined(CONFIG_NET_GPTP)
|
||||
/* Register event */
|
||||
ts_register_tx_event(context, frameinfo);
|
||||
#endif /* CONFIG_PTP_CLOCK_MCUX */
|
||||
#endif /* CONFIG_PTP_CLOCK_MCUX && CONFIG_NET_GPTP */
|
||||
|
||||
/* Free the TX buffer. */
|
||||
k_sem_give(&context->tx_buf_sem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue