Lines Matching refs:drom

409 	struct tb_drom_header *header = (void *) sw->drom;  in tb_drom_parse_entries()
415 struct tb_drom_entry_header *entry = (void *) (sw->drom + pos); in tb_drom_parse_entries()
450 sw->drom = kmalloc(len, GFP_KERNEL); in tb_drom_copy_efi()
451 if (!sw->drom) in tb_drom_copy_efi()
454 res = device_property_read_u8_array(dev, "ThunderboltDROM", sw->drom, in tb_drom_copy_efi()
459 *size = ((struct tb_drom_header *)sw->drom)->data_len + in tb_drom_copy_efi()
467 kfree(sw->drom); in tb_drom_copy_efi()
468 sw->drom = NULL; in tb_drom_copy_efi()
495 sw->drom = kzalloc(*size, GFP_KERNEL); in tb_drom_copy_nvm()
496 if (!sw->drom) in tb_drom_copy_nvm()
499 ret = dma_port_flash_read(sw->dma_port, drom_offset, sw->drom, *size); in tb_drom_copy_nvm()
511 kfree(sw->drom); in tb_drom_copy_nvm()
512 sw->drom = NULL; in tb_drom_copy_nvm()
526 sw->drom = kzalloc(*size, GFP_KERNEL); in usb4_copy_host_drom()
527 if (!sw->drom) in usb4_copy_host_drom()
530 ret = usb4_switch_drom_read(sw, 0, sw->drom, *size); in usb4_copy_host_drom()
532 kfree(sw->drom); in usb4_copy_host_drom()
533 sw->drom = NULL; in usb4_copy_host_drom()
550 (const struct tb_drom_header *)sw->drom; in tb_drom_parse()
565 crc = tb_crc32(sw->drom + TB_DROM_DATA_START, header->data_len); in tb_drom_parse()
578 (const struct tb_drom_header *)sw->drom; in usb4_drom_parse()
581 crc = tb_crc32(sw->drom + TB_DROM_DATA_START, header->data_len); in usb4_drom_parse()
608 if (sw->drom) in tb_drom_read()
654 sw->drom = kzalloc(size, GFP_KERNEL); in tb_drom_read()
655 if (!sw->drom) in tb_drom_read()
658 res = tb_drom_read_n(sw, 0, sw->drom, size); in tb_drom_read()
663 header = (void *) sw->drom; in tb_drom_read()
700 kfree(sw->drom); in tb_drom_read()
701 sw->drom = NULL; in tb_drom_read()