uefi-arm64-6.19: rework net-stmmicro-stmmac Phytium driver + ACPI glue patches for 6.19

- adapting to
  - 26ab9830be
  - efd3c8cc52
  - 85081acc6b
This commit is contained in:
Ricardo Pardini 2025-12-29 15:29:09 +01:00 committed by Werner
parent 91feaacaaa
commit db850a319c
4 changed files with 109 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Mon, 29 Dec 2025 14:35:40 +0100
Subject: net: stmicro: stmmac: Phytium: adapt to "net: stmmac: remove axi_blen
array"
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 111111111111..222222222222 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -724,7 +724,10 @@ static struct stmmac_axi * stmmac_axi_setup_acpi(struct platform_device *pdev)
axi->axi_wr_osr_lmt = 1;
if (fwnode_property_read_u32(np, "snps,rd_osr_lmt", &axi->axi_rd_osr_lmt))
axi->axi_rd_osr_lmt = 1;
- fwnode_property_read_u32_array(np, "snps,blen", axi->axi_blen, AXI_BLEN);
+
+ u32 axi_blen[AXI_BLEN]; // adapt to "net: stmmac: remove axi_blen array"
+ fwnode_property_read_u32_array(np, "snps,blen", axi_blen, AXI_BLEN);
+ stmmac_axi_blen_to_mask(&axi->axi_blen_regval, axi_blen, AXI_BLEN);
return axi;
}
--
Armbian

View File

@ -0,0 +1,50 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Mon, 29 Dec 2025 15:20:32 +0100
Subject: net: stmicro: stmmac: Phytium: adapt to "net: stmmac: replace
has_xxxx with core_type"
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c | 4 ++--
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
index 111111111111..222222222222 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
@@ -55,7 +55,7 @@ dwmac_phytium_parse_config_acpi(struct platform_device *pdev, const char *mac)
np = dev_fwnode(dev);
plat->phy_interface = fwnode_get_phy_mode(np);
-
+
/* Get max speed of operation from properties */
if (fwnode_property_read_u32(np, "max-speed", &plat->max_speed))
@@ -96,7 +96,7 @@ dwmac_phytium_parse_config_acpi(struct platform_device *pdev, const char *mac)
plat->unicast_filter_entries = 1;
fwnode_property_read_u32(np, "max-frame-size", &plat->maxmtu);
- plat->has_gmac = 1;
+ plat->core_type = DWMAC_CORE_GMAC; // adapt to "net: stmmac: replace has_xxxx with core_type"
plat->pmt = 1;
dma_cfg = devm_kzalloc(dev, sizeof(*dma_cfg), GFP_KERNEL);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 111111111111..222222222222 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -903,7 +903,7 @@ stmmac_probe_config_acpi(struct platform_device *pdev, u8 *mac)
&pdev->dev, plat->unicast_filter_entries);
plat->multicast_filter_bins = dwmac1000_validate_mcast_bins(
&pdev->dev, plat->multicast_filter_bins);
- plat->has_gmac = 1;
+ plat->core_type = DWMAC_CORE_GMAC; // adapt to "net: stmmac: replace has_xxxx with core_type"
plat->pmt = 1;
dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), GFP_KERNEL);
--
Armbian

View File

@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Mon, 29 Dec 2025 15:41:31 +0100
Subject: net: stmicro: stmmac: Phytium: adapt to "net: stmmac: pass struct
device to init()/exit() methods"
- ref https://github.com/torvalds/linux/commit/85081acc6b1188f2a6e5e605dc644225fcdf327f
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
index 111111111111..222222222222 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
@@ -195,7 +195,7 @@ static int dwmac_phytium_probe(struct platform_device *pdev)
err_exit:
if (plat_dat->exit)
- plat_dat->exit(pdev, plat_dat->bsp_priv);
+ plat_dat->exit(&pdev->dev, plat_dat->bsp_priv);
return ret;
}
--
Armbian