diff options
author | 2023-07-13 20:57:55 -0700 | |
---|---|---|
committer | 2023-07-13 20:57:55 -0700 | |
commit | def3833fc6022c7f23bd4fd66ba5ed65c6b23272 (patch) | |
tree | ecbf9e8e1c2fc84a90f8e6b3b3f4e632f1255d94 /include | |
parent | nfp: prevent dropped counter increment during probe (diff) | |
parent | net: stmmac: replace the en_tx_lpi_clockgating field with a flag (diff) | |
download | wireguard-linux-def3833fc6022c7f23bd4fd66ba5ed65c6b23272.tar.xz wireguard-linux-def3833fc6022c7f23bd4fd66ba5ed65c6b23272.zip |
Merge branch 'net-stmmac-replace-boolean-fields-in-plat_stmmacenet_data-with-flags'
Bartosz Golaszewski says:
====================
net: stmmac: replace boolean fields in plat_stmmacenet_data with flags
As suggested by Jose Abreu: let's drop all 12 boolean fields in
plat_stmmacenet_data and replace them with a common bitfield.
====================
Link: https://lore.kernel.org/r/20230710090001.303225-1-brgl@bgdev.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/stmmac.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 06090538fe2d..ef67dba775d0 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -204,6 +204,19 @@ struct dwmac4_addrs { u32 mtl_low_cred_offset; }; +#define STMMAC_FLAG_HAS_INTEGRATED_PCS BIT(0) +#define STMMAC_FLAG_SPH_DISABLE BIT(1) +#define STMMAC_FLAG_USE_PHY_WOL BIT(2) +#define STMMAC_FLAG_HAS_SUN8I BIT(3) +#define STMMAC_FLAG_TSO_EN BIT(4) +#define STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP BIT(5) +#define STMMAC_FLAG_VLAN_FAIL_Q_EN BIT(6) +#define STMMAC_FLAG_MULTI_MSI_EN BIT(7) +#define STMMAC_FLAG_EXT_SNAPSHOT_EN BIT(8) +#define STMMAC_FLAG_INT_SNAPSHOT_EN BIT(9) +#define STMMAC_FLAG_RX_CLK_RUNS_IN_LPI BIT(10) +#define STMMAC_FLAG_EN_TX_LPI_CLOCKGATING BIT(11) + struct plat_stmmacenet_data { int bus_id; int phy_addr; @@ -266,22 +279,14 @@ struct plat_stmmacenet_data { struct reset_control *stmmac_ahb_rst; struct stmmac_axi *axi; int has_gmac4; - bool has_sun8i; - bool tso_en; int rss_en; int mac_port_sel_speed; - bool en_tx_lpi_clockgating; - bool rx_clk_runs_in_lpi; int has_xgmac; - bool vlan_fail_q_en; u8 vlan_fail_q; unsigned int eee_usecs_rate; struct pci_dev *pdev; int int_snapshot_num; int ext_snapshot_num; - bool int_snapshot_en; - bool ext_snapshot_en; - bool multi_msi_en; int msi_mac_vec; int msi_wol_vec; int msi_lpi_vec; @@ -289,10 +294,7 @@ struct plat_stmmacenet_data { int msi_sfty_ue_vec; int msi_rx_base_vec; int msi_tx_base_vec; - bool use_phy_wol; - bool sph_disable; - bool serdes_up_after_phy_linkup; const struct dwmac4_addrs *dwmac4_addrs; - bool has_integrated_pcs; + unsigned int flags; }; #endif |