[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CO1PR11MB477194184681EB22FB869149E2522@CO1PR11MB4771.namprd11.prod.outlook.com>
Date: Tue, 5 Nov 2024 06:17:38 +0000
From: <Divya.Koppera@...rochip.com>
To: <andrew@...n.ch>
CC: <Arun.Ramadoss@...rochip.com>, <UNGLinuxDriver@...rochip.com>,
<hkallweit1@...il.com>, <linux@...linux.org.uk>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<richardcochran@...il.com>
Subject: RE: [PATCH net-next 5/5] net: phy: microchip_t1 : Add initialization
of ptp for lan887x
Hi Andrew,
Thanks for the comments.
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Monday, November 4, 2024 7:34 PM
> To: Divya Koppera - I30481 <Divya.Koppera@...rochip.com>
> Cc: Arun Ramadoss - I17769 <Arun.Ramadoss@...rochip.com>;
> UNGLinuxDriver <UNGLinuxDriver@...rochip.com>; hkallweit1@...il.com;
> linux@...linux.org.uk; davem@...emloft.net; edumazet@...gle.com;
> kuba@...nel.org; pabeni@...hat.com; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org; richardcochran@...il.com
> Subject: Re: [PATCH net-next 5/5] net: phy: microchip_t1 : Add initialization of
> ptp for lan887x
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> > static int lan937x_dsp_workaround(struct phy_device *phydev, u16
> > ereg, u8 bank) @@ -1472,6 +1478,12 @@ static int lan887x_probe(struct
> > phy_device *phydev)
> >
> > phydev->priv = priv;
> >
> > + priv->clock = mchp_ptp_probe(phydev, MDIO_MMD_VEND1,
> > + MCHP_PTP_LTC_BASE_ADDR,
> > + MCHP_PTP_PORT_BASE_ADDR);
>
> In general, PHY interrupts are optional, since phylib will poll the PHY once per
> second for changes in link etc. Does mchp_ptp_probe() do the right thing if
> the PHY does not have an interrupt?
>
Interrupts must be enabled by integrating platform(MAC/Switch).
Currently mchp_ptp_probe() is not checking for interrupts flag and also irq might not be initialized by the time probe is called.
To handle this, mchp_ptp_probe need to be called once from config_init instead of probe where a valid irq is available.
Based on IRQ number, we can skip ptp enabling from config_init and set default_timestamp=false.
Let me know if this approach is acceptable in interrupts disabled case.
> Andrew
Thanks,
Divya
Powered by blists - more mailing lists