Re: [PATCH net-next 3/3] net: ethernet: ti: am65-cpts: implement PTP_SYS_OFFSET_PRECISE

From: Rob Herring

Date: Thu Nov 19 2026 - 18:06:28 EST


On Tue, Nov 17, 2026 at 07:41:33AM +0700, James Clark wrote:
> > [Severity: Medium]
> > Is it safe for this driver to own the EXPBIT_SEL field of GTC_CFG0_PUSHEVT?
> >
> > The register belongs to the SoC-wide GTC, not to the CPTS.
> > am65_cpts_ptp_getcrosststamp() rewrites it on every PTP_SYS_OFFSET_PRECISE
> > request. The previous value is never saved or restored, on success or on
> > error.
> [ ... ]
> > Suppose one of those consumers expects a different exported bit.
>
> There is no other user in the tree currently. If in the future something
> else in the kernel wants to use it, then the solution would be a small
> driver to mediate this. If there is a user outside the kernel, I am not
> sure what you would have me do about it.

Would doing this imply a DT change? If so, your binding is not future
proof.

>
> > [Severity: Medium]
> > Should val be checked here, to confirm that EXPBIT_SEL now reads back as
> > AM65_CPTS_GTC_PUSH_BIT?
>
> I agree this would be an improvement and I will do this in v2.
>
> > [Severity: Medium]
> > Should a failed syscon lookup be fatal here? A bad index just below only
> > logs an error and leaves the feature disabled.
>
> A ti,gtc-push phandle that doesn't resolve to a syscon is a broken
> device tree, so failing the probe is right, and it lets -EPROBE_DEFER
> through.

Not the kernel's job to validate the DT. If something in DT is optional,
then whether it is missing or wrong doesn't really matter.

>
> [ ... ]
> > With CONFIG_MFD_SYSCON=n, the syscon stub returns ERR_PTR(-ENOTSUPP). Any
> > DT with ti,gtc-push would then stop Ethernet from probing.
>
> MFD_SYSCON cannot be off here: TI_K3_AM65_CPTS depends on ARCH_K3,
> which selects TI_K3_SOCINFO, which selects MFD_SYSCON.

Is that true for *every* kernel version? Again, better user experience
IMO to just warn if something is missing and continue on enabling
whatever you can.

Rob