From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini 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 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); - 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 111111111111..222222222222 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -851,7 +851,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)) @@ -881,8 +881,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