[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210331161825.32100-1-vee.khee.wong@linux.intel.com>
Date: Thu, 1 Apr 2021 00:18:25 +0800
From: Wong Vee Khee <vee.khee.wong@...ux.intel.com>
To: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...com>,
Jose Abreu <joabreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc: netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Voon Wei Feng <weifeng.voon@...el.com>,
Ong Boon Leong <boon.leong.ong@...el.com>,
Wong Vee Khee <vee.khee.wong@...el.com>
Subject: [PATCH net-next 1/1] net: stmmac: enable MTL ECC Error Address Status Over-ride by default
From: Voon Weifeng <weifeng.voon@...el.com>
Turn on the MEEAO field of MTL_ECC_Control_Register by default.
As the MTL ECC Error Address Status Over-ride(MEEAO) is set by default,
the following error address fields will hold the last valid address
where the error is detected.
Signed-off-by: Voon Weifeng <weifeng.voon@...el.com>
Signed-off-by: Tan Tee Min <tee.min.tan@...el.com>
Co-developed-by: Wong Vee Khee <vee.khee.wong@...ux.intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@...ux.intel.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 1 +
drivers/net/ethernet/stmicro/stmmac/dwmac5.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c
index 5b010ebfede9..d8c6ff725237 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c
@@ -192,6 +192,7 @@ int dwmac5_safety_feat_config(void __iomem *ioaddr, unsigned int asp)
/* 1. Enable Safety Features */
value = readl(ioaddr + MTL_ECC_CONTROL);
+ value |= MEEAO; /* MTL ECC Error Addr Status Override */
value |= TSOEE; /* TSO ECC */
value |= MRXPEE; /* MTL RX Parser ECC */
value |= MESTEE; /* MTL EST ECC */
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac5.h b/drivers/net/ethernet/stmicro/stmmac/dwmac5.h
index ff555d8b0cdf..6b2fd37b29ad 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac5.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac5.h
@@ -98,6 +98,7 @@
#define ADDR GENMASK(15, 0)
#define MTL_RXP_IACC_DATA 0x00000cb4
#define MTL_ECC_CONTROL 0x00000cc0
+#define MEEAO BIT(8)
#define TSOEE BIT(4)
#define MRXPEE BIT(3)
#define MESTEE BIT(2)
--
2.25.1
Powered by blists - more mailing lists