Lines Matching refs:channel
308 struct bdma_stm32_channel *channel; in bdma_stm32_irq_handler() local
313 channel = &config->channels[id]; in bdma_stm32_irq_handler()
316 if ((channel->hal_override != true) && (channel->busy == false)) { in bdma_stm32_irq_handler()
326 callback_arg = channel->mux_channel; in bdma_stm32_irq_handler()
335 if (!channel->hal_override) { in bdma_stm32_irq_handler()
338 channel->bdma_callback(dev, channel->user_data, callback_arg, 0); in bdma_stm32_irq_handler()
341 if (!channel->cyclic) { in bdma_stm32_irq_handler()
342 channel->busy = false; in bdma_stm32_irq_handler()
345 if (!channel->hal_override) { in bdma_stm32_irq_handler()
348 channel->bdma_callback(dev, channel->user_data, callback_arg, 0); in bdma_stm32_irq_handler()
351 channel->busy = false; in bdma_stm32_irq_handler()
354 channel->bdma_callback(dev, channel->user_data, in bdma_stm32_irq_handler()
485 struct bdma_stm32_channel *channel = in bdma_stm32_configure() local
499 if (channel->busy) { in bdma_stm32_configure()
549 channel->busy = true; in bdma_stm32_configure()
550 channel->bdma_callback = config->dma_callback; in bdma_stm32_configure()
551 channel->direction = config->channel_direction; in bdma_stm32_configure()
552 channel->user_data = config->user_data; in bdma_stm32_configure()
553 channel->src_size = config->source_data_size; in bdma_stm32_configure()
554 channel->dst_size = config->dest_data_size; in bdma_stm32_configure()
555 channel->cyclic = config->head_block->source_reload_en; in bdma_stm32_configure()
567 if (channel->direction == MEMORY_TO_PERIPHERAL || channel->direction == MEMORY_TO_MEMORY) { in bdma_stm32_configure()
574 if (channel->direction == PERIPHERAL_TO_MEMORY || channel->direction == MEMORY_TO_MEMORY) { in bdma_stm32_configure()
582 if (channel->direction == MEMORY_TO_PERIPHERAL) { in bdma_stm32_configure()
636 if (channel->cyclic) { in bdma_stm32_configure()
642 channel->source_periph = (channel->direction == PERIPHERAL_TO_MEMORY); in bdma_stm32_configure()
650 if (channel->source_periph) { in bdma_stm32_configure()
670 if (channel->cyclic) { in bdma_stm32_configure()
683 struct bdma_stm32_channel *channel; in bdma_stm32_reload() local
689 channel = &config->channels[id]; in bdma_stm32_reload()
695 switch (channel->direction) { in bdma_stm32_reload()
709 if (channel->source_periph) { in bdma_stm32_reload()
711 size / channel->src_size); in bdma_stm32_reload()
714 size / channel->dst_size); in bdma_stm32_reload()
718 channel->busy = true; in bdma_stm32_reload()
729 struct bdma_stm32_channel *channel; in bdma_stm32_start() local
742 channel = &config->channels[id]; in bdma_stm32_start()
743 channel->busy = true; in bdma_stm32_start()
754 struct bdma_stm32_channel *channel = &config->channels[id]; in bdma_stm32_stop() local
761 if (channel->hal_override) { in bdma_stm32_stop()
762 channel->busy = false; in bdma_stm32_stop()
779 channel->busy = false; in bdma_stm32_stop()
838 struct bdma_stm32_channel *channel; in bdma_stm32_get_status() local
844 channel = &config->channels[id]; in bdma_stm32_get_status()
846 stat->dir = channel->direction; in bdma_stm32_get_status()
847 stat->busy = channel->busy; in bdma_stm32_get_status()