Skip to content

Commit 57d42ed

Browse files
committed
uefi-arm64-6.19: rework net-stmmicro-stmmac Phytium driver + ACPI glue patches for 6.19
- adapting to - torvalds/linux@26ab983 - torvalds/linux@efd3c8c - torvalds/linux@85081ac
1 parent 6e94908 commit 57d42ed

4 files changed

+109
-0
lines changed

patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch renamed to patch/kernel/archive/uefi-arm64-6.19/1000-net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch

File renamed without changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ricardo Pardini <ricardo@pardini.net>
3+
Date: Mon, 29 Dec 2025 14:35:40 +0100
4+
Subject: net: stmicro: stmmac: Phytium: adapt to "net: stmmac: remove axi_blen
5+
array"
6+
7+
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
8+
---
9+
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++++-
10+
1 file changed, 4 insertions(+), 1 deletion(-)
11+
12+
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
13+
index 111111111111..222222222222 100644
14+
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
15+
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
16+
@@ -724,7 +724,10 @@ static struct stmmac_axi * stmmac_axi_setup_acpi(struct platform_device *pdev)
17+
axi->axi_wr_osr_lmt = 1;
18+
if (fwnode_property_read_u32(np, "snps,rd_osr_lmt", &axi->axi_rd_osr_lmt))
19+
axi->axi_rd_osr_lmt = 1;
20+
- fwnode_property_read_u32_array(np, "snps,blen", axi->axi_blen, AXI_BLEN);
21+
+
22+
+ u32 axi_blen[AXI_BLEN]; // adapt to "net: stmmac: remove axi_blen array"
23+
+ fwnode_property_read_u32_array(np, "snps,blen", axi_blen, AXI_BLEN);
24+
+ stmmac_axi_blen_to_mask(&axi->axi_blen_regval, axi_blen, AXI_BLEN);
25+
26+
return axi;
27+
}
28+
--
29+
Armbian
30+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ricardo Pardini <ricardo@pardini.net>
3+
Date: Mon, 29 Dec 2025 15:20:32 +0100
4+
Subject: net: stmicro: stmmac: Phytium: adapt to "net: stmmac: replace
5+
has_xxxx with core_type"
6+
7+
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
8+
---
9+
drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c | 4 ++--
10+
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
11+
2 files changed, 3 insertions(+), 3 deletions(-)
12+
13+
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
14+
index 111111111111..222222222222 100644
15+
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
16+
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
17+
@@ -55,7 +55,7 @@ dwmac_phytium_parse_config_acpi(struct platform_device *pdev, const char *mac)
18+
np = dev_fwnode(dev);
19+
20+
plat->phy_interface = fwnode_get_phy_mode(np);
21+
-
22+
+
23+
24+
/* Get max speed of operation from properties */
25+
if (fwnode_property_read_u32(np, "max-speed", &plat->max_speed))
26+
@@ -96,7 +96,7 @@ dwmac_phytium_parse_config_acpi(struct platform_device *pdev, const char *mac)
27+
plat->unicast_filter_entries = 1;
28+
29+
fwnode_property_read_u32(np, "max-frame-size", &plat->maxmtu);
30+
- plat->has_gmac = 1;
31+
+ plat->core_type = DWMAC_CORE_GMAC; // adapt to "net: stmmac: replace has_xxxx with core_type"
32+
plat->pmt = 1;
33+
34+
dma_cfg = devm_kzalloc(dev, sizeof(*dma_cfg), GFP_KERNEL);
35+
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
36+
index 111111111111..222222222222 100644
37+
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
38+
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
39+
@@ -903,7 +903,7 @@ stmmac_probe_config_acpi(struct platform_device *pdev, u8 *mac)
40+
&pdev->dev, plat->unicast_filter_entries);
41+
plat->multicast_filter_bins = dwmac1000_validate_mcast_bins(
42+
&pdev->dev, plat->multicast_filter_bins);
43+
- plat->has_gmac = 1;
44+
+ plat->core_type = DWMAC_CORE_GMAC; // adapt to "net: stmmac: replace has_xxxx with core_type"
45+
plat->pmt = 1;
46+
47+
dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), GFP_KERNEL);
48+
--
49+
Armbian
50+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ricardo Pardini <ricardo@pardini.net>
3+
Date: Mon, 29 Dec 2025 15:41:31 +0100
4+
Subject: net: stmicro: stmmac: Phytium: adapt to "net: stmmac: pass struct
5+
device to init()/exit() methods"
6+
7+
- ref https://github.com/torvalds/linux/commit/85081acc6b1188f2a6e5e605dc644225fcdf327f
8+
9+
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
10+
---
11+
drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c | 2 +-
12+
1 file changed, 1 insertion(+), 1 deletion(-)
13+
14+
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
15+
index 111111111111..222222222222 100644
16+
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
17+
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
18+
@@ -195,7 +195,7 @@ static int dwmac_phytium_probe(struct platform_device *pdev)
19+
20+
err_exit:
21+
if (plat_dat->exit)
22+
- plat_dat->exit(pdev, plat_dat->bsp_priv);
23+
+ plat_dat->exit(&pdev->dev, plat_dat->bsp_priv);
24+
25+
return ret;
26+
}
27+
--
28+
Armbian
29+

0 commit comments

Comments
 (0)