mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
crypto: qat - abstract arbiter access
The arbiter configuration, the offset to the arbiter config CSR and the offset to the worker thread to service arbiter CSR are going to be different in QAT GEN4 devices although the logic that uses them is the same across all QAT generations. This patch reworks the gen-specific parts of the arbiter access code by introducing the arb_info structure, that contains the values that are generation specific, and a function in the structure adf_hw_device_data, get_arb_info(), that allows to get them. Since the arbiter values for QAT GEN2 devices (c62x, c3xxx and dh895xcc) are the same, a single function, adf_gen2_get_arb_info() is provided in adf_gen2_hw_data.c and referenced by each QAT GEN2 driver. 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>
This commit is contained in:
committed by
Herbert Xu
parent
c685d7a7ce
commit
369eb4aaae
@@ -97,9 +97,15 @@ do { \
|
||||
#define ADF_ADMINMSGLR_OFFSET (0x3A000 + 0x578)
|
||||
#define ADF_MAILBOX_BASE_OFFSET 0x20970
|
||||
|
||||
/* Arbiter configuration */
|
||||
#define ADF_ARB_OFFSET 0x30000
|
||||
#define ADF_ARB_WRK_2_SER_MAP_OFFSET 0x180
|
||||
#define ADF_ARB_CONFIG (BIT(31) | BIT(6) | BIT(0))
|
||||
|
||||
void adf_gen2_cfg_iov_thds(struct adf_accel_dev *accel_dev, bool enable,
|
||||
int num_a_regs, int num_b_regs);
|
||||
void adf_gen2_init_hw_csr_ops(struct adf_hw_csr_ops *csr_ops);
|
||||
void adf_gen2_get_admin_info(struct admin_info *admin_csrs_info);
|
||||
void adf_gen2_get_arb_info(struct arb_info *arb_info);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user