Lines Matching refs:crc5
601 static uint8_t i3c_cdns_crc5(uint8_t crc5, uint16_t word) in i3c_cdns_crc5() argument
612 crc0 = ((word >> i) ^ (crc5 >> 4)) & 0x1; in i3c_cdns_crc5()
613 crc5 = ((crc5 << 1) & 0x1a) | (((crc5 >> 1) ^ crc0) << 2) | crc0; in i3c_cdns_crc5()
616 return crc5 & 0x1f; in i3c_cdns_crc5()
872 uint8_t crc5 = 0x1F; in cdns_i3c_read_rx_fifo_ddr_xfer() local
878 crc5 = i3c_cdns_crc5(crc5, (uint16_t)DDR_DATA(ddr_header)); in cdns_i3c_read_rx_fifo_ddr_xfer()
890 crc5 = i3c_cdns_crc5(crc5, (uint16_t)DDR_DATA(val)); in cdns_i3c_read_rx_fifo_ddr_xfer()
895 if (crc5 != crc) { in cdns_i3c_read_rx_fifo_ddr_xfer()
2264 uint8_t crc5 = 0x1F; in cdns_i3c_transfer() local
2272 crc5 = i3c_cdns_crc5(crc5, ddr_header_payload); in cdns_i3c_transfer()
2274 crc5 = i3c_cdns_crc5( in cdns_i3c_transfer()
2275 crc5, in cdns_i3c_transfer()
2278 cmd->ddr_crc = DDR_PREAMBLE_CMD_CRC | DDR_CRC_TOKEN | (crc5 << 9) | in cdns_i3c_transfer()
2644 uint8_t crc5 = 0x1F; in cdns_i3c_irq_handler() local
2661 crc5 = i3c_cdns_crc5(crc5, ddr_payload); in cdns_i3c_irq_handler()
2677 if (crc5 != DDR_CRC(ddr_rx_data)) { in cdns_i3c_irq_handler()
2685 crc5 = i3c_cdns_crc5(crc5, ddr_header_payload); in cdns_i3c_irq_handler()
2821 uint8_t crc5 = 0x1F; in cdns_i3c_target_tx_ddr_write() local
2838 crc5 = i3c_cdns_crc5(crc5, ddr_payload_header); in cdns_i3c_target_tx_ddr_write()
2847 crc5 = i3c_cdns_crc5(crc5, sys_get_be16(&buf[i])); in cdns_i3c_target_tx_ddr_write()
2852 sys_write32(DDR_PREAMBLE_CMD_CRC | DDR_CRC_TOKEN | crc5 << 9, in cdns_i3c_target_tx_ddr_write()