Skip to content

Commit

Permalink
fs_enet: Add fixed-phy support for fs_enet
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jochen Friedrich authored and Kumar Gala committed Jan 24, 2008
1 parent 6869e4a commit 70f782e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 70f782e

Please sign in to comment.