Skip to content

Commit

Permalink
ibm_newemac: Skip EMACs that are marked unused by the firmware
Browse files Browse the repository at this point in the history
Depending on how the 44x processors are wired, some EMAC cells
might not be useable (and not connected to a PHY). However, some
device-trees may choose to still expose them (since their registers
are present in the MMIO space) but with an "unused" property in them.

Signed-off-by: Hugh Blemings <hugh@blemings.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Hugh Blemings authored and Jeff Garzik committed Dec 7, 2007
1 parent bff713b commit 3d72256
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ibm_newemac/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,10 @@ static int __devinit emac_probe(struct of_device *ofdev,
struct device_node **blist = NULL;
int err, i;

/* Skip unused/unwired EMACS */
if (of_get_property(np, "unused", NULL))
return -ENODEV;

/* Find ourselves in the bootlist if we are there */
for (i = 0; i < EMAC_BOOT_LIST_SIZE; i++)
if (emac_boot_list[i] == np)
Expand Down

0 comments on commit 3d72256

Please sign in to comment.