Lines Matching full:metadata
95 static int usb4_switch_op_read_metadata(struct tb_switch *sw, u32 *metadata) in usb4_switch_op_read_metadata() argument
97 return tb_sw_read(sw, metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_switch_op_read_metadata()
100 static int usb4_switch_op_write_metadata(struct tb_switch *sw, u32 metadata) in usb4_switch_op_write_metadata() argument
102 return tb_sw_write(sw, &metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_switch_op_write_metadata()
344 u32 metadata; in usb4_switch_drom_read_block() local
347 metadata = (dwords << USB4_DROM_SIZE_SHIFT) & USB4_DROM_SIZE_MASK; in usb4_switch_drom_read_block()
348 metadata |= (dwaddress << USB4_DROM_ADDRESS_SHIFT) & in usb4_switch_drom_read_block()
351 ret = usb4_switch_op_write_metadata(sw, metadata); in usb4_switch_drom_read_block()
511 u32 metadata; in usb4_switch_nvm_sector_size() local
522 ret = usb4_switch_op_read_metadata(sw, &metadata); in usb4_switch_nvm_sector_size()
526 return metadata & USB4_NVM_SECTOR_SIZE_MASK; in usb4_switch_nvm_sector_size()
534 u32 metadata; in usb4_switch_nvm_read_block() local
537 metadata = (dwords << USB4_NVM_READ_LENGTH_SHIFT) & in usb4_switch_nvm_read_block()
539 metadata |= (dwaddress << USB4_NVM_READ_OFFSET_SHIFT) & in usb4_switch_nvm_read_block()
542 ret = usb4_switch_op_write_metadata(sw, metadata); in usb4_switch_nvm_read_block()
576 u32 metadata, dwaddress; in usb4_switch_nvm_set_offset() local
581 metadata = (dwaddress << USB4_NVM_SET_OFFSET_SHIFT) & in usb4_switch_nvm_set_offset()
584 ret = usb4_switch_op_write_metadata(sw, metadata); in usb4_switch_nvm_set_offset()
1193 u32 metadata; in usb4_port_retimer_is_last() local
1201 ret = usb4_port_retimer_read(port, index, USB4_SB_METADATA, &metadata, in usb4_port_retimer_is_last()
1202 sizeof(metadata)); in usb4_port_retimer_is_last()
1203 return ret ? ret : metadata & 1; in usb4_port_retimer_is_last()
1219 u32 metadata; in usb4_port_retimer_nvm_sector_size() local
1227 ret = usb4_port_retimer_read(port, index, USB4_SB_METADATA, &metadata, in usb4_port_retimer_nvm_sector_size()
1228 sizeof(metadata)); in usb4_port_retimer_nvm_sector_size()
1229 return ret ? ret : metadata & USB4_NVM_SECTOR_SIZE_MASK; in usb4_port_retimer_nvm_sector_size()
1235 u32 metadata, dwaddress; in usb4_port_retimer_nvm_set_offset() local
1239 metadata = (dwaddress << USB4_NVM_SET_OFFSET_SHIFT) & in usb4_port_retimer_nvm_set_offset()
1242 ret = usb4_port_retimer_write(port, index, USB4_SB_METADATA, &metadata, in usb4_port_retimer_nvm_set_offset()
1243 sizeof(metadata)); in usb4_port_retimer_nvm_set_offset()
1330 * @status: Raw status code read from metadata
1336 * completion metadata (the result) is then stored into @status. If
1342 u32 metadata, val; in usb4_port_retimer_nvm_authenticate_status() local
1357 &metadata, sizeof(metadata)); in usb4_port_retimer_nvm_authenticate_status()
1361 *status = metadata & USB4_SB_METADATA_NVM_AUTH_WRITE_MASK; in usb4_port_retimer_nvm_authenticate_status()
1378 u32 metadata; in usb4_port_retimer_nvm_read_block() local
1381 metadata = dwaddress << USB4_NVM_READ_OFFSET_SHIFT; in usb4_port_retimer_nvm_read_block()
1383 metadata |= dwords << USB4_NVM_READ_LENGTH_SHIFT; in usb4_port_retimer_nvm_read_block()
1385 ret = usb4_port_retimer_write(port, index, USB4_SB_METADATA, &metadata, in usb4_port_retimer_nvm_read_block()
1386 sizeof(metadata)); in usb4_port_retimer_nvm_read_block()