summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
diff options
context:
space:
mode:
authorSteen Hegelund <steen.hegelund@microchip.com>2021-06-24 09:07:56 +0200
committerDavid S. Miller <davem@davemloft.net>2021-06-24 11:28:13 -0700
commit0a9d48ad0d09ce869ea44e405e066959aa5d5371 (patch)
treee19adbcff3d56440a8d1b05b058d871467ca8760 /drivers/net/ethernet/microchip/sparx5/sparx5_main.c
parentd6fce5141929697a27f029c633433d487f6f62cb (diff)
net: sparx5: add calendar bandwidth allocation support
This configures the Sparx5 calendars according to the bandwidth requested in the Device Tree nodes. It also checks if the total requested bandwidth is within the specs of the detected Sparx5 models limits. Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com> Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip/sparx5/sparx5_main.c')
-rw-r--r--drivers/net/ethernet/microchip/sparx5/sparx5_main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
index 549ec2d7bd5a..ffd761b8f975 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
@@ -606,7 +606,14 @@ static int sparx5_start(struct sparx5 *sparx5)
/* Enable queue limitation watermarks */
sparx5_qlim_set(sparx5);
- /* Resource calendar support to be added in later patches */
+ err = sparx5_config_auto_calendar(sparx5);
+ if (err)
+ return err;
+
+ err = sparx5_config_dsm_calendar(sparx5);
+ if (err)
+ return err;
+
/* Init mact_sw struct */
mutex_init(&sparx5->mact_lock);