[PATCH] eth: Fixed-phy support in r-car

Mikle Lappo miklelappo at gmail.com
Mon Feb 10 19:33:03 CET 2020


>From 87bdd605d79f3c492cfc2634a51b17de161b87b5 Mon Sep 17 00:00:00 2001
From: Mikhail Lappo <miklelappo at 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 at gmail.com>
CC: Marek Vasut <marek.vasut+renesas at gmail.com>
---
 drivers/net/ravb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;

-- 
2.21.0 (Apple Git-122)


More information about the U-Boot mailing list