Lines Matching refs:drom
379 struct tb_drom_header *header = (void *) sw->drom; in tb_drom_parse_entries()
385 struct tb_drom_entry_header *entry = (void *) (sw->drom + pos); in tb_drom_parse_entries()
420 sw->drom = kmalloc(len, GFP_KERNEL); in tb_drom_copy_efi()
421 if (!sw->drom) in tb_drom_copy_efi()
424 res = device_property_read_u8_array(dev, "ThunderboltDROM", sw->drom, in tb_drom_copy_efi()
429 *size = ((struct tb_drom_header *)sw->drom)->data_len + in tb_drom_copy_efi()
437 kfree(sw->drom); in tb_drom_copy_efi()
438 sw->drom = NULL; in tb_drom_copy_efi()
465 sw->drom = kzalloc(*size, GFP_KERNEL); in tb_drom_copy_nvm()
466 if (!sw->drom) in tb_drom_copy_nvm()
469 ret = dma_port_flash_read(sw->dma_port, drom_offset, sw->drom, *size); in tb_drom_copy_nvm()
481 kfree(sw->drom); in tb_drom_copy_nvm()
482 sw->drom = NULL; in tb_drom_copy_nvm()
496 if (sw->drom) in tb_drom_read()
549 sw->drom = kzalloc(size, GFP_KERNEL); in tb_drom_read()
550 if (!sw->drom) in tb_drom_read()
552 res = tb_eeprom_read_n(sw, drom_offset, sw->drom, size); in tb_drom_read()
557 header = (void *) sw->drom; in tb_drom_read()
576 crc = tb_crc32(sw->drom + TB_DROM_DATA_START, header->data_len); in tb_drom_read()
589 kfree(sw->drom); in tb_drom_read()
590 sw->drom = NULL; in tb_drom_read()