Skip to content

Commit

Permalink
net: ipa: greater timer granularity options
Browse files Browse the repository at this point in the history
Starting with IPA v5.0, the head-of-line blocking timer has more
than two pulse generators available to define timer granularity.
To prepare for that, change the way the field value is encoded
to use ipa_reg_encode() rather than ipa_reg_bit().

The aggregation granularity selection could (in principle) also use
an additional pulse generator starting with IPA v5.0.  Encode the
AGGR_GRAN_SEL field differently to allow that as well.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Alex Elder authored and Jakub Kicinski committed Feb 1, 2023
1 parent a08cedc commit 32079a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ static u32 aggr_time_limit_encode(struct ipa *ipa, const struct ipa_reg *reg,
ret = ipa_qtime_val(microseconds, max);
if (ret < 0) {
val = -ret;
gran_sel = ipa_reg_bit(reg, AGGR_GRAN_SEL);
gran_sel = ipa_reg_encode(reg, AGGR_GRAN_SEL, 1);
} else {
val = ret;
gran_sel = 0;
Expand Down Expand Up @@ -1057,7 +1057,7 @@ static u32 hol_block_timer_encode(struct ipa *ipa, const struct ipa_reg *reg,
ret = ipa_qtime_val(microseconds, max);
if (ret < 0) {
val = -ret;
gran_sel = ipa_reg_bit(reg, TIMER_GRAN_SEL);
gran_sel = ipa_reg_encode(reg, TIMER_GRAN_SEL, 1);
} else {
val = ret;
gran_sel = 0;
Expand Down

0 comments on commit 32079a4

Please sign in to comment.