diff options
author | Alex Elder <elder@linaro.org> | 2023-02-08 14:56:52 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-02-10 08:06:32 +0000 |
commit | fc4cecf70675a7d64b76aad190821283306949d6 (patch) | |
tree | 9db40b9e21ab86275f90d028df5a8c032545edfc /drivers/net/ipa/ipa_mem.c | |
parent | 81772e444dbe89ca76d947f6d1e870d00b29c521 (diff) | |
download | lwn-fc4cecf70675a7d64b76aad190821283306949d6.tar.gz lwn-fc4cecf70675a7d64b76aad190821283306949d6.zip |
net: ipa: generalize register offset functions
Rename ipa_reg_offset() to be reg_offset() and move its definition
to "reg.h". Rename ipa_reg_n_offset() to be reg_n_offset() also.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_mem.c')
-rw-r--r-- | drivers/net/ipa/ipa_mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index a6efeed25376..20241fac21be 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -116,7 +116,7 @@ int ipa_mem_setup(struct ipa *ipa) reg = ipa_reg(ipa, LOCAL_PKT_PROC_CNTXT); val = ipa_reg_encode(reg, IPA_BASE_ADDR, offset); - iowrite32(val, ipa->reg_virt + ipa_reg_offset(reg)); + iowrite32(val, ipa->reg_virt + reg_offset(reg)); return 0; } @@ -328,7 +328,7 @@ int ipa_mem_config(struct ipa *ipa) /* Check the advertised location and size of the shared memory area */ reg = ipa_reg(ipa, SHARED_MEM_SIZE); - val = ioread32(ipa->reg_virt + ipa_reg_offset(reg)); + val = ioread32(ipa->reg_virt + reg_offset(reg)); /* The fields in the register are in 8 byte units */ ipa->mem_offset = 8 * ipa_reg_decode(reg, MEM_BADDR, val); |