kernel: backport Mediatek SoC EEE support

Backport Mediatek SoC EEE support from net-next upstream.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[refreshed patches]
This commit is contained in:
Qingfang Deng
2025-03-05 23:23:09 +08:00
committed by Daniel Golle
parent fad94e8cda
commit d8315d5358
12 changed files with 188 additions and 52 deletions

View File

@@ -37,7 +37,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
.glo_cfg = 0x4604,
.rst_idx = 0x4608,
.delay_irq = 0x460c,
@@ -3885,6 +3888,56 @@ static void mtk_set_mcr_max_rx(struct mt
@@ -3898,6 +3901,56 @@ static void mtk_set_mcr_max_rx(struct mt
mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
}
@@ -94,7 +94,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
static void mtk_hw_reset(struct mtk_eth *eth)
{
u32 val;
@@ -4344,6 +4397,8 @@ static void mtk_pending_work(struct work
@@ -4357,6 +4410,8 @@ static void mtk_pending_work(struct work
rtnl_lock();
set_bit(MTK_RESETTING, &eth->state);
@@ -105,7 +105,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
/* Run again reset preliminary configuration in order to avoid any
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -1172,6 +1172,7 @@ struct mtk_reg_map {
@@ -1183,6 +1183,7 @@ struct mtk_reg_map {
u32 rx_ptr; /* rx base pointer */
u32 rx_cnt_cfg; /* rx max count configuration */
u32 qcrx_ptr; /* rx cpu pointer */