xref: /linux/drivers/crypto/intel/qat/qat_common/adf_gen6_shared.c (revision 14418ddcc2c2055743ac7ee53d5ac2cf8a8660a7)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright(c) 2025 Intel Corporation */
3 #include <linux/export.h>
4 
5 #include "adf_gen4_config.h"
6 #include "adf_gen4_hw_csr_data.h"
7 #include "adf_gen4_pfvf.h"
8 #include "adf_gen6_shared.h"
9 
10 struct adf_accel_dev;
11 struct adf_pfvf_ops;
12 struct adf_hw_csr_ops;
13 
14 /*
15  * QAT GEN4 and GEN6 devices often differ in terms of supported features,
16  * options and internal logic. However, some of the mechanisms and register
17  * layout are shared between those two GENs. This file serves as an abstraction
18  * layer that allows to use existing GEN4 implementation that is also
19  * applicable to GEN6 without additional overhead and complexity.
20  */
21 void adf_gen6_init_pf_pfvf_ops(struct adf_pfvf_ops *pfvf_ops)
22 {
23 	adf_gen4_init_pf_pfvf_ops(pfvf_ops);
24 }
25 EXPORT_SYMBOL_GPL(adf_gen6_init_pf_pfvf_ops);
26 
27 void adf_gen6_init_hw_csr_ops(struct adf_hw_csr_ops *csr_ops)
28 {
29 	return adf_gen4_init_hw_csr_ops(csr_ops);
30 }
31 EXPORT_SYMBOL_GPL(adf_gen6_init_hw_csr_ops);
32 
33 int adf_gen6_cfg_dev_init(struct adf_accel_dev *accel_dev)
34 {
35 	return adf_gen4_cfg_dev_init(accel_dev);
36 }
37 EXPORT_SYMBOL_GPL(adf_gen6_cfg_dev_init);
38 
39 int adf_gen6_comp_dev_config(struct adf_accel_dev *accel_dev)
40 {
41 	return adf_comp_dev_config(accel_dev);
42 }
43 EXPORT_SYMBOL_GPL(adf_gen6_comp_dev_config);
44 
45 int adf_gen6_no_dev_config(struct adf_accel_dev *accel_dev)
46 {
47 	return adf_no_dev_config(accel_dev);
48 }
49 EXPORT_SYMBOL_GPL(adf_gen6_no_dev_config);
50