crypto: qat - remove to call get_sram_bar_id for qat_c3xxx
Reported-by : Struk, Tadeusz <tadeusz.struk@intel.com> Signed-off-by: Yang Pingchao <pingchao.yang@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
6e8d8ecf43
commit
91a93eafea
|
@ -693,14 +693,12 @@ int qat_hal_init(struct adf_accel_dev *accel_dev)
|
||||||
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
||||||
struct adf_bar *misc_bar =
|
struct adf_bar *misc_bar =
|
||||||
&pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)];
|
&pci_info->pci_bars[hw_data->get_misc_bar_id(hw_data)];
|
||||||
struct adf_bar *sram_bar =
|
struct adf_bar *sram_bar;
|
||||||
&pci_info->pci_bars[hw_data->get_sram_bar_id(hw_data)];
|
|
||||||
|
|
||||||
handle = kzalloc(sizeof(*handle), GFP_KERNEL);
|
handle = kzalloc(sizeof(*handle), GFP_KERNEL);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
handle->hal_sram_addr_v = sram_bar->virt_addr;
|
|
||||||
handle->hal_cap_g_ctl_csr_addr_v =
|
handle->hal_cap_g_ctl_csr_addr_v =
|
||||||
(void __iomem *)((uintptr_t)misc_bar->virt_addr +
|
(void __iomem *)((uintptr_t)misc_bar->virt_addr +
|
||||||
ICP_QAT_CAP_OFFSET);
|
ICP_QAT_CAP_OFFSET);
|
||||||
|
@ -714,6 +712,11 @@ int qat_hal_init(struct adf_accel_dev *accel_dev)
|
||||||
(void __iomem *)((uintptr_t)handle->hal_cap_ae_xfer_csr_addr_v +
|
(void __iomem *)((uintptr_t)handle->hal_cap_ae_xfer_csr_addr_v +
|
||||||
LOCAL_TO_XFER_REG_OFFSET);
|
LOCAL_TO_XFER_REG_OFFSET);
|
||||||
handle->pci_dev = pci_info->pci_dev;
|
handle->pci_dev = pci_info->pci_dev;
|
||||||
|
if (handle->pci_dev->device != ADF_C3XXX_PCI_DEVICE_ID) {
|
||||||
|
sram_bar =
|
||||||
|
&pci_info->pci_bars[hw_data->get_sram_bar_id(hw_data)];
|
||||||
|
handle->hal_sram_addr_v = sram_bar->virt_addr;
|
||||||
|
}
|
||||||
handle->fw_auth = (handle->pci_dev->device ==
|
handle->fw_auth = (handle->pci_dev->device ==
|
||||||
ADF_DH895XCC_PCI_DEVICE_ID) ? false : true;
|
ADF_DH895XCC_PCI_DEVICE_ID) ? false : true;
|
||||||
handle->hal_handle = kzalloc(sizeof(*handle->hal_handle), GFP_KERNEL);
|
handle->hal_handle = kzalloc(sizeof(*handle->hal_handle), GFP_KERNEL);
|
||||||
|
|
Loading…
Reference in New Issue