diff options
author | Jochen Friedrich <jochen@scram.de> | 2007-12-18 10:25:43 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-01-23 20:54:28 -0500 |
commit | 70f782e14870435aa37b91e1ea0a189a78eb0fa9 (patch) | |
tree | c691092abb08aa9024ac472a9a65c4b7d90554bf /drivers | |
parent | 6869e4ad4bd17e7699e58bed6464738e8677c392 (diff) |
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 <jochen@scram.de>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Vitali Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/fs_enet/fs_enet-main.c | 9 |
1 files changed, 8 insertions, 1 deletions
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, | |||
1174 | struct device_node *phynode, *mdionode; | 1174 | struct device_node *phynode, *mdionode; |
1175 | struct resource res; | 1175 | struct resource res; |
1176 | int ret = 0, len; | 1176 | int ret = 0, len; |
1177 | const u32 *data; | ||
1178 | |||
1179 | data = of_get_property(np, "fixed-link", NULL); | ||
1180 | if (data) { | ||
1181 | snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); | ||
1182 | return 0; | ||
1183 | } | ||
1177 | 1184 | ||
1178 | const u32 *data = of_get_property(np, "phy-handle", &len); | 1185 | data = of_get_property(np, "phy-handle", &len); |
1179 | if (!data || len != 4) | 1186 | if (!data || len != 4) |
1180 | return -EINVAL; | 1187 | return -EINVAL; |
1181 | 1188 | ||