]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
crypto: qat - add adf_get_aram_base() helper function
authorShashank Gupta <shashank.gupta@intel.com>
Fri, 20 Oct 2023 10:32:50 +0000 (11:32 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Oct 2023 10:04:27 +0000 (18:04 +0800)
Add the function adf_get_aram_base() which allows to return the
base address of the aram bar.

Signed-off-by: Shashank Gupta <shashank.gupta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_common/adf_common_drv.h

index 18a382508542f12a921b562e81c57b358ee5e6c7..d9342634f9c1a0a21db0bb9aefc8065ff6608e8d 100644 (file)
@@ -248,4 +248,14 @@ static inline void __iomem *adf_get_pmisc_base(struct adf_accel_dev *accel_dev)
        return pmisc->virt_addr;
 }
 
+static inline void __iomem *adf_get_aram_base(struct adf_accel_dev *accel_dev)
+{
+       struct adf_hw_device_data *hw_data = accel_dev->hw_device;
+       struct adf_bar *param;
+
+       param = &GET_BARS(accel_dev)[hw_data->get_sram_bar_id(hw_data)];
+
+       return param->virt_addr;
+}
+
 #endif