Lines Matching +full:sparx5 +full:- +full:switch
1 // SPDX-License-Identifier: GPL-2.0+
2 /* Microchip Sparx5 Switch driver
10 static int sparx5_policer_service_conf_set(struct sparx5 *sparx5, in sparx5_policer_service_conf_set() argument
14 const struct sparx5_ops *ops = sparx5->data->ops; in sparx5_policer_service_conf_set()
18 g = ops->get_sdlb_group(pol->group); in sparx5_policer_service_conf_set()
19 idx = pol->idx; in sparx5_policer_service_conf_set()
21 rate = pol->rate * 1000; in sparx5_policer_service_conf_set()
22 burst = pol->burst; in sparx5_policer_service_conf_set()
24 pup_tokens = sparx5_sdlb_pup_token_get(sparx5, g->pup_interval, rate); in sparx5_policer_service_conf_set()
26 sparx5_sdlb_pup_token_get(sparx5, g->pup_interval, g->max_rate); in sparx5_policer_service_conf_set()
28 thres = DIV_ROUND_UP(burst, g->min_burst); in sparx5_policer_service_conf_set()
30 spx5_wr(ANA_AC_SDLB_PUP_TOKENS_PUP_TOKENS_SET(pup_tokens), sparx5, in sparx5_policer_service_conf_set()
34 ANA_AC_SDLB_INH_CTRL_PUP_TOKENS_MAX, sparx5, in sparx5_policer_service_conf_set()
38 sparx5, ANA_AC_SDLB_THRES(idx, 0)); in sparx5_policer_service_conf_set()
43 int sparx5_policer_conf_set(struct sparx5 *sparx5, struct sparx5_policer *pol) in sparx5_policer_conf_set() argument
46 switch (pol->type) { in sparx5_policer_conf_set()
48 return sparx5_policer_service_conf_set(sparx5, pol); in sparx5_policer_conf_set()