Files
build/patch/kernel/archive/uefi-arm64-6.6/fix-stmmac-acpi-glue-for-Feiteng-on-6.6.y.patch
Ricardo Pardini b89858d4d2 uefi edge 6.6: bump to 6.6-rc6; rebase patches
- also bump `qemu-uboot` variant's uboot from 23.10-rc4 to final 23.10
2023-10-21 13:59:32 +02:00

64 lines
2.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Mon, 2 Oct 2023 17:49:13 +0200
Subject: fix stmmac acpi glue for Feiteng on 6.6.y
---
drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c | 7 ++++---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
index e6ad44b80a10..733f5ea20d0c 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);
- plat->interface = plat->phy_interface;
+ plat->mac_interface = plat->phy_interface;
/* Get max speed of operation from properties */
if (fwnode_property_read_u32(np, "max-speed", &plat->max_speed))
@@ -80,8 +80,9 @@ dwmac_phytium_parse_config_acpi(struct platform_device *pdev, const char *mac)
plat->force_sf_dma_mode =
fwnode_property_read_bool(np, "snps,force_sf_dma_mode");
- plat->en_tx_lpi_clockgating =
- fwnode_property_read_bool(np, "snps,en-tx-lpi-clockgating");
+
+ if (fwnode_property_read_bool(np, "snps,en-tx-lpi-clockgating"))
+ plat->flags |= STMMAC_FLAG_EN_TX_LPI_CLOCKGATING;
/* Set the maxmtu to a default of JUMBO_LEN in case the
* parameter is not present.
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 24e9b1a818c5..f93078ebcdad 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -848,7 +848,7 @@ stmmac_probe_config_acpi(struct platform_device *pdev, u8 *mac)
np = dev_fwnode(&(pdev->dev));
- plat->interface = fw_get_phy_mode(np);
+ plat->mac_interface = fw_get_phy_mode(np);
/* Get max speed of operation from device tree */
if (fwnode_property_read_u32(np, "max-speed", &plat->max_speed))
@@ -878,8 +878,9 @@ stmmac_probe_config_acpi(struct platform_device *pdev, u8 *mac)
plat->force_sf_dma_mode =
fwnode_property_read_bool(np, "snps,force_sf_dma_mode");
- plat->en_tx_lpi_clockgating =
- fwnode_property_read_bool(np, "snps,en-tx-lpi-clockgating");
+
+ if (fwnode_property_read_bool(np, "snps,en-tx-lpi-clockgating"))
+ plat->flags |= STMMAC_FLAG_EN_TX_LPI_CLOCKGATING;
/* Set the maxmtu to a default of JUMBO_LEN in case the
* parameter is not present.
--
Armbian