[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56B4A877.4020800@laposte.net>
Date: Fri, 05 Feb 2016 14:49:43 +0100
From: Sebastian Frias <sf84@...oste.net>
To: Måns Rullgård <mans@...sr.com>
CC: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, mason <slash.tmp@...e.fr>
Subject: [PATCH v2] net: ethernet: support "fixed-link" DT key/node on nb8800
driver
Signed-off-by: Sebastian Frias <sf84@...oste.net>
---
drivers/net/ethernet/aurora/nb8800.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/aurora/nb8800.c
b/drivers/net/ethernet/aurora/nb8800.c
index ecc4a33..dd7bedc 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1462,9 +1462,18 @@ static int nb8800_probe(struct platform_device *pdev)
priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
if (!priv->phy_node) {
- dev_err(&pdev->dev, "no PHY specified\n");
- ret = -ENODEV;
- goto err_free_bus;
+ if (of_phy_is_fixed_link(pdev->dev.of_node)) {
+ ret = of_phy_register_fixed_link(pdev->dev.of_node);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "bad fixed-link spec\n");
+ goto err_free_bus;
+ }
+ priv->phy_node = of_node_get(pdev->dev.of_node);
+ } else {
+ dev_err(&pdev->dev, "no PHY specified\n");
+ ret = -ENODEV;
+ goto err_free_bus;
+ }
}
priv->mii_bus = bus;
--
2.1.4
Powered by blists - more mailing lists