Commit e6dac5ea authored by Marco Chiappero's avatar Marco Chiappero Committed by Herbert Xu
Browse files

crypto: qat - remove the unnecessary get_vintmsk_offset()



All QAT GEN2 devices share the same register offset for masking interrupts,
so they don't need any complex device specific infrastructure.

Remove this function in favor of a constant in order to simplify the code.
Also, future generations may require a more complex device specific
handling, making the current approach obsolete anyway.

Signed-off-by: default avatarMarco Chiappero <marco.chiappero@intel.com>
Co-developed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarFiona Trahe <fiona.trahe@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 9ffd49df
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -111,11 +111,6 @@ static u32 get_pf2vf_offset(u32 i)
	return ADF_C3XXX_PF2VF_OFFSET(i);
	return ADF_C3XXX_PF2VF_OFFSET(i);
}
}


static u32 get_vintmsk_offset(u32 i)
{
	return ADF_C3XXX_VINTMSK_OFFSET(i);
}

static void adf_enable_error_correction(struct adf_accel_dev *accel_dev)
static void adf_enable_error_correction(struct adf_accel_dev *accel_dev)
{
{
	struct adf_hw_device_data *hw_device = accel_dev->hw_device;
	struct adf_hw_device_data *hw_device = accel_dev->hw_device;
@@ -195,7 +190,6 @@ void adf_init_hw_data_c3xxx(struct adf_hw_device_data *hw_data)
	hw_data->get_sram_bar_id = get_sram_bar_id;
	hw_data->get_sram_bar_id = get_sram_bar_id;
	hw_data->get_etr_bar_id = get_etr_bar_id;
	hw_data->get_etr_bar_id = get_etr_bar_id;
	hw_data->get_misc_bar_id = get_misc_bar_id;
	hw_data->get_misc_bar_id = get_misc_bar_id;
	hw_data->get_vintmsk_offset = get_vintmsk_offset;
	hw_data->get_admin_info = adf_gen2_get_admin_info;
	hw_data->get_admin_info = adf_gen2_get_admin_info;
	hw_data->get_arb_info = adf_gen2_get_arb_info;
	hw_data->get_arb_info = adf_gen2_get_arb_info;
	hw_data->get_sku = get_sku;
	hw_data->get_sku = get_sku;
+0 −1
Original line number Original line Diff line number Diff line
@@ -29,7 +29,6 @@
#define ADF_C3XXX_ERRSSMSH_EN BIT(3)
#define ADF_C3XXX_ERRSSMSH_EN BIT(3)


#define ADF_C3XXX_PF2VF_OFFSET(i)	(0x3A000 + 0x280 + ((i) * 0x04))
#define ADF_C3XXX_PF2VF_OFFSET(i)	(0x3A000 + 0x280 + ((i) * 0x04))
#define ADF_C3XXX_VINTMSK_OFFSET(i)	(0x3A000 + 0x200 + ((i) * 0x04))


/* AE to function mapping */
/* AE to function mapping */
#define ADF_C3XXX_AE2FUNC_MAP_GRP_A_NUM_REGS 48
#define ADF_C3XXX_AE2FUNC_MAP_GRP_A_NUM_REGS 48
+0 −6
Original line number Original line Diff line number Diff line
@@ -52,11 +52,6 @@ static u32 get_pf2vf_offset(u32 i)
	return ADF_C3XXXIOV_PF2VF_OFFSET;
	return ADF_C3XXXIOV_PF2VF_OFFSET;
}
}


static u32 get_vintmsk_offset(u32 i)
{
	return ADF_C3XXXIOV_VINTMSK_OFFSET;
}

static int adf_vf_int_noop(struct adf_accel_dev *accel_dev)
static int adf_vf_int_noop(struct adf_accel_dev *accel_dev)
{
{
	return 0;
	return 0;
@@ -92,7 +87,6 @@ void adf_init_hw_data_c3xxxiov(struct adf_hw_device_data *hw_data)
	hw_data->get_etr_bar_id = get_etr_bar_id;
	hw_data->get_etr_bar_id = get_etr_bar_id;
	hw_data->get_misc_bar_id = get_misc_bar_id;
	hw_data->get_misc_bar_id = get_misc_bar_id;
	hw_data->get_pf2vf_offset = get_pf2vf_offset;
	hw_data->get_pf2vf_offset = get_pf2vf_offset;
	hw_data->get_vintmsk_offset = get_vintmsk_offset;
	hw_data->get_sku = get_sku;
	hw_data->get_sku = get_sku;
	hw_data->enable_ints = adf_vf_void_noop;
	hw_data->enable_ints = adf_vf_void_noop;
	hw_data->enable_pfvf_comms = adf_enable_vf2pf_comms;
	hw_data->enable_pfvf_comms = adf_enable_vf2pf_comms;
+0 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,6 @@
#define ADF_C3XXXIOV_ETR_BAR 0
#define ADF_C3XXXIOV_ETR_BAR 0
#define ADF_C3XXXIOV_ETR_MAX_BANKS 1
#define ADF_C3XXXIOV_ETR_MAX_BANKS 1
#define ADF_C3XXXIOV_PF2VF_OFFSET	0x200
#define ADF_C3XXXIOV_PF2VF_OFFSET	0x200
#define ADF_C3XXXIOV_VINTMSK_OFFSET	0x208


void adf_init_hw_data_c3xxxiov(struct adf_hw_device_data *hw_data);
void adf_init_hw_data_c3xxxiov(struct adf_hw_device_data *hw_data);
void adf_clean_hw_data_c3xxxiov(struct adf_hw_device_data *hw_data);
void adf_clean_hw_data_c3xxxiov(struct adf_hw_device_data *hw_data);
+0 −5
Original line number Original line Diff line number Diff line
@@ -112,10 +112,6 @@ static u32 get_pf2vf_offset(u32 i)
{
{
	return ADF_C62X_PF2VF_OFFSET(i);
	return ADF_C62X_PF2VF_OFFSET(i);
}
}
static u32 get_vintmsk_offset(u32 i)
{
	return ADF_C62X_VINTMSK_OFFSET(i);
}


static void adf_enable_error_correction(struct adf_accel_dev *accel_dev)
static void adf_enable_error_correction(struct adf_accel_dev *accel_dev)
{
{
@@ -196,7 +192,6 @@ void adf_init_hw_data_c62x(struct adf_hw_device_data *hw_data)
	hw_data->get_sram_bar_id = get_sram_bar_id;
	hw_data->get_sram_bar_id = get_sram_bar_id;
	hw_data->get_etr_bar_id = get_etr_bar_id;
	hw_data->get_etr_bar_id = get_etr_bar_id;
	hw_data->get_misc_bar_id = get_misc_bar_id;
	hw_data->get_misc_bar_id = get_misc_bar_id;
	hw_data->get_vintmsk_offset = get_vintmsk_offset;
	hw_data->get_admin_info = adf_gen2_get_admin_info;
	hw_data->get_admin_info = adf_gen2_get_admin_info;
	hw_data->get_arb_info = adf_gen2_get_arb_info;
	hw_data->get_arb_info = adf_gen2_get_arb_info;
	hw_data->get_sku = get_sku;
	hw_data->get_sku = get_sku;
Loading