powerpc/44x: Add more changes for APM821XX EMAC driver
Subsystems (4)
PATCH 2/2 powerpc/44x: Add more changes for APM821XX EMAC driver
This patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not
support half duplex mode.
Add changes to support configuring jumbo frame for APM821XX EMAC.
--- drivers/net/ethernet/ibm/emac/core.c | 26 +++++++++++++++++++++++++- drivers/net/ethernet/ibm/emac/core.h | 13 +++++++++++-- drivers/net/ethernet/ibm/emac/emac.h | 5 ++++- 3 files changed, 40 insertions(+), 4 deletions(-)
drivers/net/ethernet/ibm/emac/core.c +25 -1
@@ -434,6 +434,11 @@ static inline u32 emac_iff2rmr(struct net_device *ndev)else if (!netdev_mc_empty (ndev)) r |=EMAC_RMR_MAE ; +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) { + r &= ~EMAC4_RMR_MJS_MASK ; + r |=EMAC4_RMR_MJS (ndev->mtu); + } +return r; }
@@ -965,6 +970,7 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu)int rx_sync_size =emac_rx_sync_size (new_mtu);int rx_skb_size =emac_rx_skb_size (new_mtu);int i, ret =0 ; +int mr1_jumbo_bit_change =0 ;mutex_lock (&dev->link_lock);emac_netif_stop (dev);
@@ -1013,7 +1019,14 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) } skip:/* Check if we need to change "Jumbo" bit in MR1 */ -if ((new_mtu >ETH_DATA_LEN ) ^ (dev->ndev->mtu >ETH_DATA_LEN )) { +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) || + (dev->ndev->mtu >ETH_DATA_LEN ); +else + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) ^ + (dev->ndev->mtu >ETH_DATA_LEN ); + +if (mr1_jumbo_bit_change) {/* This is to prevent starting RX channel in emac_rx_enable() */ set_bit (MAL_COMMAC_RX_STOPPED , &dev->commac.flags);
@@ -2471,6 +2484,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)/* Disable any PHY features not supported by the platform */ dev->phy.def->features &= ~dev->phy_feat_exc; + dev->phy.features &= ~dev->phy_feat_exc;/* Setup initial link parameters */ if (dev->phy.features & SUPPORTED_Autoneg) {
@@ -2568,6 +2582,10 @@ static int __devinit emac_init_config(struct emac_instance *dev)if (of_device_is_compatible (np,"ibm,emac-405ex" ) ||of_device_is_compatible (np,"ibm,emac-405exr" )) dev->features |=EMAC_FTR_440EP_PHY_CLK_FIX ; +if (of_device_is_compatible (np,"ibm,emac-apm821xx" )) + dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE + |EMAC_FTR_APM821XX_NO_HALF_DUPLEX + |EMAC_FTR_460EX_PHY_CLK_FIX ); }else if (of_device_is_compatible (np,"ibm,emac4" )) { dev->features |=EMAC_FTR_EMAC4 ;if (of_device_is_compatible (np,"ibm,emac-440gx" ))
@@ -2818,6 +2836,12 @@ static int __devinit emac_probe(struct platform_device *ofdev) dev->stop_timeout =STOP_TIMEOUT_100 ;INIT_DELAYED_WORK (&dev->link_work, emac_link_timer); +/* Some SoCs like APM821xx does not support Half Duplex mode. */ +if (emac_has_feature (dev,EMAC_FTR_APM821XX_NO_HALF_DUPLEX )) + dev->phy_feat_exc = (SUPPORTED_1000baseT_Half + | SUPPORTED_100baseT_Half + | SUPPORTED_10baseT_Half); +/* Find PHY if any */ err =emac_init_phy (dev);if (err !=0 )
drivers/net/ethernet/ibm/emac/core.h +11 -2
@@ -325,7 +325,14 @@ struct emac_instance {* Set if we need phy clock workaround for 460ex or 460gt */ #define EMAC_FTR_460EX_PHY_CLK_FIX 0x00000400 - +/* +* APM821xx requires Jumbo frame size set explicitly +*/ +#define EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE 0x00000800 +/* +* APM821xx does not support Half Duplex mode +*/ +#define EMAC_FTR_APM821XX_NO_HALF_DUPLEX 0x00001000/* Right now, we don't quite handle the always/possible masks on the * most optimal way as we don't have a way to say something like
@@ -353,7 +360,9 @@ enum { EMAC_FTR_NO_FLOW_CONTROL_40x | #endifEMAC_FTR_460EX_PHY_CLK_FIX | - EMAC_FTR_440EP_PHY_CLK_FIX, +EMAC_FTR_440EP_PHY_CLK_FIX | +EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX, }; static inline int emac_has_feature(struct emac_instance *dev,
drivers/net/ethernet/ibm/emac/emac.h +4 -1
@@ -212,7 +212,10 @@ struct emac_regs {#define EMAC4_RMR_RFAF_64_1024 0x00000006#define EMAC4_RMR_RFAF_128_2048 0x00000007#define EMAC4_RMR_BASE EMAC4_RMR_RFAF_128_2048 - +#if defined(CONFIG_APM821xx) +#define EMAC4_RMR_MJS_MASK 0x0001fff8 +#define EMAC4_RMR_MJS (s) (((s) << 3) & EMAC4_RMR_MJS_MASK) +#endif /* EMACx_ISR & EMACx_ISER */ #define EMAC4_ISR_TXPE 0x20000000#define EMAC4_ISR_RXPE 0x10000000
Signature · 1 line
1.7.5.4
Quoted 10 lines · Duc Dang
This patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not support half duplex mode.
Add changes to support configuring jumbo frame for APM821XX EMAC.
Signed-off-by Duc Dang <[email protected]>
This should have been sent to netdev. CC'ing them now.
Ben and David, I can take this change through the 4xx tree if it looks OK to both of you. The pre-requisite DTS patch will go through my tree, so it might make sense to keep them together.
josh
Quoted 133 lines
--- drivers/net/ethernet/ibm/emac/core.c | 26 +++++++++++++++++++++++++- drivers/net/ethernet/ibm/emac/core.h | 13 +++++++++++-- drivers/net/ethernet/ibm/emac/emac.h | 5 ++++- 3 files changed, 40 insertions(+), 4 deletions(-)drivers/net/ethernet/ibm/emac/core.c +25
-1@@ -434,6 +434,11 @@ static inline u32 emac_iff2rmr(struct net_device *ndev)else if (!netdev_mc_empty (ndev)) r |=EMAC_RMR_MAE ; +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) { + r &= ~EMAC4_RMR_MJS_MASK ; + r |=EMAC4_RMR_MJS (ndev->mtu); + } +return r; }@@ -965,6 +970,7 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu)int rx_sync_size =emac_rx_sync_size (new_mtu);int rx_skb_size =emac_rx_skb_size (new_mtu);int i, ret =0 ; +int mr1_jumbo_bit_change =0 ;mutex_lock (&dev->link_lock);emac_netif_stop (dev);@@ -1013,7 +1019,14 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) } skip:/* Check if we need to change "Jumbo" bit in MR1 */ -if ((new_mtu >ETH_DATA_LEN ) ^ (dev->ndev->mtu >ETH_DATA_LEN )) { +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) || + (dev->ndev->mtu >ETH_DATA_LEN ); +else + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) ^ + (dev->ndev->mtu >ETH_DATA_LEN ); + +if (mr1_jumbo_bit_change) {/* This is to prevent starting RX channel in emac_rx_enable() */ set_bit (MAL_COMMAC_RX_STOPPED , &dev->commac.flags);@@ -2471,6 +2484,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)/* Disable any PHY features not supported by the platform */ dev->phy.def->features &= ~dev->phy_feat_exc; + dev->phy.features &= ~dev->phy_feat_exc;/* Setup initial link parameters */ if (dev->phy.features & SUPPORTED_Autoneg) {@@ -2568,6 +2582,10 @@ static int __devinit emac_init_config(struct emac_instance *dev)if (of_device_is_compatible (np,"ibm,emac-405ex" ) ||of_device_is_compatible (np,"ibm,emac-405exr" )) dev->features |=EMAC_FTR_440EP_PHY_CLK_FIX ; +if (of_device_is_compatible (np,"ibm,emac-apm821xx" )) + dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE + |EMAC_FTR_APM821XX_NO_HALF_DUPLEX + |EMAC_FTR_460EX_PHY_CLK_FIX ); }else if (of_device_is_compatible (np,"ibm,emac4" )) { dev->features |=EMAC_FTR_EMAC4 ;if (of_device_is_compatible (np,"ibm,emac-440gx" ))@@ -2818,6 +2836,12 @@ static int __devinit emac_probe(struct platform_device *ofdev) dev->stop_timeout =STOP_TIMEOUT_100 ;INIT_DELAYED_WORK (&dev->link_work, emac_link_timer); +/* Some SoCs like APM821xx does not support Half Duplex mode. */ +if (emac_has_feature (dev,EMAC_FTR_APM821XX_NO_HALF_DUPLEX )) + dev->phy_feat_exc = (SUPPORTED_1000baseT_Half + | SUPPORTED_100baseT_Half + | SUPPORTED_10baseT_Half); +/* Find PHY if any */ err =emac_init_phy (dev);if (err !=0 )drivers/net/ethernet/ibm/emac/core.h +11
-2@@ -325,7 +325,14 @@ struct emac_instance {* Set if we need phy clock workaround for 460ex or 460gt */ #define EMAC_FTR_460EX_PHY_CLK_FIX 0x00000400 - +/* +* APM821xx requires Jumbo frame size set explicitly +*/ +#define EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE 0x00000800 +/* +* APM821xx does not support Half Duplex mode +*/ +#define EMAC_FTR_APM821XX_NO_HALF_DUPLEX 0x00001000/* Right now, we don't quite handle the always/possible masks on the * most optimal way as we don't have a way to say something like @@ -353,7 +360,9 @@ enum { EMAC_FTR_NO_FLOW_CONTROL_40x | #endifEMAC_FTR_460EX_PHY_CLK_FIX | - EMAC_FTR_440EP_PHY_CLK_FIX, +EMAC_FTR_440EP_PHY_CLK_FIX | +EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX, }; static inline int emac_has_feature(struct emac_instance *dev,drivers/net/ethernet/ibm/emac/emac.h +4
-2@@ -212,7 +212,10 @@ struct emac_regs {#define EMAC4_RMR_RFAF_64_1024 0x00000006#define EMAC4_RMR_RFAF_128_2048 0x00000007#define EMAC4_RMR_BASE EMAC4_RMR_RFAF_128_2048 - +#if defined(CONFIG_APM821xx) +#define EMAC4_RMR_MJS_MASK 0x0001fff8 +#define EMAC4_RMR_MJS (s) (((s) << 3) & EMAC4_RMR_MJS_MASK) +#endif /* EMACx_ISR & EMACx_ISER */ #define EMAC4_ISR_TXPE 0x20000000#define EMAC4_ISR_RXPE 0x10000000 --1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
David Miller
maintainerFrom: Josh Boyer <[email protected]>
Date: Wed, 29 Feb 2012 08:43:46 -0500
Quoted 10 lines · Duc Dang
Quoted 9 lines
This patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not support half duplex mode.
Add changes to support configuring jumbo frame for APM821XX EMAC.
Quoted 7 lines
Quoted 1 line
Signed-off-by Duc Dang <[email protected]>This should have been sent to netdev. CC'ing them now.
Ben and David, I can take this change through the 4xx tree if it looks OK to both of you. The pre-requisite DTS patch will go through my tree, so it might make sense to keep them together.
Well the patch has coding style problems, for one:
Quoted 3 lines
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_init_config(struct emac_instance *dev) · line 2588
Quoted 3 lines
drivers/net/ethernet/ibm/emac/core.c +3
-0+ dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE + |EMAC_FTR_APM821XX_NO_HALF_DUPLEX + |EMAC_FTR_460EX_PHY_CLK_FIX );
Should be:
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX | + EMAC_FTR_460EX_PHY_CLK_FIX);
And this:
Quoted 3 lines
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_probe(struct platform_device *ofdev) · line 2843
Quoted 3 lines
drivers/net/ethernet/ibm/emac/core.c +3
-0+ dev->phy_feat_exc = (SUPPORTED_1000baseT_Half + | SUPPORTED_100baseT_Half + | SUPPORTED_10baseT_Half);
Should be:
Quoted 3 lines
Quoted 3 lines
(quoted diff) +3
-0+ dev->phy_feat_exc = (SUPPORTED_1000baseT_Half | + SUPPORTED_100baseT_Half | + SUPPORTED_10baseT_Half);
Thanks, David and Josh.
Except the coding style problem that David mentioned, do you have other comment about my patch set?
Regards,
Duc Dang.
Quoted 38 lines · David Miller
From: Josh Boyer <[email protected]>
Date: Wed, 29 Feb 2012 08:43:46 -0500Quoted 8 lines · Duc Dang
Quoted 7 lines
This patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not
support half duplex mode.Quoted 7 lines
Quoted 3 lines
Add changes to support configuring jumbo frame for APM821XX EMAC.
Signed-off-by Duc Dang <[email protected]>This should have been sent to netdev. CC'ing them now.
Ben and David, I can take this change through the 4xx tree if it looks
OK to
Quoted 1 line
both of you. The pre-requisite DTS patch will go through my tree, so it
might
Quoted 1 line
make sense to keep them together.
Well the patch has coding style problems, for one:
Quoted 1 line
Quoted 1 line
+
dev->features|=(
EMAC_APM821XX_REQ_JUMBO_FRAME_SIZEQuoted 2 lines
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_init_config(struct emac_instance *dev) · line 2588
Quoted 2 lines
drivers/net/ethernet/ibm/emac/core.c +2
-0+ | EMAC_FTR_APM821XX_NO_HALF_DUPLEX + | EMAC_FTR_460EX_PHY_CLK_FIX);Should be:
Quoted 1 line
Quoted 1 line
+
dev->features|=(
EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE|Quoted 1 line
Quoted 1 line
+
EMAC_FTR_APM821XX_NO_HALF_DUPLEX|
Quoted 1 line
Quoted 1 line
+
EMAC_FTR_460EX_PHY_CLK_FIX);
Quoted 12 lines
And this:
Quoted 3 lines
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_probe(struct platform_device *ofdev) · line 2843
Quoted 3 lines
drivers/net/ethernet/ibm/emac/core.c +3
-0+ dev->phy_feat_exc = (SUPPORTED_1000baseT_Half + | SUPPORTED_100baseT_Half + | SUPPORTED_10baseT_Half);Should be:
Quoted 3 lines
Quoted 3 lines
(quoted diff) +3
-0+ dev->phy_feat_exc = (SUPPORTED_1000baseT_Half | + SUPPORTED_100baseT_Half | + SUPPORTED_10baseT_Half);
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
PATCH v2 1/2 powerpc/44x: Add new compatible value for EMAC node of APM821XX dts file.
In reply to Duc DangThis compatible value will be used to distinguish some special features of APM821XX EMAC: no half duplex mode support, configuring jumbo frame.
---
v2:
No change since v1 patch set. Added for completeness.
arch/powerpc/boot/dts/bluestone.dts | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/boot/dts/bluestone.dts +1 -1
@@ -222,7 +222,7 @@ EMAC0: ethernet@ef600c00 { device_type = "network"; - compatible = "ibm,emac4sync"; + compatible = "ibm,emac-apm821xx", "ibm,emac4sync"; interrupt-parent = <&EMAC0>; interrupts = <0x0 0x1>; #interrupt-cells = <1>;
Signature · 1 line
1.7.5.4
PATCH v2 2/2 powerpc/44x: Add more changes for APM821XX EMAC driver
In reply to Duc DangThis patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not
support half duplex mode.
Add changes to support configuring jumbo frame for APM821XX EMAC.
---
v2:
Fix coding style problems.
drivers/net/ethernet/ibm/emac/core.c | 26 +++++++++++++++++++++++++- drivers/net/ethernet/ibm/emac/core.h | 13 +++++++++++-- drivers/net/ethernet/ibm/emac/emac.h | 5 ++++- 3 files changed, 40 insertions(+), 4 deletions(-)
drivers/net/ethernet/ibm/emac/core.c +25 -1
@@ -434,6 +434,11 @@ static inline u32 emac_iff2rmr(struct net_device *ndev)else if (!netdev_mc_empty (ndev)) r |=EMAC_RMR_MAE ; +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) { + r &= ~EMAC4_RMR_MJS_MASK ; + r |=EMAC4_RMR_MJS (ndev->mtu); + } +return r; }
@@ -965,6 +970,7 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu)int rx_sync_size =emac_rx_sync_size (new_mtu);int rx_skb_size =emac_rx_skb_size (new_mtu);int i, ret =0 ; +int mr1_jumbo_bit_change =0 ;mutex_lock (&dev->link_lock);emac_netif_stop (dev);
@@ -1013,7 +1019,14 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) } skip:/* Check if we need to change "Jumbo" bit in MR1 */ -if ((new_mtu >ETH_DATA_LEN ) ^ (dev->ndev->mtu >ETH_DATA_LEN )) { +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) || + (dev->ndev->mtu >ETH_DATA_LEN ); +else + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) ^ + (dev->ndev->mtu >ETH_DATA_LEN ); + +if (mr1_jumbo_bit_change) {/* This is to prevent starting RX channel in emac_rx_enable() */ set_bit (MAL_COMMAC_RX_STOPPED , &dev->commac.flags);
@@ -2471,6 +2484,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)/* Disable any PHY features not supported by the platform */ dev->phy.def->features &= ~dev->phy_feat_exc; + dev->phy.features &= ~dev->phy_feat_exc;/* Setup initial link parameters */ if (dev->phy.features & SUPPORTED_Autoneg) {
@@ -2568,6 +2582,10 @@ static int __devinit emac_init_config(struct emac_instance *dev)if (of_device_is_compatible (np,"ibm,emac-405ex" ) ||of_device_is_compatible (np,"ibm,emac-405exr" )) dev->features |=EMAC_FTR_440EP_PHY_CLK_FIX ; +if (of_device_is_compatible (np,"ibm,emac-apm821xx" )) + dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | +EMAC_FTR_APM821XX_NO_HALF_DUPLEX | +EMAC_FTR_460EX_PHY_CLK_FIX ); }else if (of_device_is_compatible (np,"ibm,emac4" )) { dev->features |=EMAC_FTR_EMAC4 ;if (of_device_is_compatible (np,"ibm,emac-440gx" ))
@@ -2818,6 +2836,12 @@ static int __devinit emac_probe(struct platform_device *ofdev) dev->stop_timeout =STOP_TIMEOUT_100 ;INIT_DELAYED_WORK (&dev->link_work, emac_link_timer); +/* Some SoCs like APM821xx does not support Half Duplex mode. */ +if (emac_has_feature (dev,EMAC_FTR_APM821XX_NO_HALF_DUPLEX )) + dev->phy_feat_exc = (SUPPORTED_1000baseT_Half | + SUPPORTED_100baseT_Half | + SUPPORTED_10baseT_Half); +/* Find PHY if any */ err =emac_init_phy (dev);if (err !=0 )
drivers/net/ethernet/ibm/emac/core.h +11 -2
@@ -325,7 +325,14 @@ struct emac_instance {* Set if we need phy clock workaround for 460ex or 460gt */ #define EMAC_FTR_460EX_PHY_CLK_FIX 0x00000400 - +/* +* APM821xx requires Jumbo frame size set explicitly +*/ +#define EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE 0x00000800 +/* +* APM821xx does not support Half Duplex mode +*/ +#define EMAC_FTR_APM821XX_NO_HALF_DUPLEX 0x00001000/* Right now, we don't quite handle the always/possible masks on the * most optimal way as we don't have a way to say something like
@@ -353,7 +360,9 @@ enum { EMAC_FTR_NO_FLOW_CONTROL_40x | #endifEMAC_FTR_460EX_PHY_CLK_FIX | - EMAC_FTR_440EP_PHY_CLK_FIX, +EMAC_FTR_440EP_PHY_CLK_FIX | +EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX, }; static inline int emac_has_feature(struct emac_instance *dev,
drivers/net/ethernet/ibm/emac/emac.h +4 -1
@@ -212,7 +212,10 @@ struct emac_regs {#define EMAC4_RMR_RFAF_64_1024 0x00000006#define EMAC4_RMR_RFAF_128_2048 0x00000007#define EMAC4_RMR_BASE EMAC4_RMR_RFAF_128_2048 - +#if defined(CONFIG_APM821xx) +#define EMAC4_RMR_MJS_MASK 0x0001fff8 +#define EMAC4_RMR_MJS (s) (((s) << 3) & EMAC4_RMR_MJS_MASK) +#endif /* EMACx_ISR & EMACx_ISER */ #define EMAC4_ISR_TXPE 0x20000000#define EMAC4_ISR_RXPE 0x10000000
Signature · 1 line
1.7.5.4
Quoted 47 lines · On Monday 05 March 2012 05:03:44 Duc Dang wrote:
This patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not
support half duplex mode.Add changes to support configuring jumbo frame for APM821XX EMAC.
Signed-off-by Duc Dang <[email protected]>---
v2:
Fix coding style problems.drivers/net/ethernet/ibm/emac/core.c | 26 +++++++++++++++++++++++++- drivers/net/ethernet/ibm/emac/core.h | 13 +++++++++++-- drivers/net/ethernet/ibm/emac/emac.h | 5 ++++- 3 files changed, 40 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/drivers/net/ethernet/ibm/emac/core.cindex 2abce96..ad671c5 100644drivers/net/ethernet/ibm/emac/core.c +6
-0@@ -434,6 +434,11 @@ static inline u32 emac_iff2rmr(struct net_device *ndev) else if (!netdev_mc_empty(ndev)) r |=EMAC_RMR_MAE ; +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) { + r &= ~EMAC4_RMR_MJS_MASK ; + r |=EMAC4_RMR_MJS (ndev->mtu); + } +return r; }@@ -965,6 +970,7 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) int rx_sync_size = emac_rx_sync_size(new_mtu);int rx_skb_size =emac_rx_skb_size (new_mtu);int i, ret =0 ; +int mr1_jumbo_bit_change =0 ;mutex_lock (&dev->link_lock);emac_netif_stop (dev);@@ -1013,7 +1019,14 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) } skip:/* Check if we need to change "Jumbo" bit in MR1 */
drivers/net/ethernet/ibm/emac/core.c static int emac_resize_rx_ring(struct emac_instance · line 1030
Quoted 10 lines
drivers/net/ethernet/ibm/emac/core.c +8
-1-if ((new_mtu >ETH_DATA_LEN ) ^ (dev->ndev->mtu >ETH_DATA_LEN )) { +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) || + (dev->ndev->mtu >ETH_DATA_LEN ); +else + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) ^ + (dev->ndev->mtu >ETH_DATA_LEN ); + +if (mr1_jumbo_bit_change) {/* This is to prevent starting RX channel in emac_rx_enable()
*/
Quoted 13 lines
drivers/net/ethernet/ibm/emac/core.c +1
-0set_bit (MAL_COMMAC_RX_STOPPED , &dev->commac.flags);@@ -2471,6 +2484,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)/* Disable any PHY features not supported by the platform */ dev->phy.def->features &= ~dev->phy_feat_exc; + dev->phy.features &= ~dev->phy_feat_exc;/* Setup initial link parameters */ drivers/net/ethernet/ibm/emac/core.c +0
-0if (dev->phy.features & SUPPORTED_Autoneg) {@@ -2568,6 +2582,10 @@ static int __devinit emac_init_config(struct
emac_instance*dev) if (of_device_is_compatible(np, "ibm,emac-405ex")||
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_init_config(struct emac_instance *dev)
Quoted 4 lines
drivers/net/ethernet/ibm/emac/core.c +2
-0of_device_is_compatible(np, "ibm,emac-405exr")) dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; +if (of_device_is_compatible (np,"ibm,emac-apm821xx" )) + dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE
|
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_init_config(struct emac_instance *dev) · line 2588
Quoted 2 lines
drivers/net/ethernet/ibm/emac/core.c +2
-0+EMAC_FTR_APM821XX_NO_HALF_DUPLEX | + EMAC_FTR_460EX_PHY_CLK_FIX);
Nitpick: Parentheses for multi line statement please.
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_probe(struct · line 2844
Quoted 13 lines
drivers/net/ethernet/ibm/emac/core.c +6
-0}else if (of_device_is_compatible (np,"ibm,emac4" )) { dev->features |=EMAC_FTR_EMAC4 ;if (of_device_is_compatible (np,"ibm,emac-440gx" ))@@ -2818,6 +2836,12 @@ static int __devinit emac_probe(struct platform_device *ofdev) dev->stop_timeout = STOP_TIMEOUT_100;INIT_DELAYED_WORK (&dev->link_work, emac_link_timer); +/* Some SoCs like APM821xx does not support Half Duplex mode. */ +if (emac_has_feature (dev,EMAC_FTR_APM821XX_NO_HALF_DUPLEX )) + dev->phy_feat_exc = (SUPPORTED_1000baseT_Half | + SUPPORTED_100baseT_Half | + SUPPORTED_10baseT_Half); +
Nitpick: Parentheses for multi line statement please.
Quoted 39 lines
drivers/net/ethernet/ibm/emac/core.c +0
-0/* Find PHY if any */ err =emac_init_phy (dev);if (err !=0 )(quoted diff) +0
-0
b/drivers/net/ethernet/ibm/emac/core.hindex fa3ec57..9dea85a 100644drivers/net/ethernet/ibm/emac/core.h +11
-2@@ -325,7 +325,14 @@ struct emac_instance {* Set if we need phy clock workaround for 460ex or 460gt */ #define EMAC_FTR_460EX_PHY_CLK_FIX 0x00000400 - +/* +* APM821xx requires Jumbo frame size set explicitly +*/ +#define EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE 0x00000800 +/* +* APM821xx does not support Half Duplex mode +*/ +#define EMAC_FTR_APM821XX_NO_HALF_DUPLEX 0x00001000/* Right now, we don't quite handle the always/possible masks on the * most optimal way as we don't have a way to say something like @@ -353,7 +360,9 @@ enum { EMAC_FTR_NO_FLOW_CONTROL_40x | #endifEMAC_FTR_460EX_PHY_CLK_FIX | - EMAC_FTR_440EP_PHY_CLK_FIX, +EMAC_FTR_440EP_PHY_CLK_FIX | +EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX, }; static inline int emac_has_feature(struct emac_instance *dev,(quoted diff) +0
-0
b/drivers/net/ethernet/ibm/emac/emac.hindex 1568278..36bcd69 100644
drivers/net/ethernet/ibm/emac/emac.h struct emac_regs { · line 218
Quoted 8 lines
drivers/net/ethernet/ibm/emac/emac.h +4
-1@@ -212,7 +212,10 @@ struct emac_regs {#define EMAC4_RMR_RFAF_64_1024 0x00000006#define EMAC4_RMR_RFAF_128_2048 0x00000007#define EMAC4_RMR_BASE EMAC4_RMR_RFAF_128_2048 - +#if defined(CONFIG_APM821xx) +#define EMAC4_RMR_MJS_MASK 0x0001fff8 +#define EMAC4_RMR_MJS (s) (((s) << 3) & EMAC4_RMR_MJS_MASK) +#endif
Is this "#if defined" really needed? If not, I suggest you drop it.
Thanks,
Stefan
Thanks, Stefan.
Please see my answer bellow.
Regards,
Duc Dang.
Quoted 80 lines · Stefan Roese
drivers/net/ethernet/ibm/emac/core.c static int emac_resize_rx_ring(struct
Quoted 44 lines · On Monday 05 March 2012 05:03:44 Duc Dang wrote:
This patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not
support half duplex mode.Add changes to support configuring jumbo frame for APM821XX EMAC.
Signed-off-by Duc Dang <[email protected]>---
v2:
Fix coding style problems.drivers/net/ethernet/ibm/emac/core.c | 26 +++++++++++++++++++++++++- drivers/net/ethernet/ibm/emac/core.h | 13 +++++++++++-- drivers/net/ethernet/ibm/emac/emac.h | 5 ++++- 3 files changed, 40 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/drivers/net/ethernet/ibm/emac/core.cindex 2abce96..ad671c5 100644drivers/net/ethernet/ibm/emac/core.c +6
-0@@ -434,6 +434,11 @@ static inline u32 emac_iff2rmr(struct net_device *ndev) else if (!netdev_mc_empty(ndev)) r |=EMAC_RMR_MAE ; +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) { + r &= ~EMAC4_RMR_MJS_MASK ; + r |=EMAC4_RMR_MJS (ndev->mtu); + } +return r; }@@ -965,6 +970,7 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) int rx_sync_size = emac_rx_sync_size(new_mtu);int rx_skb_size =emac_rx_skb_size (new_mtu);int i, ret =0 ; +int mr1_jumbo_bit_change =0 ;mutex_lock (&dev->link_lock);emac_netif_stop (dev);@@ -1013,7 +1019,14 @@ static int emac_resize_rx_ring(struct
emac_instancedrivers/net/ethernet/ibm/emac/core.c static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu)
Quoted 13 lines
drivers/net/ethernet/ibm/emac/core.c +8
-1*dev, int new_mtu) } skip:/* Check if we need to change "Jumbo" bit in MR1 */ -if ((new_mtu >ETH_DATA_LEN ) ^ (dev->ndev->mtu >ETH_DATA_LEN )) { +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) || + (dev->ndev->mtu >ETH_DATA_LEN ); +else + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) ^ + (dev->ndev->mtu >ETH_DATA_LEN ); + +if (mr1_jumbo_bit_change) {/* This is to prevent starting RX channel in
emac_rx_enable()
*/Quoted 15 lines
drivers/net/ethernet/ibm/emac/core.c +1
-0set_bit (MAL_COMMAC_RX_STOPPED , &dev->commac.flags);@@ -2471,6 +2484,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)/* Disable any PHY features not supported by the platform */ dev->phy.def->features &= ~dev->phy_feat_exc; + dev->phy.features &= ~dev->phy_feat_exc;/* Setup initial link parameters */ if (dev->phy.features & SUPPORTED_Autoneg) {drivers/net/ethernet/ibm/emac/core.c +0
-0@@ -2568,6 +2582,10 @@ static int __devinit emac_init_config(struct
emac_instance*dev) if (of_device_is_compatible(np, "ibm,emac-405ex")||of_device_is_compatible(np, "ibm,emac-405exr")) dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX;drivers/net/ethernet/ibm/emac/core.c
Quoted 2 lines
drivers/net/ethernet/ibm/emac/core.c +2
-0+if (of_device_is_compatible (np,"ibm,emac-apm821xx" )) + dev->features |=(
EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE
|
Quoted 5 lines
drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_init_config(struct emac_instance *dev) · line 2588
Quoted 2 lines
drivers/net/ethernet/ibm/emac/core.c +2
-0+EMAC_FTR_APM821XX_NO_HALF_DUPLEX | + EMAC_FTR_460EX_PHY_CLK_FIX);Nitpick: Parentheses for multi line statement please.
[Duc Dang] I wil add parentheses as you suggested.
Quoted 69 lines
} else if (of_device_is_compatible(np, "ibm,emac4")) {drivers/net/ethernet/ibm/emac/core.c static int __devinit emac_probe(struct · line 2844
Quoted 12 lines
dev->features |= EMAC_FTR_EMAC4; if (of_device_is_compatible(np, "ibm,emac-440gx"))drivers/net/ethernet/ibm/emac/core.c +6
-0@@ -2818,6 +2836,12 @@ static int __devinit emac_probe(struct platform_device *ofdev) dev->stop_timeout = STOP_TIMEOUT_100;INIT_DELAYED_WORK (&dev->link_work, emac_link_timer); +/* Some SoCs like APM821xx does not support Half Duplex mode. */ +if (emac_has_feature (dev,EMAC_FTR_APM821XX_NO_HALF_DUPLEX )) + dev->phy_feat_exc = (SUPPORTED_1000baseT_Half | + SUPPORTED_100baseT_Half | + SUPPORTED_10baseT_Half); +Nitpick: Parentheses for multi line statement please.
Quoted 39 lines
drivers/net/ethernet/ibm/emac/core.c +0
-0/* Find PHY if any */ err =emac_init_phy (dev);if (err !=0 )(quoted diff) +0
-0
b/drivers/net/ethernet/ibm/emac/core.hindex fa3ec57..9dea85a 100644drivers/net/ethernet/ibm/emac/core.h +11
-2@@ -325,7 +325,14 @@ struct emac_instance {* Set if we need phy clock workaround for 460ex or 460gt */ #define EMAC_FTR_460EX_PHY_CLK_FIX 0x00000400 - +/* +* APM821xx requires Jumbo frame size set explicitly +*/ +#define EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE 0x00000800 +/* +* APM821xx does not support Half Duplex mode +*/ +#define EMAC_FTR_APM821XX_NO_HALF_DUPLEX 0x00001000/* Right now, we don't quite handle the always/possible masks on the * most optimal way as we don't have a way to say something like @@ -353,7 +360,9 @@ enum { EMAC_FTR_NO_FLOW_CONTROL_40x | #endifEMAC_FTR_460EX_PHY_CLK_FIX | - EMAC_FTR_440EP_PHY_CLK_FIX, +EMAC_FTR_440EP_PHY_CLK_FIX | +EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX, }; static inline int emac_has_feature(struct emac_instance *dev,(quoted diff) +0
-0
b/drivers/net/ethernet/ibm/emac/emac.hindex 1568278..36bcd69 100644drivers/net/ethernet/ibm/emac/emac.h struct emac_regs { · line 217
Quoted 7 lines
drivers/net/ethernet/ibm/emac/emac.h +3
-1@@ -212,7 +212,10 @@ struct emac_regs {#define EMAC4_RMR_RFAF_64_1024 0x00000006#define EMAC4_RMR_RFAF_128_2048 0x00000007#define EMAC4_RMR_BASE EMAC4_RMR_RFAF_128_2048 - +#if defined(CONFIG_APM821xx) +#define EMAC4_RMR_MJS_MASK 0x0001fff8 +#define EMAC4_RMR_MJS (s) (((s) << 3) &
EMAC4_RMR_MJS_MASK)drivers/net/ethernet/ibm/emac/emac.h struct emac_regs { · line 218
Quoted 1 line
drivers/net/ethernet/ibm/emac/emac.h +1
-0+#endif Is this "#if defined" really needed? If not, I suggest you drop it.
Quoted 9 lines
[Duc Dang] Only APM821XX and later SoCs have this register field, but it is no harm to drop the #if defined as 460EX/460GT/405EX have this register field as reserved. So I will drop it.
Thanks,
Stefan
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
PATCH v3 1/2 powerpc/44x: Add new compatible value for EMAC node of APM821XX dts file.
In reply to Duc DangThis compatible value will be used to distinguish some special features of APM821XX EMAC: no half duplex mode support, configuring jumbo frame.
---
v3:
No change since v1/v2 patch sets. Added for completeness.
arch/powerpc/boot/dts/bluestone.dts | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/boot/dts/bluestone.dts +1 -1
@@ -222,7 +222,7 @@ EMAC0: ethernet@ef600c00 { device_type = "network"; - compatible = "ibm,emac4sync"; + compatible = "ibm,emac-apm821xx", "ibm,emac4sync"; interrupt-parent = <&EMAC0>; interrupts = <0x0 0x1>; #interrupt-cells = <1>;
Signature · 1 line
1.7.5.4
Re: [PATCH v3 1/2] powerpc/44x: Add new compatible value for EMAC node of APM821XX dts file.
From: Duc Dang <[email protected]>
Date: Mon, 5 Mar 2012 17:57:42 +0700
Quoted 3 lines
This compatible value will be used to distinguish some special features of APM821XX EMAC: no half duplex mode support, configuring jumbo frame.
Signed-off-by Duc Dang <[email protected]>
Applied.
Re: [PATCH v3 1/2] powerpc/44x: Add new compatible value for EMAC node of APM821XX dts file.
Quoted 8 lines · David Miller
From: Duc Dang <[email protected]>
Date: Mon, 5 Mar 2012 17:57:42 +0700Quoted 3 lines
This compatible value will be used to distinguish some special features of APM821XX EMAC: no half duplex mode support, configuring jumbo frame.
Signed-off-by Duc Dang <[email protected]>Applied.
So I guess we're taking these through your tree? I guess that works out well enough since the other patches I was going to send to Ben aren't panning out anyway.
josh
PATCH v3 2/2 powerpc/44x: Add more changes for APM821XX EMAC driver
In reply to Duc DangThis patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not support half duplex mode.
Add changes to support configuring jumbo frame for APM821XX EMAC.
---
v3:
Add parentheses for multi-line statements.
Drop #if defined(CONFIG_APM821xx) in emac.h.
drivers/net/ethernet/ibm/emac/core.c | 29 ++++++++++++++++++++++++++++- drivers/net/ethernet/ibm/emac/core.h | 13 +++++++++++-- drivers/net/ethernet/ibm/emac/emac.h | 2 ++ 3 files changed, 41 insertions(+), 3 deletions(-)
drivers/net/ethernet/ibm/emac/core.c +28 -1
@@ -434,6 +434,11 @@ static inline u32 emac_iff2rmr(struct net_device *ndev)else if (!netdev_mc_empty (ndev)) r |=EMAC_RMR_MAE ; +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) { + r &= ~EMAC4_RMR_MJS_MASK ; + r |=EMAC4_RMR_MJS (ndev->mtu); + } +return r; }
@@ -965,6 +970,7 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu)int rx_sync_size =emac_rx_sync_size (new_mtu);int rx_skb_size =emac_rx_skb_size (new_mtu);int i, ret =0 ; +int mr1_jumbo_bit_change =0 ;mutex_lock (&dev->link_lock);emac_netif_stop (dev);
@@ -1013,7 +1019,15 @@ static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) } skip:/* Check if we need to change "Jumbo" bit in MR1 */ -if ((new_mtu >ETH_DATA_LEN ) ^ (dev->ndev->mtu >ETH_DATA_LEN )) { +if (emac_has_feature (dev,EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE )) { + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) || + (dev->ndev->mtu >ETH_DATA_LEN ); + }else { + mr1_jumbo_bit_change = (new_mtu >ETH_DATA_LEN ) ^ + (dev->ndev->mtu >ETH_DATA_LEN ); + } + +if (mr1_jumbo_bit_change) {/* This is to prevent starting RX channel in emac_rx_enable() */ set_bit (MAL_COMMAC_RX_STOPPED , &dev->commac.flags);
@@ -2471,6 +2485,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)/* Disable any PHY features not supported by the platform */ dev->phy.def->features &= ~dev->phy_feat_exc; + dev->phy.features &= ~dev->phy_feat_exc;/* Setup initial link parameters */ if (dev->phy.features & SUPPORTED_Autoneg) {
@@ -2568,6 +2583,11 @@ static int __devinit emac_init_config(struct emac_instance *dev)if (of_device_is_compatible (np,"ibm,emac-405ex" ) ||of_device_is_compatible (np,"ibm,emac-405exr" )) dev->features |=EMAC_FTR_440EP_PHY_CLK_FIX ; +if (of_device_is_compatible (np,"ibm,emac-apm821xx" )) { + dev->features |= (EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | +EMAC_FTR_APM821XX_NO_HALF_DUPLEX | +EMAC_FTR_460EX_PHY_CLK_FIX ); + } }else if (of_device_is_compatible (np,"ibm,emac4" )) { dev->features |=EMAC_FTR_EMAC4 ;if (of_device_is_compatible (np,"ibm,emac-440gx" ))
@@ -2818,6 +2838,13 @@ static int __devinit emac_probe(struct platform_device *ofdev) dev->stop_timeout =STOP_TIMEOUT_100 ;INIT_DELAYED_WORK (&dev->link_work, emac_link_timer); +/* Some SoCs like APM821xx does not support Half Duplex mode. */ +if (emac_has_feature (dev,EMAC_FTR_APM821XX_NO_HALF_DUPLEX )) { + dev->phy_feat_exc = (SUPPORTED_1000baseT_Half | + SUPPORTED_100baseT_Half | + SUPPORTED_10baseT_Half); + } +/* Find PHY if any */ err =emac_init_phy (dev);if (err !=0 )
drivers/net/ethernet/ibm/emac/core.h +11 -2
@@ -325,7 +325,14 @@ struct emac_instance {* Set if we need phy clock workaround for 460ex or 460gt */ #define EMAC_FTR_460EX_PHY_CLK_FIX 0x00000400 - +/* +* APM821xx requires Jumbo frame size set explicitly +*/ +#define EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE 0x00000800 +/* +* APM821xx does not support Half Duplex mode +*/ +#define EMAC_FTR_APM821XX_NO_HALF_DUPLEX 0x00001000/* Right now, we don't quite handle the always/possible masks on the * most optimal way as we don't have a way to say something like
@@ -353,7 +360,9 @@ enum { EMAC_FTR_NO_FLOW_CONTROL_40x | #endifEMAC_FTR_460EX_PHY_CLK_FIX | - EMAC_FTR_440EP_PHY_CLK_FIX, +EMAC_FTR_440EP_PHY_CLK_FIX | +EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE | + EMAC_FTR_APM821XX_NO_HALF_DUPLEX, }; static inline int emac_has_feature(struct emac_instance *dev,
drivers/net/ethernet/ibm/emac/emac.h +2 -0
@@ -212,6 +212,8 @@ struct emac_regs {#define EMAC4_RMR_RFAF_64_1024 0x00000006#define EMAC4_RMR_RFAF_128_2048 0x00000007#define EMAC4_RMR_BASE EMAC4_RMR_RFAF_128_2048 +#define EMAC4_RMR_MJS_MASK 0x0001fff8 +#define EMAC4_RMR_MJS (s) (((s) << 3) & EMAC4_RMR_MJS_MASK)/* EMACx_ISR & EMACx_ISER */ #define EMAC4_ISR_TXPE 0x20000000
Signature · 1 line
1.7.5.4
David Miller
maintainerFrom: Duc Dang <[email protected]>
Date: Mon, 5 Mar 2012 17:58:22 +0700
Quoted 9 lines
This patch includes:
Configure EMAC PHY clock source (clock from PHY or internal clock).
Do not advertise PHY half duplex capability as APM821XX EMAC does not support half duplex mode.
Add changes to support configuring jumbo frame for APM821XX EMAC.
Signed-off-by Duc Dang <[email protected]>
Applied with coding style fixes.