diff options
author | Alex Elder <elder@linaro.org> | 2022-09-26 17:09:18 -0500 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-27 18:42:49 -0700 |
commit | 6bfb753850d3bad78fc2eb6f4e0fa5675055ad97 (patch) | |
tree | 5ed6c13d3bbbaad4f8f1a06345bcbc26332c7911 /drivers/net/ipa/ipa_uc.c | |
parent | 98e2dd71a826c7d2a6de7a9444b5e3c7824082fe (diff) |
net: ipa: use IPA register IDs to determine offsets
Expose two inline functions that return the offset for a register
whose ID is provided; one of them takes an additional argument
that's used for registers that are parameterized. These both use
a common helper function __ipa_reg_offset(), which just uses the
offset symbols already defined.
Replace all references to the offset macros defined for IPA
registers with calls to ipa_reg_offset() or ipa_reg_n_offset().
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/ipa_uc.c')
-rw-r--r-- | drivers/net/ipa/ipa_uc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ipa/ipa_uc.c b/drivers/net/ipa/ipa_uc.c index fe11910518d9..dcfc000025ef 100644 --- a/drivers/net/ipa/ipa_uc.c +++ b/drivers/net/ipa/ipa_uc.c @@ -222,7 +222,6 @@ void ipa_uc_power(struct ipa *ipa) static void send_uc_command(struct ipa *ipa, u32 command, u32 command_param) { struct ipa_uc_mem_area *shared = ipa_uc_shared(ipa); - u32 offset; u32 val; /* Fill in the command data */ @@ -234,8 +233,7 @@ static void send_uc_command(struct ipa *ipa, u32 command, u32 command_param) /* Use an interrupt to tell the microcontroller the command is ready */ val = u32_encode_bits(1, UC_INTR_FMASK); - offset = ipa_reg_irq_uc_offset(ipa->version); - iowrite32(val, ipa->reg_virt + offset); + iowrite32(val, ipa->reg_virt + ipa_reg_offset(ipa, IPA_IRQ_UC)); } /* Tell the microcontroller the AP is shutting down */ |