Lines Matching refs:rx_dma_params

72 	struct uart_npcx_rx_dma_params rx_dma_params;  member
431 struct uart_npcx_rx_dma_params *rx_dma_params = &data->async.rx_dma_params; in async_evt_rx_rdy() local
434 .data.rx.buf = rx_dma_params->buf, in async_evt_rx_rdy()
435 .data.rx.len = rx_dma_params->counter - rx_dma_params->offset, in async_evt_rx_rdy()
436 .data.rx.offset = rx_dma_params->offset}; in async_evt_rx_rdy()
442 rx_dma_params->offset = rx_dma_params->counter; in async_evt_rx_rdy()
483 struct uart_npcx_rx_dma_params *rx_dma_params = &data->async.rx_dma_params; in uart_npcx_async_rx_flush() local
487 curr_rcv_len = rx_dma_params->buf_len - dma_pending_len; in uart_npcx_async_rx_flush()
489 if (curr_rcv_len > rx_dma_params->offset) { in uart_npcx_async_rx_flush()
490 rx_dma_params->counter = curr_rcv_len; in uart_npcx_async_rx_flush()
641 struct uart_npcx_rx_dma_params *rx_dma_params = &data->async.rx_dma_params; in uart_npcx_async_rx_enable() local
651 rx_dma_params->timeout_us = timeout_us; in uart_npcx_async_rx_enable()
652 rx_dma_params->buf = buf; in uart_npcx_async_rx_enable()
653 rx_dma_params->buf_len = len; in uart_npcx_async_rx_enable()
655 rx_dma_params->offset = 0; in uart_npcx_async_rx_enable()
656 rx_dma_params->counter = 0; in uart_npcx_async_rx_enable()
666 rx_dma_params->enabled = true; in uart_npcx_async_rx_enable()
682 .data.rx_buf.buf = data->async.rx_dma_params.buf, in async_evt_rx_buf_release()
686 data->async.rx_dma_params.buf = NULL; in async_evt_rx_buf_release()
687 data->async.rx_dma_params.buf_len = 0U; in async_evt_rx_buf_release()
688 data->async.rx_dma_params.offset = 0U; in async_evt_rx_buf_release()
689 data->async.rx_dma_params.counter = 0U; in async_evt_rx_buf_release()
698 struct uart_npcx_rx_dma_params *rx_dma_params = &data->async.rx_dma_params; in uart_npcx_async_rx_disable() local
706 k_work_cancel_delayable(&rx_dma_params->timeout_work); in uart_npcx_async_rx_disable()
708 if (rx_dma_params->buf == NULL) { in uart_npcx_async_rx_disable()
715 rx_dma_params->enabled = false; in uart_npcx_async_rx_disable()
718 rx_dma_params->buf = data->async.next_rx_buffer; in uart_npcx_async_rx_disable()
719 rx_dma_params->buf_len = data->async.next_rx_buffer_len; in uart_npcx_async_rx_disable()
743 } else if (data->async.rx_dma_params.enabled == false) { in uart_npcx_async_rx_buf_rsp()
761 CONTAINER_OF(rx_params, struct uart_npcx_async_data, rx_dma_params); in uart_npcx_async_rx_timeout()
774 struct uart_npcx_rx_dma_params *rx_dma_params = &data->async.rx_dma_params; in uart_npcx_async_dma_load_new_rx_buf() local
776 rx_dma_params->offset = 0; in uart_npcx_async_dma_load_new_rx_buf()
777 rx_dma_params->counter = 0; in uart_npcx_async_dma_load_new_rx_buf()
779 rx_dma_params->buf = data->async.next_rx_buffer; in uart_npcx_async_dma_load_new_rx_buf()
780 rx_dma_params->buf_len = data->async.next_rx_buffer_len; in uart_npcx_async_dma_load_new_rx_buf()
784 mdma_reg_base->MDMA_DSTB0 = (uint32_t)rx_dma_params->buf; in uart_npcx_async_dma_load_new_rx_buf()
785 mdma_reg_base->MDMA_TCNT0 = rx_dma_params->buf_len; in uart_npcx_async_dma_load_new_rx_buf()
794 struct uart_npcx_rx_dma_params *rx_dma_params = &data->async.rx_dma_params; in uart_npcx_async_dma_rx_complete() local
796 rx_dma_params->counter = rx_dma_params->buf_len; in uart_npcx_async_dma_rx_complete()
806 async_timer_start(&rx_dma_params->timeout_work, rx_dma_params->timeout_us); in uart_npcx_async_dma_rx_complete()
852 if (data->async.rx_dma_params.timeout_us == 0) { in uart_npcx_isr()
855 async_timer_start(&data->async.rx_dma_params.timeout_work, in uart_npcx_isr()
856 data->async.rx_dma_params.timeout_us); in uart_npcx_isr()
1080 k_work_init_delayable(&data->async.rx_dma_params.timeout_work, uart_npcx_async_rx_timeout); in uart_npcx_init()