ibm_newemac: Skip EMACs that are marked unused by the firmware
Subsystems (2)
PATCH 7/11 ibm_newemac: Skip EMACs that are marked unused by the firmware
From: Hugh Blemings <[email protected]>
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.
---
drivers/net/ibm_newemac/core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ibm_newemac/core.c +4 -0
@@ -2550,6 +2550,10 @@ static int __devinit emac_probe(struct ostruct 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)
Quoted 7 lines · Benjamin Herrenschmidt
From: Hugh Blemings <[email protected]>
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.
It occurred to me the other day. Instead of using a new "unused" property for this, should we be using the OF standard "status" property.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 3 lines · David Gibson
It occurred to me the other day. Instead of using a new "unused" property for this, should we be using the OF standard "status" property.
Dunno... it's really not wired. Probably not even clocked.
Ben.
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines · David Gibson
It occurred to me the other day. Instead of using a new "unused" property for this, should we be using the OF standard "status" property.
Dunno... it's really not wired. Probably not even clocked.
status = "fail-notconnected"; ?
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 10 lines · David Gibson
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines · David Gibson
It occurred to me the other day. Instead of using a new "unused" property for this, should we be using the OF standard "status" property.
Dunno... it's really not wired. Probably not even clocked.
status = "fail-notconnected"; ?
Bah, that's fugly.. jeff, don't hold the patches, we may sort that out later.
Ben.