[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <019301ce67d4$ed1e32b0$c75a9810$%an@samsung.com>
Date: Thu, 13 Jun 2013 10:25:44 +0900
From: Byungho An <bh74.an@...sung.com>
To: netdev@...r.kernel.org
Cc: 'Giuseppe CAVALLARO' <peppe.cavallaro@...com>,
'±è±¹Áø' <kgene.kim@...sung.com>,
davem@...emloft.net, cpgs@...sung.com
Subject: [PATCH net-next] stmmac: added device tree support for fixed_phy and
phy_addr
This patch adds device tree support for fixed_phy and phy_addr it means
fixed_phy and phy_addr can be set in device tree file. "fixed_phy" and
"phy_addr" can be added in the device tree blob.
Signed-off-by: Byungho An <bh74.an@...sung.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 1d3780f..33ba995 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -34,6 +34,7 @@ static int stmmac_probe_config_dt(struct platform_device
*pdev,
const char **mac)
{
struct device_node *np = pdev->dev.of_node;
+ u32 phy_addr;
if (!np)
return -ENODEV;
@@ -56,6 +57,12 @@ static int stmmac_probe_config_dt(struct platform_device
*pdev,
plat->pmt = 1;
}
+ if (of_find_property(np, "fixed_phy", NULL)) {
+ plat->phy_bus_name = "fixed";
+ of_property_read_u32(np, "phy_addr", &phy_addr);
+ plat->phy_addr = phy_addr;
+ }
+
return 0;
}
#else
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists