diff mbox series

[net-next,6/8] net: ipa: greater timer granularity options

Message ID 20230130210158.4126129-7-elder@linaro.org (mailing list archive)
State Not Applicable
Headers show
Series net: ipa: remaining IPA v5.0 support | expand

Commit Message

Alex Elder Jan. 30, 2023, 9:01 p.m. UTC
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>
---
 drivers/net/ipa/ipa_endpoint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c
index 8909ba8bfd0e9..c029209191d41 100644
--- a/drivers/net/ipa/ipa_endpoint.c
+++ b/drivers/net/ipa/ipa_endpoint.c
@@ -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;
@@ -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;