aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/ipa_reg.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-11-16 17:37:56 -0600
committerJakub Kicinski <kuba@kernel.org>2020-11-18 15:53:48 -0800
commit5f87d77bb3bda034d234da1a8ade8ed41af175e0 (patch)
treec9e2b67f24b215b063e8373e2a1feea644548739 /drivers/net/ipa/ipa_reg.h
parentnet: ipa: share field mask values for IPA hash registers (diff)
downloadlinux-dev-5f87d77bb3bda034d234da1a8ade8ed41af175e0.tar.xz
linux-dev-5f87d77bb3bda034d234da1a8ade8ed41af175e0.zip
net: ipa: make filter/routing hash enable register variable
For IPA v3.5.1, the IPA filter/routing hash enable register actually does exist, but it is at offset 0x8c into the IPA register space. For newer versions of IPA it is at offset 0x148. Define a new inline function ipa_reg_filt_rout_hash_en_offset() to return the appropriate value for a given version of IPA hardware. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/ipa/ipa_reg.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ipa/ipa_reg.h b/drivers/net/ipa/ipa_reg.h
index 001961cd526b..b46e60744f57 100644
--- a/drivers/net/ipa/ipa_reg.h
+++ b/drivers/net/ipa/ipa_reg.h
@@ -151,8 +151,13 @@ static inline u32 ipa_reg_state_aggr_active_offset(enum ipa_version version)
}
/* ipa->available defines the valid bits in the STATE_AGGR_ACTIVE register */
-/* The next register is present for IPA v4.2 and above */
-#define IPA_REG_FILT_ROUT_HASH_EN_OFFSET 0x00000148
+static inline u32 ipa_reg_filt_rout_hash_en_offset(enum ipa_version version)
+{
+ if (version == IPA_VERSION_3_5_1)
+ return 0x000008c;
+
+ return 0x0000148;
+}
static inline u32 ipa_reg_filt_rout_hash_flush_offset(enum ipa_version version)
{