RE: [PATCH net-next v2 8/9] onsemi: s2500: Add driver support for TS2500 MAC-PHY
From: Selvamani Rajagopal
Date: Thu May 21 2026 - 13:52:28 EST
> > >
> > > 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.
>
> oa_tc6_ptp.c is good. Maybe create a directory oa_tc6 and move the
> code into there. Especially if you need to add a local header which is
> shared by oa_tc6.c and oa_tc6_ptp.c, but is not needed by the drivers.
Andrew,
Little correction to what I said. As timestamp registers are in vendor specific MMS, read/write/adjust time callbacks have to be in vendor's code. I am putting register/unregister of ptp clock to oa_tc6_ptp.c. I will also move all timestamp related additions from oa_tc6.c to oa_tc6_ptp.c. This will reduce the changes to oa_tc6.c significantly.
This is besides moving oa_tc6.c to its own directory (drivers/net/ethernet/oa_tc6) as you suggested. We will have a newer, local header file to accommodate shared definitions within OA TC6 framework code.
>
> > 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?
>
> I would not bother with a new symbol. It adds build testing complexity
> having to build with and without it, to test the stubs are correct
> etc.
>
> Andrew