summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_reg.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-11-25 23:45:20 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-28 23:13:55 +0300
commit8bfc4e21d5b3fa5caeb54b2f1d7c368f218d23f2 (patch)
treef8dd528cd58acc7ac1723f6a4cc734e71851e13f /drivers/net/ipa/ipa_reg.h
parent1af15c2a781d938e94dcdb9a872ce4157730569d (diff)
downloadlinux-8bfc4e21d5b3fa5caeb54b2f1d7c368f218d23f2.tar.xz
net: ipa: add support to code for IPA v4.5
Update the IPA code to make use of the updated IPA v4.5 register definitions. Generally what this patch does is, if IPA v4.5 hardware is in use: - Ensure new registers or fields in IPA v4.5 are updated where required - Ensure registers or fields not supported in IPA v4.5 are not examined when read, or are set to 0 when written It does this while preserving the existing functionality for IPA versions lower than v4.5. The values to program for QSB_MAX_READS and QSB_MAX_WRITES and the source and destination resource counts are updated to be correct for all versions through v4.5 as well. Note that IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX already reflect that 5 is an acceptable number of resources (which IPA v4.5 implements). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/ipa_reg.h')
-rw-r--r--drivers/net/ipa/ipa_reg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_reg.h b/drivers/net/ipa/ipa_reg.h
index 7d10fa6dcbec..3fabafd7e32c 100644
--- a/drivers/net/ipa/ipa_reg.h
+++ b/drivers/net/ipa/ipa_reg.h
@@ -238,6 +238,7 @@ static inline u32 ipa_aggr_granularity_val(u32 usec)
return DIV_ROUND_CLOSEST(usec * TIMER_FREQUENCY, USEC_PER_SEC) - 1;
}
+/* The next register is not present for IPA v4.5 */
#define IPA_REG_TX_CFG_OFFSET 0x000001fc
/* The first three fields are present for IPA v3.5.1 only */
#define TX0_PREFETCH_DISABLE_FMASK GENMASK(0, 0)
@@ -285,6 +286,9 @@ static inline u32 ipa_resource_group_src_count(enum ipa_version version)
case IPA_VERSION_4_2:
return 1;
+ case IPA_VERSION_4_5:
+ return 5;
+
default:
return 0;
}
@@ -304,6 +308,9 @@ static inline u32 ipa_resource_group_dst_count(enum ipa_version version)
case IPA_VERSION_4_2:
return 1;
+ case IPA_VERSION_4_5:
+ return 5;
+
default:
return 0;
}