summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/gsi.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-11-25 14:45:21 -0600
committerJakub Kicinski <kuba@kernel.org>2020-11-28 12:13:55 -0800
commitb0b6f0ddce853f710c67fdaa19facab142b6306f (patch)
tree007c1eb4ddf1ebdfea6e0a50d5ae8e31d4215565 /drivers/net/ipa/gsi.c
parent8bfc4e21d5b3fa5caeb54b2f1d7c368f218d23f2 (diff)
net: ipa: update gsi registers for IPA v4.5
Very few GSI register definitions change for IPA v4.5, however as a group their position in memory shifts a constant amount (handled by the next commit). Add definitions and update comments to the set of GSI registers to support changes that come with IPA v4.5. Update the logic in gsi_channel_program() to accommodate the new (expanded) PREFETCH_MODE field in the CH_C_QOS register. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/gsi.c')
-rw-r--r--drivers/net/ipa/gsi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index 2cf10c9f0143..67e9eb8fe329 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -784,8 +784,14 @@ static void gsi_channel_program(struct gsi_channel *channel, bool doorbell)
/* v4.0 introduces an escape buffer for prefetch. We use it
* on all but the AP command channel.
*/
- if (gsi->version != IPA_VERSION_3_5_1 && !channel->command)
- val |= USE_ESCAPE_BUF_ONLY_FMASK;
+ if (gsi->version != IPA_VERSION_3_5_1 && !channel->command) {
+ /* If not otherwise set, prefetch buffers are used */
+ if (gsi->version < IPA_VERSION_4_5)
+ val |= USE_ESCAPE_BUF_ONLY_FMASK;
+ else
+ val |= u32_encode_bits(GSI_ESCAPE_BUF_ONLY,
+ PREFETCH_MODE_FMASK);
+ }
iowrite32(val, gsi->virt + GSI_CH_C_QOS_OFFSET(channel_id));