RE: [PATCH net-next v2 8/9] onsemi: s2500: Add driver support for TS2500 MAC-PHY
From: Selvamani Rajagopal
Date: Mon May 18 2026 - 00:04:16 EST
> > +static int s2500_hwtstamp_get(struct net_device *ndev,
> > + struct kernel_hwtstamp_config *cfg)
> > +{
> > + struct s2500_info *priv = netdev_priv(ndev);
> > +
> > + if (!priv->ptp_clock) {
> > + cfg->tx_type = 0;
> > + cfg->rx_filter = 0;
> > + } else {
> > + oa_tc6_hwtstamp_get(priv->tc6, cfg);
> > + }
> > + return 0;
>
> What is actually specific to the s2500 here? Your aim should be to put
> everything you can into the core.
I agree on this and the next comment as well. Nothing really vendor specific.
Question is,
1) Should we add the PTP code in oa_tc6.c? This PTP code add 200+ lines. My preference is to add a new file oa_tc6_ptp.c under the directory where oa_tc6.c resides.
2) If we are adding a new file, should it be under same CONFIG_OA_TC6 or add a new CONFIG_OA_TC6_HW_TIMESTAMP or something similar?
Let me know.
>
> > + /* Configure PTP if the model supports it */
> > + if (priv->capabilities & S2500_CAP_PTP)
> > + s2500_ptp_register(priv);
>
> That should be in the core, based on FTSC.
>
> Andrew