Commit 743dd1db authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Jakub Kicinski

net: stmmac: replace the rx_clk_runs_in_lpi field with a flag

Drop the boolean field of the plat_stmmacenet_data structure in favor of a
simple bitfield flag.
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20230710090001.303225-12-brgl@bgdev.plReviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 621ba7ad
...@@ -786,7 +786,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ...@@ -786,7 +786,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
if (of_property_read_bool(np, "snps,tso")) if (of_property_read_bool(np, "snps,tso"))
plat_dat->flags |= STMMAC_FLAG_TSO_EN; plat_dat->flags |= STMMAC_FLAG_TSO_EN;
if (of_device_is_compatible(np, "qcom,qcs404-ethqos")) if (of_device_is_compatible(np, "qcom,qcs404-ethqos"))
plat_dat->rx_clk_runs_in_lpi = 1; plat_dat->flags |= STMMAC_FLAG_RX_CLK_RUNS_IN_LPI;
if (data->has_integrated_pcs) if (data->has_integrated_pcs)
plat_dat->flags |= STMMAC_FLAG_HAS_INTEGRATED_PCS; plat_dat->flags |= STMMAC_FLAG_HAS_INTEGRATED_PCS;
......
...@@ -1085,7 +1085,8 @@ static void stmmac_mac_link_up(struct phylink_config *config, ...@@ -1085,7 +1085,8 @@ static void stmmac_mac_link_up(struct phylink_config *config,
stmmac_mac_set(priv, priv->ioaddr, true); stmmac_mac_set(priv, priv->ioaddr, true);
if (phy && priv->dma_cap.eee) { if (phy && priv->dma_cap.eee) {
priv->eee_active = priv->eee_active =
phy_init_eee(phy, !priv->plat->rx_clk_runs_in_lpi) >= 0; phy_init_eee(phy, !(priv->plat->flags &
STMMAC_FLAG_RX_CLK_RUNS_IN_LPI)) >= 0;
priv->eee_enabled = stmmac_eee_init(priv); priv->eee_enabled = stmmac_eee_init(priv);
priv->tx_lpi_enabled = priv->eee_enabled; priv->tx_lpi_enabled = priv->eee_enabled;
stmmac_set_eee_pls(priv, priv->hw, true); stmmac_set_eee_pls(priv, priv->hw, true);
......
...@@ -214,6 +214,7 @@ struct dwmac4_addrs { ...@@ -214,6 +214,7 @@ struct dwmac4_addrs {
#define STMMAC_FLAG_MULTI_MSI_EN BIT(7) #define STMMAC_FLAG_MULTI_MSI_EN BIT(7)
#define STMMAC_FLAG_EXT_SNAPSHOT_EN BIT(8) #define STMMAC_FLAG_EXT_SNAPSHOT_EN BIT(8)
#define STMMAC_FLAG_INT_SNAPSHOT_EN BIT(9) #define STMMAC_FLAG_INT_SNAPSHOT_EN BIT(9)
#define STMMAC_FLAG_RX_CLK_RUNS_IN_LPI BIT(10)
struct plat_stmmacenet_data { struct plat_stmmacenet_data {
int bus_id; int bus_id;
...@@ -280,7 +281,6 @@ struct plat_stmmacenet_data { ...@@ -280,7 +281,6 @@ struct plat_stmmacenet_data {
int rss_en; int rss_en;
int mac_port_sel_speed; int mac_port_sel_speed;
bool en_tx_lpi_clockgating; bool en_tx_lpi_clockgating;
bool rx_clk_runs_in_lpi;
int has_xgmac; int has_xgmac;
u8 vlan_fail_q; u8 vlan_fail_q;
unsigned int eee_usecs_rate; unsigned int eee_usecs_rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment