diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2020-09-02 00:59:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-04 00:08:03 +0200 |
commit | 2ee3adc4aef58087754a03a3774435a7224fd1b4 (patch) | |
tree | b8ecaf9a70b6c81dc1e32d4943b4eed17599217f /drivers/net/dsa/bcm_sf2.h | |
parent | net: dsa: bcm_sf2: request and handle clocks (diff) | |
download | linux-2ee3adc4aef58087754a03a3774435a7224fd1b4.tar.xz linux-2ee3adc4aef58087754a03a3774435a7224fd1b4.zip |
net: dsa: bcm_sf2: recalculate switch clock rate based on ports
Whenever a port gets enabled/disabled, recalcultate the required switch
clock rate to make sure it always gets set to the expected rate
targeting our switch use case. This is only done for the BCM7445 switch
as there is no clocking profile available for BCM7278.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.h')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h index 6dd69922e3f6..1ed901a68536 100644 --- a/drivers/net/dsa/bcm_sf2.h +++ b/drivers/net/dsa/bcm_sf2.h @@ -45,6 +45,7 @@ struct bcm_sf2_hw_params { struct bcm_sf2_port_status { unsigned int link; + bool enabled; }; struct bcm_sf2_cfp_priv { @@ -94,6 +95,7 @@ struct bcm_sf2_priv { u32 wol_ports_mask; struct clk *clk; + struct clk *clk_mdiv; /* MoCA port location */ int moca_port; |