summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/bcm_sf2.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2020-09-01 15:59:13 -0700
committerDavid S. Miller <davem@davemloft.net>2020-09-03 15:08:03 -0700
commit2ee3adc4aef58087754a03a3774435a7224fd1b4 (patch)
treeb8ecaf9a70b6c81dc1e32d4943b4eed17599217f /drivers/net/dsa/bcm_sf2.h
parente9ec5c3bd238f2cbe9d9696e994f36d1b249c058 (diff)
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.h2
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;