crypto: qat - add measure clock frequency
authorDamian Muszynski <damian.muszynski@intel.com>
Fri, 30 Jun 2023 17:03:56 +0000 (19:03 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Jul 2023 10:16:11 +0000 (22:16 +1200)
commite2980ba57e797e58a5476fbc4296f40551fb3404
treec0657652534f3f13086a1f4a859d761916d619c8
parent7f77b6797b34862e6164335c894f587387bff082
crypto: qat - add measure clock frequency

The QAT hardware does not expose a mechanism to report its clock
frequency. This is required to implement the Heartbeat feature.

Add a clock measuring algorithm that estimates the frequency by
comparing the internal timestamp counter incremented by the firmware
with the time measured by the kernel.
The frequency value is only used internally and not exposed to
the user.

Signed-off-by: Damian Muszynski <damian.muszynski@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 files changed:
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.h
drivers/crypto/intel/qat/qat_c3xxx/adf_c3xxx_hw_data.c
drivers/crypto/intel/qat/qat_c3xxx/adf_c3xxx_hw_data.h
drivers/crypto/intel/qat/qat_c62x/adf_c62x_hw_data.c
drivers/crypto/intel/qat/qat_c62x/adf_c62x_hw_data.h
drivers/crypto/intel/qat/qat_common/Makefile
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
drivers/crypto/intel/qat/qat_common/adf_admin.c
drivers/crypto/intel/qat/qat_common/adf_clock.c [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/adf_clock.h [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/adf_common_drv.h
drivers/crypto/intel/qat/qat_common/adf_init.c
drivers/crypto/intel/qat/qat_common/icp_qat_fw_init_admin.h
drivers/crypto/intel/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
drivers/crypto/intel/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h