[PATCH 09/12] driver: net: fm: add DM ETH support

Madalin Bucur (OSS) madalin.bucur at oss.nxp.com
Tue Apr 28 16:02:25 CEST 2020


> -----Original Message-----
> From: Camelia Alexandra Groza (OSS) <camelia.groza at oss.nxp.com>
> Sent: Tuesday, April 28, 2020 4:06 PM
> To: Madalin Bucur (OSS) <madalin.bucur at oss.nxp.com>; u-boot at lists.denx.de
> Cc: Ruchika Gupta <ruchika.gupta at nxp.com>; joe.hershberger at ni.com;
> sjg at chromium.org; Priyanka Jain (OSS) <priyanka.jain at oss.nxp.com>;
> trini at konsulko.com; Ioana Ciornei <ioana.ciornei at nxp.com>
> Subject: RE: [PATCH 09/12] driver: net: fm: add DM ETH support
> 
> > -----Original Message-----
> > From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Madalin Bucur
> > Sent: Thursday, April 23, 2020 16:25
> > To: u-boot at lists.denx.de
> > Cc: Ruchika Gupta <ruchika.gupta at nxp.com>; joe.hershberger at ni.com;
> > sjg at chromium.org; Priyanka Jain (OSS) <priyanka.jain at oss.nxp.com>;
> > trini at konsulko.com; Ioana Ciornei <ioana.ciornei at nxp.com>; Madalin Bucur
> > (OSS) <madalin.bucur at oss.nxp.com>
> > Subject: [PATCH 09/12] driver: net: fm: add DM ETH support
> >
> > Probe the FMan MACs based on the device tree while
> > retaining the legacy code/functionality.
> > One notable change introduced here is that, for DM_ETH,
> > the name of the interfaces is corrected to the fmX-macY
> > format, that avoids the referral to the MAC block names
> > which were incorrect for FMan v3 devices (i.e. DTSEC,
> > TGEC) and had weird formatting (i.e. FM1 at DTSEC6, FM1 at TGEC1).
> > The legacy code is left unchanged in this respect.
> >
> > Signed-off-by: Madalin Bucur <madalin.bucur at oss.nxp.com>
> 
> <snip>
> 
> > @@ -37,10 +46,18 @@ static void dtsec_configure_serdes(struct fm_eth
> > *priv)
> >  #ifdef CONFIG_SYS_FMAN_V3
> >  	u32 value;
> >  	struct mii_dev bus;
> > -	bus.priv = priv->mac->phyregs;
> >  	bool sgmii_2500 = (priv->enet_if ==
> >  			PHY_INTERFACE_MODE_SGMII_2500) ? true : false;
> > -	int i = 0;
> > +	int i = 0, j;
> > +
> > +#ifndef CONFIG_DM_ETH
> > +	bus.priv = priv->mac->phyregs;
> > +#else
> > +	bus.priv = priv->pcs_mdio;
> > +#endif
> > +	bus.read = memac_mdio_read;
> > +	bus.write = memac_mdio_write;
> > +	bus.reset = memac_mdio_reset;
> 
> The read/write/reset callback changes should be added for the DM_ETH case
> only.
> 
> Camelia

Indeed, thank you, let me send a v2.
I'll also have to drop patch 10/12, issue was addressed already.

Madalin


More information about the U-Boot mailing list