From 70f782e14870435aa37b91e1ea0a189a78eb0fa9 Mon Sep 17 00:00:00 2001 From: Jochen Friedrich Date: Tue, 18 Dec 2007 16:25:43 +0100 Subject: [PATCH] fs_enet: Add fixed-phy support for fs_enet This patch adds support to use the fixed-link property of an ethernet node to fs_enet for the CONFIG_PPC_CPM_NEW_BINDING case. Signed-off-by: Jochen Friedrich Acked-by: Jeff Garzik Acked-by: Vitali Bordug Signed-off-by: Kumar Gala --- drivers/net/fs_enet/fs_enet-main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index f2a4d399a6e5..8220c70534ed 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -1174,8 +1174,15 @@ static int __devinit find_phy(struct device_node *np, struct device_node *phynode, *mdionode; struct resource res; int ret = 0, len; + const u32 *data; + + data = of_get_property(np, "fixed-link", NULL); + if (data) { + snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); + return 0; + } - const u32 *data = of_get_property(np, "phy-handle", &len); + data = of_get_property(np, "phy-handle", &len); if (!data || len != 4) return -EINVAL; -- 2.30.2