Commit b68d185a authored by Josh Boyer's avatar Josh Boyer

ibm_newemac: Allow the "no flow control" EMAC feature to work

Some PowerPC 40x chips have errata that force us not to use the integrated
flow control.  We have the feature defined, but it currently can't be used
because it is never added to EMAC_FTRS_POSSIBLE.

This adds a Kconfig option for affected platforms to select and puts the
feature in the EMAC_FTRS_POSSIBLE list.  This is set for PowerPC 405EZ
platforms as well.
Signed-off-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
parent 1afb7f80
...@@ -62,3 +62,7 @@ config IBM_NEW_EMAC_TAH ...@@ -62,3 +62,7 @@ config IBM_NEW_EMAC_TAH
config IBM_NEW_EMAC_EMAC4 config IBM_NEW_EMAC_EMAC4
bool bool
default n default n
config IBM_NEW_EMAC_NO_FLOW_CTRL
bool
default n
...@@ -2567,6 +2567,8 @@ static int __devinit emac_init_config(struct emac_instance *dev) ...@@ -2567,6 +2567,8 @@ static int __devinit emac_init_config(struct emac_instance *dev)
if (of_device_is_compatible(np, "ibm,emac-440ep") || if (of_device_is_compatible(np, "ibm,emac-440ep") ||
of_device_is_compatible(np, "ibm,emac-440gr")) of_device_is_compatible(np, "ibm,emac-440gr"))
dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX;
if (of_device_is_compatible(np, "ibm,emac-405ez"))
dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x;
} }
/* Fixup some feature bits based on the device tree */ /* Fixup some feature bits based on the device tree */
......
...@@ -340,6 +340,9 @@ enum { ...@@ -340,6 +340,9 @@ enum {
#endif #endif
#ifdef CONFIG_IBM_NEW_EMAC_RGMII #ifdef CONFIG_IBM_NEW_EMAC_RGMII
EMAC_FTR_HAS_RGMII | EMAC_FTR_HAS_RGMII |
#endif
#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL
EMAC_FTR_NO_FLOW_CONTROL_40x |
#endif #endif
EMAC_FTR_440EP_PHY_CLK_FIX, EMAC_FTR_440EP_PHY_CLK_FIX,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment