diff options
author | Marco Chiappero <marco.chiappero@intel.com> | 2021-12-16 09:13:16 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-12-24 14:18:24 +1100 |
commit | 448588adcdf4a025b0b5517a5c9557b036b3cf79 (patch) | |
tree | 05c9b23765f0a96801e47fafd970956559ebab92 /drivers/crypto/qat/qat_common/adf_common_drv.h | |
parent | crypto: qat - support the reset of ring pairs on PF (diff) | |
download | linux-dev-448588adcdf4a025b0b5517a5c9557b036b3cf79.tar.xz linux-dev-448588adcdf4a025b0b5517a5c9557b036b3cf79.zip |
crypto: qat - add the adf_get_pmisc_base() helper function
Add and use the new helper function adf_get_pmisc_base() where convenient.
Also:
- remove no longer shared variables
- leverage other utilities, such as GET_PFVF_OPS(), as a consequence
- consistently use the "pmisc_addr" name for the returned value of this
new helper
Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Co-developed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat/qat_common/adf_common_drv.h')
-rw-r--r-- | drivers/crypto/qat/qat_common/adf_common_drv.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_common_drv.h b/drivers/crypto/qat/qat_common/adf_common_drv.h index 2d8b72085505..5212891344a9 100644 --- a/drivers/crypto/qat/qat_common/adf_common_drv.h +++ b/drivers/crypto/qat/qat_common/adf_common_drv.h @@ -243,4 +243,15 @@ static inline void adf_flush_vf_wq(struct adf_accel_dev *accel_dev) } #endif + +static inline void __iomem *adf_get_pmisc_base(struct adf_accel_dev *accel_dev) +{ + struct adf_hw_device_data *hw_data = accel_dev->hw_device; + struct adf_bar *pmisc; + + pmisc = &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; + + return pmisc->virt_addr; +} + #endif |