Lines Matching refs:fw
233 const struct firmware *fw);
235 const struct firmware *fw);
802 static int build_i2c_fw_hdr(u8 *header, const struct firmware *fw) in build_i2c_fw_hdr() argument
811 struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data; in build_i2c_fw_hdr()
844 img_header = (struct ti_i2c_image_header *)&fw->data[4]; in build_i2c_fw_hdr()
847 &fw->data[4 + sizeof(struct ti_i2c_image_header)], in build_i2c_fw_hdr()
966 const struct firmware *fw) in check_fw_sanity() argument
972 struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data; in check_fw_sanity()
974 if (fw->size < sizeof(struct edgeport_fw_hdr)) { in check_fw_sanity()
982 if (fw->size != length_total) { in check_fw_sanity()
984 length_total, fw->size); in check_fw_sanity()
988 for (pos = sizeof(struct edgeport_fw_hdr); pos < fw->size; ++pos) in check_fw_sanity()
989 checksum += fw->data[pos]; in check_fw_sanity()
1011 const struct firmware *fw; in download_fw() local
1015 status = request_firmware(&fw, fw_name, dev); in download_fw()
1022 if (check_fw_sanity(serial, fw)) { in download_fw()
1027 fw_hdr = (struct edgeport_fw_hdr *)fw->data; in download_fw()
1061 status = do_download_mode(serial, fw); in download_fw()
1065 status = do_boot_mode(serial, fw); in download_fw()
1069 release_firmware(fw); in download_fw()
1074 const struct firmware *fw) in do_download_mode() argument
1082 struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data; in do_download_mode()
1304 status = build_i2c_fw_hdr(header, fw); in do_download_mode()
1386 const struct firmware *fw) in do_boot_mode() argument
1391 struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data; in do_boot_mode()
1470 memcpy(buffer, &fw->data[4], fw->size - 4); in do_boot_mode()