
-----Original Message----- From: Camelia Alexandra Groza (OSS) camelia.groza@oss.nxp.com Sent: Tuesday, April 28, 2020 4:06 PM To: Madalin Bucur (OSS) madalin.bucur@oss.nxp.com; u-boot@lists.denx.de Cc: Ruchika Gupta ruchika.gupta@nxp.com; joe.hershberger@ni.com; sjg@chromium.org; Priyanka Jain (OSS) priyanka.jain@oss.nxp.com; trini@konsulko.com; Ioana Ciornei ioana.ciornei@nxp.com Subject: RE: [PATCH 09/12] driver: net: fm: add DM ETH support
-----Original Message----- From: U-Boot u-boot-bounces@lists.denx.de On Behalf Of Madalin Bucur Sent: Thursday, April 23, 2020 16:25 To: u-boot@lists.denx.de Cc: Ruchika Gupta ruchika.gupta@nxp.com; joe.hershberger@ni.com; sjg@chromium.org; Priyanka Jain (OSS) priyanka.jain@oss.nxp.com; trini@konsulko.com; Ioana Ciornei ioana.ciornei@nxp.com; Madalin Bucur (OSS) madalin.bucur@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@DTSEC6, FM1@TGEC1). The legacy code is left unchanged in this respect.
Signed-off-by: Madalin Bucur madalin.bucur@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