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