summaryrefslogtreecommitdiff
path: root/drivers/crypto/qat/qat_common/adf_accel_devices.h
diff options
context:
space:
mode:
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>2020-10-12 23:38:20 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-10-30 09:34:47 +0300
commitc4e8428673425c5b0c7280387c5cb35d60959b97 (patch)
treedd09074448fc2c8aa081dbe6772fcf66a01f79e3 /drivers/crypto/qat/qat_common/adf_accel_devices.h
parent70b9bd3929da903d54dbd7d1ca2465333077cfd9 (diff)
downloadlinux-c4e8428673425c5b0c7280387c5cb35d60959b97.tar.xz
crypto: qat - fix configuration of iov threads
The number of AE2FUNC_MAP registers is different in every QAT device (c62x, c3xxx and dh895xcc) although the logic and the register offsets are the same across devices. This patch separates the logic that configures the iov threads in a common function that takes as input the number of AE2FUNC_MAP registers supported by a device. The function is then added to the adf_hw_device_data structure of each device, and called with the appropriate parameters. The configure iov thread logic is added to a new file, adf_gen2_hw_data.c, that is going to contain code that is shared across QAT GEN2 devices. Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Fiona Trahe <fiona.trahe@intel.com> Reviewed-by: Wojciech Ziemba <wojciech.ziemba@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_common/adf_accel_devices.h')
-rw-r--r--drivers/crypto/qat/qat_common/adf_accel_devices.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_accel_devices.h b/drivers/crypto/qat/qat_common/adf_accel_devices.h
index 85b423d28f77..d7a27d15e137 100644
--- a/drivers/crypto/qat/qat_common/adf_accel_devices.h
+++ b/drivers/crypto/qat/qat_common/adf_accel_devices.h
@@ -125,6 +125,8 @@ struct adf_hw_device_data {
void (*get_arb_mapping)(struct adf_accel_dev *accel_dev,
const u32 **cfg);
void (*disable_iov)(struct adf_accel_dev *accel_dev);
+ void (*configure_iov_threads)(struct adf_accel_dev *accel_dev,
+ bool enable);
void (*enable_ints)(struct adf_accel_dev *accel_dev);
int (*enable_vf2pf_comms)(struct adf_accel_dev *accel_dev);
void (*reset_device)(struct adf_accel_dev *accel_dev);