net: Add 405EX support to new EMAC driver
Subsystems (2)
PATCH 1/1 net: Add 405EX support to new EMAC driver
This patch adds support for the 405EX to the new EMAC driver.
Tested on AMCC Kilauea.
--- drivers/net/ibm_newemac/core.c | 3 ++- drivers/net/ibm_newemac/rgmii.c | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/net/ibm_newemac/core.c +2 -1
@@ -2466,7 +2466,8 @@ static int __devinit emac_init_config(struct emac_instance *dev)if (of_device_is_compatible (np,"ibm,emac4" )) dev->features |=EMAC_FTR_EMAC4 ;if (of_device_is_compatible (np,"ibm,emac-axon" ) - ||of_device_is_compatible (np,"ibm,emac-440epx" )) + ||of_device_is_compatible (np,"ibm,emac-440epx" ) + ||of_device_is_compatible (np,"ibm,emac-405ex" )) dev->features |=EMAC_FTR_HAS_AXON_STACR |EMAC_FTR_STACR_OC_INVERT ;if (of_device_is_compatible (np,"ibm,emac-440spe" ))
drivers/net/ibm_newemac/rgmii.c +0 -6
@@ -140,9 +140,6 @@ void rgmii_get_mdio(struct of_device *ofdev, int input)RGMII_DBG2 (dev,"get_mdio(%d)" NL , input); -if (dev->type !=RGMII_AXON ) -return ; -mutex_lock (&dev->lock); fer =in_be32 (&p->fer);
@@ -161,9 +158,6 @@ void rgmii_put_mdio(struct of_device *ofdev, int input)RGMII_DBG2 (dev,"put_mdio(%d)" NL , input); -if (dev->type !=RGMII_AXON ) -return ; - fer =in_be32 (&p->fer); fer &= ~(0x00080000u >> input);out_be32 (&p->fer, fer);
Signature · 1 line
1.5.3.4.498.g9c514
Quoted 3 lines · Stefan Roese
This patch adds support for the 405EX to the new EMAC driver.
Tested on AMCC Kilauea.
.../...
drivers/net/ibm_newemac/rgmii.c void rgmii_get_mdio(struct of_device *ofdev, int input) · line 143
Quoted 12 lines
drivers/net/ibm_newemac/rgmii.c +0
-3@@ -140,9 +140,6 @@ void rgmii_get_mdio(struct of_device *ofdev, int input)RGMII_DBG2 (dev,"get_mdio(%d)" NL , input); -if (dev->type !=RGMII_AXON ) -return ; -mutex_lock (&dev->lock);
That will break 440GX boards that need to use the RGMII for data and the ZMII for MDIO.
You may want to change the name RGMII_AXON something like RGMII_HAS_MDIO instead and set that for 405EX as well instead.
Ben.
Quoted 24 lines · On Fri, 02 Nov 2007 07:37:01 +1100 Benjamin Herrenschmidt…
Quoted 3 lines · Stefan Roese
This patch adds support for the 405EX to the new EMAC driver.
Tested on AMCC Kilauea.
.../...
drivers/net/ibm_newemac/rgmii.c void rgmii_get_mdio(struct of_device *ofdev, int input) · line 143
Quoted 12 lines
drivers/net/ibm_newemac/rgmii.c +0
-3@@ -140,9 +140,6 @@ void rgmii_get_mdio(struct of_device *ofdev, int input)RGMII_DBG2 (dev,"get_mdio(%d)" NL , input); -if (dev->type !=RGMII_AXON ) -return ; -mutex_lock (&dev->lock);That will break 440GX boards that need to use the RGMII for data and the ZMII for MDIO.
Quoted 2 lines
You may want to change the name
RGMII_AXONsomething likeRGMII_HAS_MDIOinstead and set that for 405EX as well instead.
And perhaps adding a comment about that since the meaning of that code isn't very obvious. That way people that aren't the original author of the driver don't get confused again.
josh
Quoted 8 lines · Josh Boyer
Quoted 8 lines
drivers/net/ibm_newemac/rgmii.c void rgmii_get_mdio(struct of_device *ofdev, int input) · line 143
Quoted 4 lines
drivers/net/ibm_newemac/rgmii.c +0
-3-if (dev->type !=RGMII_AXON ) -return ; -mutex_lock (&dev->lock);That will break 440GX boards that need to use the RGMII for data and the ZMII for MDIO.
Quoted 6 lines
Quoted 2 lines
You may want to change the name
RGMII_AXONsomething likeRGMII_HAS_MDIOinstead and set that for 405EX as well instead.And perhaps adding a comment about that since the meaning of that code isn't very obvious. That way people that aren't the original author of the driver don't get confused again.
Will do. I'll send a fixed version tomorrow.
Best regards,
Stefan