Commit bd684d83 authored by Jack Xu's avatar Jack Xu Committed by Herbert Xu

crypto: qat - add support for shared ustore

Add support for shared ustore mode support. This is required by the next
generation of QAT devices to share the same fw image across engines.
Signed-off-by: default avatarJack Xu <jack.xu@intel.com>
Co-developed-by: default avatarWojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: default avatarWojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 244f572c
...@@ -34,6 +34,7 @@ struct icp_qat_fw_loader_chip_info { ...@@ -34,6 +34,7 @@ struct icp_qat_fw_loader_chip_info {
u32 wakeup_event_val; u32 wakeup_event_val;
bool fw_auth; bool fw_auth;
bool css_3k; bool css_3k;
bool tgroup_share_ustore;
u32 fcu_ctl_csr; u32 fcu_ctl_csr;
u32 fcu_sts_csr; u32 fcu_sts_csr;
u32 fcu_dram_addr_hi; u32 fcu_dram_addr_hi;
......
...@@ -707,6 +707,7 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle, ...@@ -707,6 +707,7 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle,
handle->chip_info->wakeup_event_val = WAKEUP_EVENT; handle->chip_info->wakeup_event_val = WAKEUP_EVENT;
handle->chip_info->fw_auth = true; handle->chip_info->fw_auth = true;
handle->chip_info->css_3k = false; handle->chip_info->css_3k = false;
handle->chip_info->tgroup_share_ustore = false;
handle->chip_info->fcu_ctl_csr = FCU_CONTROL; handle->chip_info->fcu_ctl_csr = FCU_CONTROL;
handle->chip_info->fcu_sts_csr = FCU_STATUS; handle->chip_info->fcu_sts_csr = FCU_STATUS;
handle->chip_info->fcu_dram_addr_hi = FCU_DRAM_ADDR_HI; handle->chip_info->fcu_dram_addr_hi = FCU_DRAM_ADDR_HI;
...@@ -725,6 +726,7 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle, ...@@ -725,6 +726,7 @@ static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle,
handle->chip_info->wakeup_event_val = WAKEUP_EVENT; handle->chip_info->wakeup_event_val = WAKEUP_EVENT;
handle->chip_info->fw_auth = false; handle->chip_info->fw_auth = false;
handle->chip_info->css_3k = false; handle->chip_info->css_3k = false;
handle->chip_info->tgroup_share_ustore = false;
handle->chip_info->fcu_ctl_csr = 0; handle->chip_info->fcu_ctl_csr = 0;
handle->chip_info->fcu_sts_csr = 0; handle->chip_info->fcu_sts_csr = 0;
handle->chip_info->fcu_dram_addr_hi = 0; handle->chip_info->fcu_dram_addr_hi = 0;
......
...@@ -1180,7 +1180,6 @@ static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle, ...@@ -1180,7 +1180,6 @@ static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle,
if (!suof_img_hdr) if (!suof_img_hdr)
return -ENOMEM; return -ENOMEM;
suof_handle->img_table.simg_hdr = suof_img_hdr; suof_handle->img_table.simg_hdr = suof_img_hdr;
}
for (i = 0; i < suof_handle->img_table.num_simgs; i++) { for (i = 0; i < suof_handle->img_table.num_simgs; i++) {
qat_uclo_map_simg(handle, &suof_img_hdr[i], qat_uclo_map_simg(handle, &suof_img_hdr[i],
...@@ -1193,8 +1192,12 @@ static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle, ...@@ -1193,8 +1192,12 @@ static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle,
if ((suof_img_hdr[i].ae_mask & 0x1) != 0) if ((suof_img_hdr[i].ae_mask & 0x1) != 0)
ae0_img = i; ae0_img = i;
} }
if (!handle->chip_info->tgroup_share_ustore) {
qat_uclo_tail_img(suof_img_hdr, ae0_img, qat_uclo_tail_img(suof_img_hdr, ae0_img,
suof_handle->img_table.num_simgs); suof_handle->img_table.num_simgs);
}
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment