summaryrefslogtreecommitdiff
path: root/drivers/crypto/qat/qat_c62x/adf_drv.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_drv.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_drv.c')
-rw-r--r--drivers/crypto/qat/qat_c62x/adf_drv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/crypto/qat/qat_c62x/adf_drv.c b/drivers/crypto/qat/qat_c62x/adf_drv.c
index 3da697a566ad..1f5de442e1e6 100644
--- a/drivers/crypto/qat/qat_c62x/adf_drv.c
+++ b/drivers/crypto/qat/qat_c62x/adf_drv.c
@@ -177,9 +177,8 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto out_err_disable;
}
- /* Read accelerator capabilities mask */
- pci_read_config_dword(pdev, ADF_DEVICE_LEGFUSE_OFFSET,
- &hw_data->accel_capabilities_mask);
+ /* Get accelerator capabilities mask */
+ hw_data->accel_capabilities_mask = hw_data->get_accel_cap(accel_dev);
/* Find and map all the device's BARS */
i = (hw_data->fuses & ADF_DEVICE_FUSECTL_MASK) ? 1 : 0;