From 2ee3adc4aef58087754a03a3774435a7224fd1b4 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 1 Sep 2020 15:59:13 -0700 Subject: 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 Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/dsa/bcm_sf2.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/dsa/bcm_sf2.h') 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; -- cgit v1.2.3