Lines Matching refs:firmware
380 int qe_upload_firmware(const struct qe_firmware *firmware) in qe_upload_firmware() argument
395 if (!firmware) { in qe_upload_firmware()
400 hdr = &firmware->header; in qe_upload_firmware()
420 if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) { in qe_upload_firmware()
426 calc_size += (firmware->count - 1) * sizeof(struct qe_microcode); in qe_upload_firmware()
428 for (i = 0; i < firmware->count; i++) in qe_upload_firmware()
435 be32_to_cpu(firmware->microcode[i].count); in qe_upload_firmware()
447 crc = be32_to_cpu(*(u32 *)((void *)firmware + calc_size)); in qe_upload_firmware()
448 if (crc != (crc32(-1, (const void *) firmware, calc_size) ^ -1)) { in qe_upload_firmware()
456 if (!firmware->split) { in qe_upload_firmware()
461 if (firmware->soc.model) in qe_upload_firmware()
463 firmware->id, be16_to_cpu(firmware->soc.model), in qe_upload_firmware()
464 firmware->soc.major, firmware->soc.minor); in qe_upload_firmware()
466 printf("Firmware '%s'\n", firmware->id); in qe_upload_firmware()
473 strncpy(qe_firmware_info.id, (char *)firmware->id, 62); in qe_upload_firmware()
474 qe_firmware_info.extended_modes = firmware->extended_modes; in qe_upload_firmware()
475 memcpy(qe_firmware_info.vtraps, firmware->vtraps, in qe_upload_firmware()
476 sizeof(firmware->vtraps)); in qe_upload_firmware()
480 for (i = 0; i < firmware->count; i++) { in qe_upload_firmware()
481 const struct qe_microcode *ucode = &firmware->microcode[i]; in qe_upload_firmware()
485 qe_upload_microcode(firmware, ucode); in qe_upload_firmware()
519 int u_qe_upload_firmware(const struct qe_firmware *firmware) in u_qe_upload_firmware() argument
534 if (!firmware) { in u_qe_upload_firmware()
539 hdr = &firmware->header; in u_qe_upload_firmware()
559 if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) { in u_qe_upload_firmware()
565 calc_size += (firmware->count - 1) * sizeof(struct qe_microcode); in u_qe_upload_firmware()
567 for (i = 0; i < firmware->count; i++) in u_qe_upload_firmware()
574 be32_to_cpu(firmware->microcode[i].count); in u_qe_upload_firmware()
586 crc = be32_to_cpu(*(u32 *)((void *)firmware + calc_size)); in u_qe_upload_firmware()
587 if (crc != (crc32(-1, (const void *)firmware, calc_size) ^ -1)) { in u_qe_upload_firmware()
595 if (!firmware->split) { in u_qe_upload_firmware()
600 if (firmware->soc.model) in u_qe_upload_firmware()
602 firmware->id, be16_to_cpu(firmware->soc.model), in u_qe_upload_firmware()
603 firmware->soc.major, firmware->soc.minor); in u_qe_upload_firmware()
605 printf("Firmware '%s'\n", firmware->id); in u_qe_upload_firmware()
608 for (i = 0; i < firmware->count; i++) { in u_qe_upload_firmware()
609 const struct qe_microcode *ucode = &firmware->microcode[i]; in u_qe_upload_firmware()
613 qe_upload_microcode(firmware, ucode); in u_qe_upload_firmware()
632 int u_qe_firmware_resume(const struct qe_firmware *firmware, qe_map_t *qe_immrr) in u_qe_firmware_resume() argument
646 if (!firmware) in u_qe_firmware_resume()
649 hdr = &firmware->header; in u_qe_firmware_resume()
663 if (!firmware->split) { in u_qe_firmware_resume()
669 for (i = 0; i < firmware->count; i++) { in u_qe_firmware_resume()
670 const struct qe_microcode *ucode = &firmware->microcode[i]; in u_qe_firmware_resume()
676 code = (const void *)firmware + be32_to_cpu(ucode->code_offset); in u_qe_firmware_resume()
728 struct qe_firmware *firmware = (void *) addr; in qe_cmd() local
730 if (length != be32_to_cpu(firmware->header.length)) { in qe_cmd()