Lines Matching full:firmware

3  * ISH-TP client driver for ISH firmware loading
8 #include <linux/firmware.h>
15 /* Number of times we attempt to load the firmware before giving up */
23 * ISH Shim firmware loader reserves 4 Kb buffer in SRAM. The buffer is
25 * firmware loader. Reason for the odd size of 3968 bytes? Each IPC
34 * @LOADER_CMD_XFER_QUERY: Query the Shim firmware loader for
36 * @LOADER_CMD_XFER_FRAGMENT: Transfer one firmware image fragment at a
38 * multiple times until the entire firmware
40 * @LOADER_CMD_START: Start executing the main firmware.
53 * ISH firmware max delay for one transmit failure is 1 Hz,
54 * and firmware will retry 2 times, so 3 Hz is used for timeout.
62 * transfer data. This may use IPC or DMA if supported in firmware.
66 * LOADER_XFER_MODE_DIRECT_DMA - firmware loading is a bit different
71 * instead manage the DMA directly in kernel driver and Shim firmware
73 * to overcome 4 Kb limit, and optimize the data flow path in firmware.
89 * The firmware loading latency will be minimum if we can DMA the
90 * entire ISH firmware image in one go. This requires that we allocate
106 * between Host driver and ISH Shim firmware loader.
177 * struct response_info - Encapsulate firmware response related
180 * @data: Copy the data received from firmware here.
184 * @size: Actual size of data received from firmware.
187 * @received: Set to true on receiving a valid firmware
189 * @wait_queue: Wait queue for Host firmware loading where the
190 * client sends message to ISH firmware and waits
205 * @work_fw_load: Work queue for host firmware loading.
206 * @flag_retry: Flag for indicating host firmware loading should
217 * Used for passing firmware response information between
227 * subsystem and retry Host firmware loading (e.g. bad message
245 * get_firmware_variant() - Gets the filename of firmware image to be
248 * @filename: Returns firmware filename.
250 * Queries the firmware-name device property string.
261 rv = device_property_read_string(devc, "firmware-name", &val); in get_firmware_variant()
264 "Error: ISH firmware-name device property required\n"); in get_firmware_variant()
271 * loader_cl_send() - Send message from host to firmware
274 * @out_msg: Message buffer to be sent to firmware
353 "Previous firmware message not yet processed\n"); in process_recv()
358 * All firmware messages have a header. Check buffer size in process_recv()
403 /* We expect only "response" messages from firmware */ in process_recv()
423 * Copy the buffer received in firmware response for the in process_recv()
455 /* Process the data packet from firmware */ in loader_cl_event_cb()
461 * ish_query_loader_prop() - Query ISH Shim firmware loader
463 * @fw: Pointer to firmware data struct in host memory
464 * @fw_info: Loader firmware properties
466 * This function queries the ISH Shim firmware loader for capabilities.
471 const struct firmware *fw, in ish_query_loader_prop()
505 /* Loader firmware properties */ in ish_query_loader_prop()
525 "ISH firmware size %zu is greater than Shim firmware loader max supported %d\n", in ish_query_loader_prop()
535 "Shim firmware loader buffer size %d should be multiple of cacheline\n", in ish_query_loader_prop()
544 * ish_fw_xfer_ishtp() - Loads ISH firmware using ishtp interface
546 * @fw: Pointer to firmware data struct in host memory
548 * This function uses ISH-TP to transfer ISH firmware from host to
549 * ISH SRAM. Lower layers may use IPC or DMA depending on firmware
555 const struct firmware *fw) in ish_fw_xfer_ishtp()
574 /* Break the firmware image into fragments and send as ISH-TP payload */ in ish_fw_xfer_ishtp()
620 * ish_fw_xfer_direct_dma() - Loads ISH firmware using direct dma
622 * @fw: Pointer to firmware data struct in host memory
623 * @fw_info: Loader firmware properties
625 * Host firmware load is a unique case where we need to download
626 * a large firmware image (200+ Kb). This function implements
627 * direct DMA transfer in kernel and ISH firmware. This allows
630 * Function depends on corresponding support in ISH firmware.
635 const struct firmware *fw, in ish_fw_xfer_direct_dma()
650 * (1) Size of firmware to be loaded, in ish_fw_xfer_direct_dma()
651 * (2) Max DMA buffer size supported by Shim firmware, in ish_fw_xfer_direct_dma()
674 /* Send the firmware image in chucks of payload_max_size */ in ish_fw_xfer_direct_dma()
718 * ish_fw_start() - Start executing ISH main firmware
721 * This function sends message to Shim firmware loader to start
722 * the execution of ISH main firmware.
741 * load_fw_from_host() - Loads ISH firmware from host
744 * This function loads the ISH firmware to ISH SRAM and starts execution
753 const struct firmware *fw; in load_fw_from_host()
766 /* Get filename of the ISH firmware to be loaded */ in load_fw_from_host()
775 /* Step 1: Query Shim firmware loader properties */ in load_fw_from_host()
781 /* Step 2: Send the main firmware image to be loaded, to ISH SRAM */ in load_fw_from_host()
790 "No transfer mode selected in firmware\n"); in load_fw_from_host()
796 /* Step 3: Start ISH main firmware exeuction */ in load_fw_from_host()
803 dev_info(cl_data_to_dev(client_data), "ISH firmware %s loaded\n", in load_fw_from_host()
817 "ISH host firmware load failed %d. Resetting ISH, and trying again..\n", in load_fw_from_host()
822 "ISH host firmware load failed %d\n", rv); in load_fw_from_host()
858 /* Connect to firmware client */ in loader_init()
937 /* ISH firmware loading from host */ in reset_handler()
986 /* ISH firmware loading from host */ in loader_ishtp_cl_probe()
1063 MODULE_DESCRIPTION("ISH ISH-TP Host firmware Loader Client Driver");