[PATCH] eth: Fix crash while enabling fixed-phy
Mikle Lappo
miklelappo at gmail.com
Mon Feb 10 19:31:11 CET 2020
>From db35a238c5ae530e82d6de4cab180d570a3d8fc9 Mon Sep 17 00:00:00 2001
From: Mikhail Lappo <miklelappo at gmail.com>
Date: Fri, 7 Feb 2020 14:13:25 +0100
Subject: [PATCH] eth: Fix crash while enabling fixed-phy
Fixed phy is always enabled and doesn't
implement writeext function
Signed-off-by: Mikhail Lappo <miklelappo at gmail.com>
CC: Marek Vasut <marek.vasut+renesas at gmail.com>
---
drivers/net/ravb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index fb4a628d63..46e02ed14c 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -434,7 +434,8 @@ static int ravb_config(struct udevice *dev)
writel(mask, eth->iobase + RAVB_REG_ECMR);
- phy->drv->writeext(phy, -1, 0x02, 0x08, (0x0f << 5) | 0x19);
+ if (phy->drv->writeext)
+ phy->drv->writeext(phy, -1, 0x02, 0x08, (0x0f << 5) | 0x19);
return 0;
}
--
2.21.0 (Apple Git-122)
More information about the U-Boot
mailing list