mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ethernet: stmmac: Add flow ctrl configuration from DTB
If flow control is configured in DTB, the priority is the highest, otherwise the default value in the code is used. Signed-off-by: David Wu <david.wu@rock-chips.com> Change-Id: I21afeb537426473d6edf7ce40317cdaf99d64a93
This commit is contained in:
@@ -826,8 +826,8 @@ static void stmmac_mac_flow_ctrl(struct stmmac_priv *priv, u32 duplex)
|
||||
{
|
||||
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
||||
|
||||
stmmac_flow_ctrl(priv, priv->hw, duplex, priv->flow_ctrl,
|
||||
priv->pause, tx_cnt);
|
||||
stmmac_flow_ctrl(priv, priv->hw, duplex, priv->flow_ctrl & priv->plat->flow_ctrl,
|
||||
priv->pause, tx_cnt);
|
||||
}
|
||||
|
||||
static void stmmac_validate(struct phylink_config *config,
|
||||
|
||||
@@ -570,6 +570,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
|
||||
|
||||
of_property_read_u32(np, "snps,ps-speed", &plat->mac_port_sel_speed);
|
||||
|
||||
if (of_property_read_u32(np, "snps,flow-ctrl", &plat->flow_ctrl))
|
||||
plat->flow_ctrl = FLOW_AUTO;
|
||||
|
||||
plat->axi = stmmac_axi_setup(pdev);
|
||||
|
||||
rc = stmmac_mtl_setup(pdev, plat);
|
||||
|
||||
@@ -173,6 +173,7 @@ struct plat_stmmacenet_data {
|
||||
int rx_fifo_size;
|
||||
int dma_tx_size;
|
||||
int dma_rx_size;
|
||||
int flow_ctrl;
|
||||
u32 addr64;
|
||||
u32 rx_queues_to_use;
|
||||
u32 tx_queues_to_use;
|
||||
|
||||
Reference in New Issue
Block a user