[U-Boot] [PATCH v4 07/15] net: macb: Fix clk API usage for RISC-V systems

Anup Patel Anup.Patel at wdc.com
Wed Jan 23 16:49:18 UTC 2019


Don't fail in macb_enable_clk() if clk_enable() returns
-ENOSYS because we get -ENOSYS for fixed-rate clocks.

Signed-off-by: Anup Patel <anup.patel at wdc.com>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 94c89c762b..5985b35a34 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -1066,7 +1066,7 @@ static int macb_enable_clk(struct udevice *dev)
 	 */
 #ifndef CONFIG_MACB_ZYNQ
 	ret = clk_enable(&clk);
-	if (ret)
+	if (ret && ret != -ENOSYS)
 		return ret;
 #endif
 
-- 
2.17.1



More information about the U-Boot mailing list