net: ipa: define more fields for GSI registers
authorAlex Elder <elder@linaro.org>
Mon, 13 Feb 2023 16:22:26 +0000 (10:22 -0600)
committerJakub Kicinski <kuba@kernel.org>
Wed, 15 Feb 2023 04:39:38 +0000 (20:39 -0800)
commit330ce9d3462e825c44368f58c32d2e2fcf819128
tree97f7becb47431ee2e31b81ff2934590c33511af1
parentf50ca7cef7c7ceff2b66b610ac5ab17aac36df6a
net: ipa: define more fields for GSI registers

Beyond the CH_C_QOS register, two other registers whose offset is
related to channel number have fields within them.

Define the fields within the CH_C_CNTXT_0 GSI register, using an
enumerated type to identify the register's fields, and define an
array of field masks to use for that register's reg structure.

For the CH_C_CNTXT_1 GSI register, ch_c_cntxt_1_length_encode()
previously hid the difference in bit width in the channel ring
length field.  Instead, define a new field CH_R_LENGTH and encode
the ring size with reg_encode().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/gsi.c
drivers/net/ipa/gsi_reg.h
drivers/net/ipa/reg/gsi_reg-v3.1.c
drivers/net/ipa/reg/gsi_reg-v3.5.1.c
drivers/net/ipa/reg/gsi_reg-v4.0.c
drivers/net/ipa/reg/gsi_reg-v4.5.c
drivers/net/ipa/reg/gsi_reg-v4.9.c