crypto: qat - refactor fw config logic for 4xxx
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Fri, 9 Jun 2023 16:38:21 +0000 (17:38 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 16 Jun 2023 12:30:35 +0000 (20:30 +0800)
commit10484c647af6b1952d1675e83be9cc976cdb6a96
treed15f28d2c457e08b0af1ba693621d398b73bc532
parent52f9a2848b962fb68c212930b4bfe9754fd80ac4
crypto: qat - refactor fw config logic for 4xxx

The data structure adf_fw_config is used to select which firmware image
is loaded on a certain set of accelerator engines.
When support for 402xx was added, the adf_fw_config arrays were
duplicated in order to select different firmware images.

Since the configurations are the same regardless of the QAT GEN4
flavour, in preparation for adding support for multiple configurations,
refactor the logic that retrieves the firmware names in the 4xxx driver.
The structure adf_fw_config has been changed to contain a firmware object
id that is then mapped to a firmware name depending of the device type.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c