Lines Matching refs:edma_cc
256 static struct edma *edma_cc[EDMA_MAX_CC]; variable
274 queue_no = edma_cc[ctlr]->default_queue; in map_dmach_queue()
327 edma_cc[ctlr]->intr_data[lch].callback = callback; in setup_dma_interrupt()
328 edma_cc[ctlr]->intr_data[lch].data = data; in setup_dma_interrupt()
340 if (irq >= edma_cc[0]->irq_res_start && irq <= edma_cc[0]->irq_res_end) in irq2ctlr()
342 else if (irq >= edma_cc[1]->irq_res_start && in irq2ctlr()
343 irq <= edma_cc[1]->irq_res_end) in irq2ctlr()
393 if (edma_cc[ctlr]->intr_data[channel].callback) in dma_irq_handler()
394 edma_cc[ctlr]->intr_data[channel].callback( in dma_irq_handler()
396 edma_cc[ctlr]->intr_data[channel].data); in dma_irq_handler()
446 if (edma_cc[ctlr]->intr_data[k]. in dma_ccerr_handler()
448 edma_cc[ctlr]->intr_data[k]. in dma_ccerr_handler()
451 edma_cc[ctlr]->intr_data in dma_ccerr_handler()
526 for (i = start_slot; i < edma_cc[ctlr]->num_slots; ++i) { in reserve_contiguous_slots()
528 if (!test_and_set_bit(j, edma_cc[ctlr]->edma_inuse)) { in reserve_contiguous_slots()
556 if (i == edma_cc[ctlr]->num_slots) in reserve_contiguous_slots()
561 clear_bit(j, edma_cc[ctlr]->edma_inuse); in reserve_contiguous_slots()
583 edma_cc[ctlr]->edma_unused); in prepare_unused_channel_list()
657 channel = find_next_bit(edma_cc[i]->edma_unused, in edma_alloc_channel()
658 edma_cc[i]->num_channels, in edma_alloc_channel()
660 if (channel == edma_cc[i]->num_channels) in edma_alloc_channel()
663 edma_cc[i]->edma_inuse)) { in edma_alloc_channel()
675 } else if (channel >= edma_cc[ctlr]->num_channels) { in edma_alloc_channel()
677 } else if (test_and_set_bit(channel, edma_cc[ctlr]->edma_inuse)) { in edma_alloc_channel()
718 if (channel >= edma_cc[ctlr]->num_channels) in edma_free_channel()
726 clear_bit(channel, edma_cc[ctlr]->edma_inuse); in edma_free_channel()
746 if (!edma_cc[ctlr]) in edma_alloc_slot()
753 slot = edma_cc[ctlr]->num_channels; in edma_alloc_slot()
755 slot = find_next_zero_bit(edma_cc[ctlr]->edma_inuse, in edma_alloc_slot()
756 edma_cc[ctlr]->num_slots, slot); in edma_alloc_slot()
757 if (slot == edma_cc[ctlr]->num_slots) in edma_alloc_slot()
759 if (!test_and_set_bit(slot, edma_cc[ctlr]->edma_inuse)) in edma_alloc_slot()
762 } else if (slot < edma_cc[ctlr]->num_channels || in edma_alloc_slot()
763 slot >= edma_cc[ctlr]->num_slots) { in edma_alloc_slot()
765 } else if (test_and_set_bit(slot, edma_cc[ctlr]->edma_inuse)) { in edma_alloc_slot()
791 if (slot < edma_cc[ctlr]->num_channels || in edma_free_slot()
792 slot >= edma_cc[ctlr]->num_slots) in edma_free_slot()
797 clear_bit(slot, edma_cc[ctlr]->edma_inuse); in edma_free_slot()
835 (slot < edma_cc[ctlr]->num_channels || in edma_alloc_cont_slots()
836 slot >= edma_cc[ctlr]->num_slots)) in edma_alloc_cont_slots()
845 (edma_cc[ctlr]->num_slots - edma_cc[ctlr]->num_channels)) in edma_alloc_cont_slots()
851 edma_cc[ctlr]->num_channels); in edma_alloc_cont_slots()
883 if (slot < edma_cc[ctlr]->num_channels || in edma_free_cont_slots()
884 slot >= edma_cc[ctlr]->num_slots || in edma_free_cont_slots()
894 clear_bit(slot_to_free, edma_cc[ctlr]->edma_inuse); in edma_free_cont_slots()
924 if (slot < edma_cc[ctlr]->num_slots) { in edma_set_src()
962 if (slot < edma_cc[ctlr]->num_slots) { in edma_set_dest()
1022 if (slot < edma_cc[ctlr]->num_slots) { in edma_set_src_index()
1048 if (slot < edma_cc[ctlr]->num_slots) { in edma_set_dest_index()
1095 if (slot < edma_cc[ctlr]->num_slots) { in edma_set_transfer_params()
1125 if (from >= edma_cc[ctlr_from]->num_slots) in edma_link()
1127 if (to >= edma_cc[ctlr_to]->num_slots) in edma_link()
1148 if (from >= edma_cc[ctlr]->num_slots) in edma_unlink()
1175 if (slot >= edma_cc[ctlr]->num_slots) in edma_write_slot()
1197 if (slot >= edma_cc[ctlr]->num_slots) in edma_read_slot()
1222 if (channel < edma_cc[ctlr]->num_channels) { in edma_pause()
1243 if (channel < edma_cc[ctlr]->num_channels) { in edma_resume()
1269 if (channel < edma_cc[ctlr]->num_channels) { in edma_start()
1274 if (test_bit(channel, edma_cc[ctlr]->edma_unused)) { in edma_start()
1315 if (channel < edma_cc[ctlr]->num_channels) { in edma_stop()
1354 if (channel < edma_cc[ctlr]->num_channels) { in edma_clean_channel()
1382 if (channel >= edma_cc[ctlr]->num_channels) in edma_clear_event()
1440 edma_cc[j] = kzalloc(sizeof(struct edma), GFP_KERNEL); in edma_probe()
1441 if (!edma_cc[j]) { in edma_probe()
1446 edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel, in edma_probe()
1448 edma_cc[j]->num_slots = min_t(unsigned, info[j]->n_slot, in edma_probe()
1450 edma_cc[j]->num_cc = min_t(unsigned, info[j]->n_cc, in edma_probe()
1453 edma_cc[j]->default_queue = info[j]->default_queue; in edma_probe()
1458 for (i = 0; i < edma_cc[j]->num_slots; i++) in edma_probe()
1463 memset(edma_cc[j]->edma_unused, 0xff, in edma_probe()
1464 sizeof(edma_cc[j]->edma_unused)); in edma_probe()
1475 edma_cc[j]->edma_unused); in edma_probe()
1486 edma_cc[j]->edma_inuse); in edma_probe()
1493 edma_cc[j]->irq_res_start = irq[j]; in edma_probe()
1504 edma_cc[j]->irq_res_end = err_irq[j]; in edma_probe()
1513 for (i = 0; i < edma_cc[j]->num_channels; i++) in edma_probe()
1576 kfree(edma_cc[i]); in edma_probe()