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
17 g = &sdlb_groups[pol->group]; in sparx5_policer_service_conf_set()
18 idx = pol->idx; in sparx5_policer_service_conf_set()
20 rate = pol->rate * 1000; in sparx5_policer_service_conf_set()
21 burst = pol->burst; in sparx5_policer_service_conf_set()
23 pup_tokens = sparx5_sdlb_pup_token_get(sparx5, g->pup_interval, rate); in sparx5_policer_service_conf_set()
25 sparx5_sdlb_pup_token_get(sparx5, g->pup_interval, g->max_rate); in sparx5_policer_service_conf_set()
27 thres = DIV_ROUND_UP(burst, g->min_burst); in sparx5_policer_service_conf_set()
29 spx5_wr(ANA_AC_SDLB_PUP_TOKENS_PUP_TOKENS_SET(pup_tokens), sparx5, in sparx5_policer_service_conf_set()
33 ANA_AC_SDLB_INH_CTRL_PUP_TOKENS_MAX, sparx5, in sparx5_policer_service_conf_set()
37 sparx5, ANA_AC_SDLB_THRES(idx, 0)); in sparx5_policer_service_conf_set()
42 int sparx5_policer_conf_set(struct sparx5 *sparx5, struct sparx5_policer *pol) in sparx5_policer_conf_set() argument
45 switch (pol->type) { in sparx5_policer_conf_set()
47 return sparx5_policer_service_conf_set(sparx5, pol); in sparx5_policer_conf_set()