> +static int rtl_internal_nbaset_probe(struct phy_device *phydev) > +{ > + int ret; > + > + ret = rtl822x_probe(phydev); > + if (ret) > + return ret; > + > + /* Only the internal PHY of RTL8127A has a PTP block. PTP is > + * optional, keep the PHY usable without it. > + */
As you point out here, the PTP block is in the PHY.
> +static int rtl8127a_ptp_read(struct rtl8127a_ptp *ptp, u16 reg) > +{ > + return phy_read_mmd(ptp->phydev, MDIO_MMD_VEND2, reg); > +}
And you are using PHY APIs to access it. All this code needs to move into the PHY driver. I can accept old code violating layering, but new could should not. NACK. Andrew