Lines Matching refs:host_image
24 u32 image_size, struct host_image_st *host_image) in check_image_valid() argument
46 host_image->image_section_info[i] = fw_image->fw_section_info[i]; in check_image_valid()
55 host_image->image_info.up_total_len = fw_image->fw_len; in check_image_valid()
56 host_image->image_info.fw_version = fw_image->fw_version; in check_image_valid()
57 host_image->section_type_num = fw_image->fw_info.fw_section_cnt; in check_image_valid()
58 host_image->device_id = fw_image->device_id; in check_image_valid()
64 struct host_image_st *host_image, in check_image_integrity() argument
70 for (i = 0; i < host_image->section_type_num; i++) { in check_image_integrity()
71 type = host_image->image_section_info[i].fw_section_type; in check_image_integrity()
123 struct host_image_st *host_image) in hinic_flash_fw() argument
137 up_total_len = host_image->image_info.up_total_len; in hinic_flash_fw()
139 for (i = 0; i < host_image->section_type_num; i++) { in hinic_flash_fw()
140 len = host_image->image_section_info[i].fw_section_len; in hinic_flash_fw()
141 if (host_image->image_section_info[i].fw_section_type == in hinic_flash_fw()
148 for (i = 0; i < host_image->section_type_num; i++) { in hinic_flash_fw()
150 host_image->image_section_info[i].fw_section_len; in hinic_flash_fw()
152 host_image->image_section_info[i].fw_section_offset; in hinic_flash_fw()
155 host_image->image_section_info[i].fw_section_type; in hinic_flash_fw()
156 section_crc = host_image->image_section_info[i].fw_section_crc; in hinic_flash_fw()
158 host_image->image_section_info[i].fw_section_version; in hinic_flash_fw()
246 struct host_image_st host_image; in hinic_firmware_update() local
249 memset(&host_image, 0, sizeof(struct host_image_st)); in hinic_firmware_update()
251 if (!check_image_valid(priv, fw->data, fw->size, &host_image) || in hinic_firmware_update()
252 !check_image_integrity(priv, &host_image, FW_UPDATE_COLD) || in hinic_firmware_update()
253 !check_image_device_type(priv, host_image.device_id)) { in hinic_firmware_update()
260 err = hinic_flash_fw(priv, fw->data, &host_image); in hinic_firmware_update()