diff mbox series

eth: Fixed-phy support in r-car

Message ID CAEnBdDov4LomuWSY-bmCLHTtAGQ9JUbB-d=RpD10CoBW1ATLcw@mail.gmail.com
State New
Delegated to: Marek Vasut
Headers show
Series eth: Fixed-phy support in r-car | expand

Commit Message

Mikle Lappo Feb. 10, 2020, 6:33 p.m. UTC
From 87bdd605d79f3c492cfc2634a51b17de161b87b5 Mon Sep 17 00:00:00 2001
From: Mikhail Lappo <miklelappo@gmail.com>
Date: Fri, 7 Feb 2020 12:37:53 +0100
Subject: [PATCH] eth: Fixed-phy support in r-car

Calling old Uboot API doesn't allow to use fixed phy.
Searching by mask is the part of new function, after
scanning FDT for a fixed-phy definition

Signed-off-by: Mikhail Lappo <miklelappo@gmail.com>
CC: Marek Vasut <marek.vasut+renesas@gmail.com>
---
 drivers/net/ravb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 46e02ed14c..92b9a0767c 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -304,7 +304,7 @@  static int ravb_phy_config(struct udevice *dev)
  struct ravb_priv *eth = dev_get_priv(dev);
  struct eth_pdata *pdata = dev_get_platdata(dev);
  struct phy_device *phydev;
- int mask = 0xffffffff, reg;
+ int reg;

  if (dm_gpio_is_valid(&eth->reset_gpio)) {
  dm_gpio_set_value(&eth->reset_gpio, 1);
@@ -313,7 +313,7 @@  static int ravb_phy_config(struct udevice *dev)
  mdelay(1);
  }

- phydev = phy_find_by_mask(eth->bus, mask, pdata->phy_interface);
+ phydev = phy_connect(eth->bus, 0, dev, pdata->phy_interface);
  if (!phydev)
  return -ENODEV;