diff mbox series

[v1,04/10] net: mvpp2: remove redundant SMI address configuration

Message ID 20210427152713.v1.4.Ie579dd23cb40ead83e35c339c829b6a1537d5877@changeid
State Changes Requested
Delegated to: Ramon Fried
Headers show
Series net: mvpp2: Sync Marvell mvpp2 driver with Marvell version | expand

Commit Message

Stefan Roese April 27, 2021, 1:27 p.m. UTC
From: Marcin Wojtas <mw@semihalf.com>

Because the mvpp2 driver now relies on the PHYLIB and
the external MDIO driver, configuring low level
SMI bus settings is redundant.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Reviewed-by: Stefan Chulski <stefanc@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
---

 drivers/net/mvpp2.c | 12 ------------
 1 file changed, 12 deletions(-)

Comments

Ramon Fried April 29, 2021, 8:23 p.m. UTC | #1
On Tue, Apr 27, 2021 at 4:28 PM Stefan Roese <sr@denx.de> wrote:
>
> From: Marcin Wojtas <mw@semihalf.com>
>
> Because the mvpp2 driver now relies on the PHYLIB and
> the external MDIO driver, configuring low level
> SMI bus settings is redundant.
>
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
> Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
> Reviewed-by: Stefan Chulski <stefanc@marvell.com>
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
>
>  drivers/net/mvpp2.c | 12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
> index 847007d5b487..2043bdf10aa4 100644
> --- a/drivers/net/mvpp2.c
> +++ b/drivers/net/mvpp2.c
> @@ -5292,14 +5292,6 @@ static int mvpp2_write_hwaddr(struct udevice *dev)
>         return mvpp2_prs_update_mac_da(port, port->dev_addr);
>  }
>
> -static int mvpp22_smi_phy_addr_cfg(struct mvpp2_port *port)
> -{
> -       writel(port->phyaddr, port->priv->iface_base +
> -              MVPP22_SMI_PHY_ADDR_REG(port->gop_id));
> -
> -       return 0;
> -}
> -
>  static int mvpp2_base_probe(struct udevice *dev)
>  {
>         struct mvpp2 *priv = dev_get_priv(dev);
> @@ -5422,10 +5414,6 @@ static int mvpp2_probe(struct udevice *dev)
>                 port->base = priv->iface_base + MVPP22_PORT_BASE +
>                         port->gop_id * MVPP22_PORT_OFFSET;
>
> -               /* Set phy address of the port */
> -               if (port->phyaddr < PHY_MAX_ADDR)
> -                       mvpp22_smi_phy_addr_cfg(port);
> -
>                 /* GoP Init */
>                 gop_port_init(port);
>         }
> --
> 2.31.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
diff mbox series

Patch

diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 847007d5b487..2043bdf10aa4 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -5292,14 +5292,6 @@  static int mvpp2_write_hwaddr(struct udevice *dev)
 	return mvpp2_prs_update_mac_da(port, port->dev_addr);
 }
 
-static int mvpp22_smi_phy_addr_cfg(struct mvpp2_port *port)
-{
-	writel(port->phyaddr, port->priv->iface_base +
-	       MVPP22_SMI_PHY_ADDR_REG(port->gop_id));
-
-	return 0;
-}
-
 static int mvpp2_base_probe(struct udevice *dev)
 {
 	struct mvpp2 *priv = dev_get_priv(dev);
@@ -5422,10 +5414,6 @@  static int mvpp2_probe(struct udevice *dev)
 		port->base = priv->iface_base + MVPP22_PORT_BASE +
 			port->gop_id * MVPP22_PORT_OFFSET;
 
-		/* Set phy address of the port */
-		if (port->phyaddr < PHY_MAX_ADDR)
-			mvpp22_smi_phy_addr_cfg(port);
-
 		/* GoP Init */
 		gop_port_init(port);
 	}