Lines Matching refs:cycle
477 static unsigned int compute_syt_offset(unsigned int syt, unsigned int cycle, in compute_syt_offset() argument
480 unsigned int cycle_lo = (cycle % CYCLES_PER_SECOND) & 0x0f; in compute_syt_offset()
527 dst->syt_offset = compute_syt_offset(src->syt, src->cycle, transfer_delay); in cache_seq()
680 static void build_it_pkt_header(struct amdtp_stream *s, unsigned int cycle, in build_it_pkt_header() argument
700 trace_amdtp_packet(s, cycle, cip_header, payload_length + header_length, data_blocks, in build_it_pkt_header()
799 static int parse_ir_ctx_header(struct amdtp_stream *s, unsigned int cycle, in parse_ir_ctx_header() argument
848 trace_amdtp_packet(s, cycle, cip_header, payload_length, *data_blocks, in parse_ir_ctx_header()
868 static inline u32 increment_ohci_cycle_count(u32 cycle, unsigned int addend) in increment_ohci_cycle_count() argument
870 cycle += addend; in increment_ohci_cycle_count()
871 if (cycle >= OHCI_SECOND_MODULUS * CYCLES_PER_SECOND) in increment_ohci_cycle_count()
872 cycle -= OHCI_SECOND_MODULUS * CYCLES_PER_SECOND; in increment_ohci_cycle_count()
873 return cycle; in increment_ohci_cycle_count()
901 u32 cycle = compute_ohci_cycle_count(ctx_header_tstamp); in compute_ohci_it_cycle() local
902 return increment_ohci_cycle_count(cycle, queue_size); in compute_ohci_it_cycle()
922 unsigned int cycle; in generate_tx_packet_descs() local
927 cycle = compute_ohci_cycle_count(ctx_header[1]); in generate_tx_packet_descs()
928 lost = (next_cycle != cycle); in generate_tx_packet_descs()
936 lost = (next_cycle != cycle); in generate_tx_packet_descs()
940 desc->cycle = prev_cycle; in generate_tx_packet_descs()
954 lost = (compare_ohci_cycle_count(safe_cycle, cycle) < 0); in generate_tx_packet_descs()
958 next_cycle, cycle); in generate_tx_packet_descs()
963 err = parse_ir_ctx_header(s, cycle, ctx_header, &data_blocks, &dbc, &syt, in generate_tx_packet_descs()
968 desc->cycle = cycle; in generate_tx_packet_descs()
990 static unsigned int compute_syt(unsigned int syt_offset, unsigned int cycle, in compute_syt() argument
996 syt = ((cycle + syt_offset / TICKS_PER_CYCLE) << 12) | in compute_syt()
1017 desc->cycle = compute_ohci_it_cycle(*ctx_header, s->queue_size); in generate_rx_packet_descs()
1020 desc->syt = compute_syt(seq->syt_offset, desc->cycle, s->transfer_delay); in generate_rx_packet_descs()
1070 latest_cycle = desc->cycle; in compute_pcm_extra_delay()
1185 build_it_pkt_header(s, desc->cycle, &template.params, pkt_header_length, in process_rx_packets()
1216 unsigned int cycle; in skip_rx_packets() local
1224 cycle = compute_ohci_it_cycle(ctx_header[packets - 1], s->queue_size); in skip_rx_packets()
1225 s->next_cycle = increment_ohci_cycle_count(cycle, 1); in skip_rx_packets()
1261 unsigned int cycle = compute_ohci_it_cycle(ctx_header[offset], queue_size); in process_rx_packets_intermediately() local
1263 if (compare_ohci_cycle_count(cycle, d->processing_cycle.rx_start) >= 0) in process_rx_packets_intermediately()
1351 unsigned int cycle; in drop_tx_packets() local
1360 cycle = compute_ohci_cycle_count(ctx_header[1]); in drop_tx_packets()
1361 s->next_cycle = increment_ohci_cycle_count(cycle, 1); in drop_tx_packets()
1390 unsigned int cycle = compute_ohci_cycle_count(ctx_header[1]); in process_tx_packets_intermediately() local
1392 if (compare_ohci_cycle_count(cycle, d->processing_cycle.tx_start) >= 0) in process_tx_packets_intermediately()
1486 unsigned int cycle = UINT_MAX; in drop_tx_packets_initially() local
1505 if (cycle == UINT_MAX || in drop_tx_packets_initially()
1506 compare_ohci_cycle_count(next_cycle, cycle) > 0) in drop_tx_packets_initially()
1507 cycle = next_cycle; in drop_tx_packets_initially()
1512 d->processing_cycle.tx_start = cycle; in drop_tx_packets_initially()
1597 unsigned int cycle = s->next_cycle; in irq_target_callback_skip() local
1602 if (compare_ohci_cycle_count(s->next_cycle, cycle) > 0) in irq_target_callback_skip()
1603 cycle = s->next_cycle; in irq_target_callback_skip()
1611 d->processing_cycle.rx_start = cycle; in irq_target_callback_skip()