]> www.infradead.org Git - users/hch/misc.git/commitdiff
net: stmmac: deprecate "snps,en-tx-lpi-clockgating" property
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 12 Mar 2025 09:34:56 +0000 (09:34 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 19 Mar 2025 17:06:33 +0000 (18:06 +0100)
Whether the MII transmit clock can be stopped is primarily a property
of the PHY (there is a capability bit that should be checked first.)
Whether the MAC is capable of stopping the transmit clock is a separate
issue, but this is already handled by the core DesignWare MAC code.

Therefore, snps,en-tx-lpi-clockgating is technically incorrect, and
this commit adds a warning should a DT be encountered with the property
present.

However, we keep backwards compatibility.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/E1tsIUK-005vGk-H7@rmk-PC.armlinux.org.uk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

index 8dc3bd6946c671dc607e9610dc97f7a3aa18b2ae..c73eff6a56b87a3783c91b2ffbf5807a27df303f 100644 (file)
@@ -497,8 +497,11 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
        plat->force_sf_dma_mode =
                of_property_read_bool(np, "snps,force_sf_dma_mode");
 
-       if (of_property_read_bool(np, "snps,en-tx-lpi-clockgating"))
+       if (of_property_read_bool(np, "snps,en-tx-lpi-clockgating")) {
+               dev_warn(&pdev->dev,
+                        "OF property snps,en-tx-lpi-clockgating is deprecated, please convert driver to use STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP\n");
                plat->flags |= STMMAC_FLAG_EN_TX_LPI_CLOCKGATING;
+       }
 
        /* Set the maxmtu to a default of JUMBO_LEN in case the
         * parameter is not present in the device tree.