net: fec: Add possibility to enable TXC delay
Subsystems (2)
PATCH 1/2 net: fec: Add possibility to enable TXC delay
This patch enables the possibility to set FEC_ENET_ENABLE_TXC_DELAY or FEC_ENET_ENABLE_RXC_DELAY so one can via a define enable the RXC or TXC delay in the MAC.
---
drivers/net/fec_mxc.c | 10 ++++++++++ drivers/net/fec_mxc.h | 2 ++ 2 files changed, 12 insertions(+)
drivers/net/fec_mxc.c +10 -0
@@ -503,6 +503,16 @@ static int fec_open(struct eth_device *edev)writel (readl (&fec->eth->ecntrl) |FEC_ECNTRL_ETHER_EN , &fec->eth->ecntrl); +#ifdef FEC_ENET_ENABLE_TXC_DELAY +writel (readl (&fec->eth->ecntrl) |FEC_ECNTRL_TXC_DLY , + &fec->eth->ecntrl); +#endif + +#ifdef FEC_ENET_ENABLE_RXC_DELAY +writel (readl (&fec->eth->ecntrl) |FEC_ECNTRL_RXC_DLY , + &fec->eth->ecntrl); +#endif +#if defined(CONFIG_MX25 ) || defined(CONFIG_MX53 ) || defined(CONFIG_MX6SL )udelay (100 );
drivers/net/fec_mxc.h +2 -0
@@ -188,6 +188,8 @@ struct ethernet_regs {#define FEC_ECNTRL_ETHER_EN 0x00000002/* enable the FEC */ #define FEC_ECNTRL_SPEED 0x00000020#define FEC_ECNTRL_DBSWAP 0x00000100 +#define FEC_ECNTRL_TXC_DLY 0x00010000/* TXC delayed */ +#define FEC_ECNTRL_RXC_DLY 0x00020000/* RXC delayed */ #define FEC_X_WMRK_STRFWD 0x00000100
Signature · 1 line
2.25.1
PATCH 2/2 config: apalis-imx8: Enable FEC TXC delay
define FEC_ENET_ENABLE_TXC_DELAY to enable the delay on TXC line on the MAC.
---
include/configs/apalis-imx8.h | 1 + 1 file changed, 1 insertion(+)
include/configs/apalis-imx8.h +1 -0
@@ -24,6 +24,7 @@/* Networking */ #define FEC_QUIRK_ENET_MAC +#define FEC_ENET_ENABLE_TXC_DELAY #define CONFIG_TFTP_TSIZE
Signature · 1 line
2.25.1
PATCH 2/2 config: apalis-imx8: Enable FEC TXC delay
Quoted 3 lines · Philippe Schenker
define
FEC_ENET_ENABLE_TXC_DELAYto enable the delay on TXC line on the MAC.
The description doesn't explain why we enable this delay. Could you add an explanation, please?
With that:
Quoted 23 lines
Signed-off-by Philippe Schenker <[email protected]>---
include/configs/apalis-imx8.h | 1 + 1 file changed, 1 insertion(+)include/configs/apalis-imx8.h +1
-1@@ -24,6 +24,7 @@/* Networking */ #define FEC_QUIRK_ENET_MAC +#define FEC_ENET_ENABLE_TXC_DELAY #define CONFIG_TFTP_TSIZE --2.25.1
Signature · 4 lines
Best regards Oleksandr Suvorov cryosay at gmail.com
PATCH 1/2 net: fec: Add possibility to enable TXC delay
In reply to Philippe SchenkerQuoted 6 lines · Philippe Schenker
This patch enables the possibility to set
FEC_ENET_ENABLE_TXC_DELAYorFEC_ENET_ENABLE_RXC_DELAYso one can via a define enable the RXC or TXC delay in the MAC.Signed-off-by Philippe Schenker <[email protected]>
Quoted 43 lines
---
drivers/net/fec_mxc.c | 10 ++++++++++ drivers/net/fec_mxc.h | 2 ++ 2 files changed, 12 insertions(+)drivers/net/fec_mxc.c +10
-0@@ -503,6 +503,16 @@ static int fec_open(struct eth_device *edev)writel (readl (&fec->eth->ecntrl) |FEC_ECNTRL_ETHER_EN , &fec->eth->ecntrl); +#ifdef FEC_ENET_ENABLE_TXC_DELAY +writel (readl (&fec->eth->ecntrl) |FEC_ECNTRL_TXC_DLY , + &fec->eth->ecntrl); +#endif + +#ifdef FEC_ENET_ENABLE_RXC_DELAY +writel (readl (&fec->eth->ecntrl) |FEC_ECNTRL_RXC_DLY , + &fec->eth->ecntrl); +#endif +#if defined(CONFIG_MX25 ) || defined(CONFIG_MX53 ) || defined(CONFIG_MX6SL )udelay (100 );drivers/net/fec_mxc.h +2
-1@@ -188,6 +188,8 @@ struct ethernet_regs {#define FEC_ECNTRL_ETHER_EN 0x00000002/* enable the FEC */ #define FEC_ECNTRL_SPEED 0x00000020#define FEC_ECNTRL_DBSWAP 0x00000100 +#define FEC_ECNTRL_TXC_DLY 0x00010000/* TXC delayed */ +#define FEC_ECNTRL_RXC_DLY 0x00020000/* RXC delayed */ #define FEC_X_WMRK_STRFWD 0x00000100 --2.25.1
Signature · 4 lines
Best regards Oleksandr Suvorov cryosay at gmail.com