diff options
author | Alex Elder <elder@linaro.org> | 2020-11-25 21:45:20 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-28 21:13:55 +0100 |
commit | 8bfc4e21d5b3fa5caeb54b2f1d7c368f218d23f2 (patch) | |
tree | f8dd528cd58acc7ac1723f6a4cc734e71851e13f /drivers/net/ipa/ipa_reg.h | |
parent | net: ipa: add new most-significant bits to registers (diff) | |
download | linux-8bfc4e21d5b3fa5caeb54b2f1d7c368f218d23f2.tar.xz linux-8bfc4e21d5b3fa5caeb54b2f1d7c368f218d23f2.zip |
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.h | 7 |
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; } |