summaryrefslogtreecommitdiff
path: root/drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
diff options
context:
space:
mode:
authorMarco Chiappero <marco.chiappero@intel.com>2020-10-12 23:38:32 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-10-30 09:34:54 +0300
commitad1332aa67eca6223b130cb593621ee16439b902 (patch)
tree2369c5aaafe8e87733ade2eddbe9c1886d2c0d58 /drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
parent369eb4aaae46b1e40142fbe0ef27b2646c21e1e9 (diff)
downloadlinux-ad1332aa67eca6223b130cb593621ee16439b902.tar.xz
crypto: qat - add support for capability detection
Add logic to detect device capabilities for c62x, c3xxx and dh895xcc. Read fuses, straps and legfuses CSRs and build the device capabilities mask. This will be used to understand if a certain service is supported by a device. This patch is based on earlier work done by Conor McLoughlin. 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: Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by: Fiona Trahe <fiona.trahe@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c')
-rw-r--r--drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c b/drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
index 53c03b2f763f..babdffbcb846 100644
--- a/drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
+++ b/drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
@@ -5,6 +5,7 @@
#include <adf_pf2vf_msg.h>
#include <adf_gen2_hw_data.h>
#include "adf_c62x_hw_data.h"
+#include "icp_qat_hw.h"
/* Worker thread to service arbiter mappings based on dev SKUs */
static const u32 thrd_to_arb_map_8_me_sku[] = {
@@ -205,6 +206,7 @@ void adf_init_hw_data_c62x(struct adf_hw_device_data *hw_data)
hw_data->enable_error_correction = adf_enable_error_correction;
hw_data->get_accel_mask = get_accel_mask;
hw_data->get_ae_mask = get_ae_mask;
+ hw_data->get_accel_cap = adf_gen2_get_accel_cap;
hw_data->get_num_accels = get_num_accels;
hw_data->get_num_aes = get_num_aes;
hw_data->get_sram_bar_id = get_sram_bar_id;