crypto: qat - move pf2vf interrupt [en|dis]able to adf_vf_isr.c
Interrupt code to enable interrupts from PF does not belong to the protocol code, so move it to the interrupt handling specific file for better code organization. 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: Fiona Trahe <fiona.trahe@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
3d655732b0
commit
9800678f05
|
@ -11,26 +11,6 @@
|
||||||
#define ADF_DH895XCC_ERRMSK5 (ADF_DH895XCC_EP_OFFSET + 0xDC)
|
#define ADF_DH895XCC_ERRMSK5 (ADF_DH895XCC_EP_OFFSET + 0xDC)
|
||||||
#define ADF_DH895XCC_ERRMSK5_VF2PF_U_MASK(vf_mask) (vf_mask >> 16)
|
#define ADF_DH895XCC_ERRMSK5_VF2PF_U_MASK(vf_mask) (vf_mask >> 16)
|
||||||
|
|
||||||
void adf_enable_pf2vf_interrupts(struct adf_accel_dev *accel_dev)
|
|
||||||
{
|
|
||||||
struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev;
|
|
||||||
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
|
||||||
void __iomem *pmisc_bar_addr =
|
|
||||||
pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr;
|
|
||||||
|
|
||||||
ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void adf_disable_pf2vf_interrupts(struct adf_accel_dev *accel_dev)
|
|
||||||
{
|
|
||||||
struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev;
|
|
||||||
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
|
||||||
void __iomem *pmisc_bar_addr =
|
|
||||||
pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr;
|
|
||||||
|
|
||||||
ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void adf_enable_vf2pf_interrupts(struct adf_accel_dev *accel_dev,
|
void adf_enable_vf2pf_interrupts(struct adf_accel_dev *accel_dev,
|
||||||
u32 vf_mask)
|
u32 vf_mask)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,26 @@ struct adf_vf_stop_data {
|
||||||
struct work_struct work;
|
struct work_struct work;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void adf_enable_pf2vf_interrupts(struct adf_accel_dev *accel_dev)
|
||||||
|
{
|
||||||
|
struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev;
|
||||||
|
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
||||||
|
void __iomem *pmisc_bar_addr =
|
||||||
|
pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr;
|
||||||
|
|
||||||
|
ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void adf_disable_pf2vf_interrupts(struct adf_accel_dev *accel_dev)
|
||||||
|
{
|
||||||
|
struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev;
|
||||||
|
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
||||||
|
void __iomem *pmisc_bar_addr =
|
||||||
|
pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)].virt_addr;
|
||||||
|
|
||||||
|
ADF_CSR_WR(pmisc_bar_addr, hw_data->get_vintmsk_offset(0), 0x2);
|
||||||
|
}
|
||||||
|
|
||||||
static int adf_enable_msi(struct adf_accel_dev *accel_dev)
|
static int adf_enable_msi(struct adf_accel_dev *accel_dev)
|
||||||
{
|
{
|
||||||
struct adf_accel_pci *pci_dev_info = &accel_dev->accel_pci_dev;
|
struct adf_accel_pci *pci_dev_info = &accel_dev->accel_pci_dev;
|
||||||
|
|
Loading…
Reference in New Issue