提交 70f782e1 编写于 作者: J Jochen Friedrich 提交者: Kumar Gala

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: NJochen Friedrich <jochen@scram.de>
Acked-by: NJeff Garzik <jeff@garzik.org>
Acked-by: NVitali Bordug <vitb@kernel.crashing.org>
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
上级 6869e4ad
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册