summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/bcm_sf2.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2020-09-02 00:59:13 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-04 00:08:03 +0200
commit2ee3adc4aef58087754a03a3774435a7224fd1b4 (patch)
treeb8ecaf9a70b6c81dc1e32d4943b4eed17599217f /drivers/net/dsa/bcm_sf2.h
parentnet: dsa: bcm_sf2: request and handle clocks (diff)
downloadlinux-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.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;