Home | History | Annotate | Download | only in i2c

Lines Matching refs:xcfw

269 xc3028_dump_fw(struct xc3028 *xc, struct xc3028_fw *xcfw, const char *type)
274 if (xcfw == NULL) {
279 if (xcfw->type & (1 << i))
282 if (xcfw->type & (1 << 30))
283 printf("_%d", xcfw->int_freq);
284 if (xcfw->id)
285 printf(" id=%" PRIx64, xcfw->id);
286 printf(" size=%u\n", xcfw->data_size);
296 struct xc3028_fw *xcfw;
318 xcfw = &xc->fw[index];
323 xcfw->type = le32dec(p);
324 p += sizeof(xcfw->type);
326 xcfw->id = le64dec(p);
327 p += sizeof(xcfw->id);
329 if (xcfw->type & XC3028_FW_HAS_IF) {
330 xcfw->int_freq = le16dec(p);
331 p += sizeof(xcfw->int_freq);
332 if ((uint32_t)(endp - p) < sizeof(xcfw->data_size))
336 xcfw->data_size = le32dec(p);
337 p += sizeof(xcfw->data_size);
339 if (xcfw->data_size == 0 ||
340 xcfw->data_size > (uint32_t)(endp - p))
342 xcfw->data = kmem_alloc(xcfw->data_size, KM_SLEEP);
343 memcpy(xcfw->data, p, xcfw->data_size);
344 p += xcfw->data_size;
362 xc3028_firmware_upload(struct xc3028 *xc, struct xc3028_fw *xcfw)
364 const uint8_t *fw = xcfw->data, *p;
365 uint32_t fwlen = xcfw->data_size;
419 xc3028_scode_upload(struct xc3028 *xc, struct xc3028_fw *xcfw)
425 if (xcfw->data_size < 12)
430 error = xc3028_write_buffer(xc, xcfw->data, 12);