Lines Matching refs:xfer

152 	sedi_uart_transfer_t xfer;  member
204 sedi_uart_dma_xfer_t *xfer = (sedi_uart_dma_xfer_t *)(ctxt->dma_xfer); in sedi_dma_event_cb() local
212 if (xfer->callback) { in sedi_dma_event_cb()
213 xfer->callback(xfer->cb_param, SEDI_DRIVER_OK, line_err_status, in sedi_dma_event_cb()
214 xfer->len); in sedi_dma_event_cb()
217 if (xfer->callback) { in sedi_dma_event_cb()
218 xfer->callback(xfer->cb_param, SEDI_DRIVER_ERROR, line_err_status, in sedi_dma_event_cb()
219 xfer->len); in sedi_dma_event_cb()
229 if (xfer->callback) { in sedi_dma_event_cb()
230 xfer->callback(xfer->cb_param, SEDI_DRIVER_OK, line_err_status, in sedi_dma_event_cb()
231 xfer->len); in sedi_dma_event_cb()
234 if (xfer->callback) { in sedi_dma_event_cb()
235 xfer->callback(xfer->cb_param, SEDI_DRIVER_ERROR, line_err_status, in sedi_dma_event_cb()
236 xfer->len); in sedi_dma_event_cb()
299 vec_write_ctxt[uart].xfer.data = vec_xfer->vec[current_count].base; in io_vec_write_callback()
300 vec_write_ctxt[uart].xfer.data_len = vec_xfer->vec[current_count].len; in io_vec_write_callback()
302 uart_write_transfer[uart] = &vec_write_ctxt[uart].xfer; in io_vec_write_callback()
339 vec_read_ctxt[uart].xfer.data = vec_xfer->vec[current_count].base; in io_vec_read_callback()
340 vec_read_ctxt[uart].xfer.data_len = vec_xfer->vec[current_count].len; in io_vec_read_callback()
342 uart_read_transfer[uart] = &vec_read_ctxt[uart].xfer; in io_vec_read_callback()
832 int sedi_uart_write_async(IN sedi_uart_t uart, IN sedi_uart_transfer_t *const xfer) in sedi_uart_write_async() argument
835 DBG_CHECK(xfer != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_write_async()
845 uart_write_transfer[uart] = xfer; in sedi_uart_write_async()
855 int sedi_uart_read_async(IN sedi_uart_t uart, IN sedi_uart_transfer_t *const xfer) in sedi_uart_read_async() argument
858 DBG_CHECK(xfer != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_read_async()
870 uart_read_transfer[uart] = xfer; in sedi_uart_read_async()
1776 vec_write_ctxt[uart].xfer.data = vec_xfer->vec[0].base; in sedi_uart_write_vec_async()
1777 vec_write_ctxt[uart].xfer.data_len = vec_xfer->vec[0].len; in sedi_uart_write_vec_async()
1778 vec_write_ctxt[uart].xfer.callback_data = (void *)uart; in sedi_uart_write_vec_async()
1779 vec_write_ctxt[uart].xfer.callback = io_vec_write_callback; in sedi_uart_write_vec_async()
1781 uart_write_transfer[uart] = &vec_write_ctxt[uart].xfer; in sedi_uart_write_vec_async()
1812 vec_read_ctxt[uart].xfer.data = vec_xfer->vec[0].base; in sedi_uart_read_vec_async()
1813 vec_read_ctxt[uart].xfer.data_len = vec_xfer->vec[0].len; in sedi_uart_read_vec_async()
1814 vec_read_ctxt[uart].xfer.callback_data = (void *)uart; in sedi_uart_read_vec_async()
1815 vec_read_ctxt[uart].xfer.callback = io_vec_read_callback; in sedi_uart_read_vec_async()
1816 uart_read_transfer[uart] = &vec_read_ctxt[uart].xfer; in sedi_uart_read_vec_async()
1869 static int sedi_uart_dma_io_async(sedi_uart_t uart, const sedi_uart_dma_xfer_t *const xfer, in sedi_uart_dma_io_async() argument
1879 dma_write_ctxt[uart].dma_xfer = xfer; in sedi_uart_dma_io_async()
1880 ret = sedi_uart_dma_config(xfer->dma_dev, xfer->channel, sedi_dma_event_cb, in sedi_uart_dma_io_async()
1887 src = (uint32_t)xfer->data; in sedi_uart_dma_io_async()
1890 dma_read_ctxt[uart].dma_xfer = xfer; in sedi_uart_dma_io_async()
1891 ret = sedi_uart_dma_config(xfer->dma_dev, xfer->channel, sedi_dma_event_cb, in sedi_uart_dma_io_async()
1898 dst = (uint32_t)xfer->data; in sedi_uart_dma_io_async()
1905 ret = sedi_dma_control(xfer->dma_dev, xfer->channel, SEDI_CONFIG_DMA_HS_DEVICE_ID, in sedi_uart_dma_io_async()
1909 ret = sedi_dma_control(xfer->dma_dev, xfer->channel, SEDI_CONFIG_DMA_HS_DEVICE_ID_PER_DIR, in sedi_uart_dma_io_async()
1913 ret = sedi_dma_control(xfer->dma_dev, xfer->channel, SEDI_CONFIG_DMA_DIRECTION, dma_dir); in sedi_uart_dma_io_async()
1920 ret = sedi_dma_start_transfer(xfer->dma_dev, xfer->channel, src, dst, xfer->len); in sedi_uart_dma_io_async()
1981 int sedi_uart_dma_write_async(IN sedi_uart_t uart, IN sedi_uart_dma_xfer_t *const xfer) in sedi_uart_dma_write_async() argument
1985 DBG_CHECK(xfer != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_write_async()
1986 DBG_CHECK(xfer->dma_dev < SEDI_DMA_NUM, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_write_async()
1987 DBG_CHECK(xfer->data != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_write_async()
1988 DBG_CHECK(xfer->callback != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_write_async()
1995 ret = sedi_uart_dma_io_async(uart, xfer, WRITE); in sedi_uart_dma_write_async()
2002 const sedi_uart_dma_xfer_t *xfer = dma_write_ctxt[uart].dma_xfer; in sedi_uart_dma_write_terminate() local
2006 if (xfer == NULL) { in sedi_uart_dma_write_terminate()
2014 ret = sedi_dma_set_power(xfer->dma_dev, xfer->channel, SEDI_POWER_OFF); in sedi_uart_dma_write_terminate()
2016 ret = sedi_dma_uninit(xfer->dma_dev, xfer->channel); in sedi_uart_dma_write_terminate()
2017 if (xfer->callback && (ret == SEDI_DRIVER_OK)) { in sedi_uart_dma_write_terminate()
2018 xfer->callback(xfer->cb_param, SEDI_USART_ERROR_CANCELED, 0, 0); in sedi_uart_dma_write_terminate()
2025 int sedi_uart_dma_read_async(IN sedi_uart_t uart, IN sedi_uart_dma_xfer_t *const xfer) in sedi_uart_dma_read_async() argument
2028 DBG_CHECK(xfer != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_read_async()
2029 DBG_CHECK(xfer->dma_dev < SEDI_DMA_NUM, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_read_async()
2030 DBG_CHECK(xfer->data != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_read_async()
2031 DBG_CHECK(xfer->callback != NULL, SEDI_DRIVER_ERROR_PARAMETER); in sedi_uart_dma_read_async()
2038 ret = sedi_uart_dma_io_async(uart, xfer, READ); in sedi_uart_dma_read_async()
2045 const sedi_uart_dma_xfer_t *xfer = dma_read_ctxt[uart].dma_xfer; in sedi_uart_dma_read_terminate() local
2049 if (xfer == NULL) { in sedi_uart_dma_read_terminate()
2057 ret = sedi_dma_set_power(xfer->dma_dev, xfer->channel, SEDI_POWER_OFF); in sedi_uart_dma_read_terminate()
2059 ret = sedi_dma_uninit(xfer->dma_dev, xfer->channel); in sedi_uart_dma_read_terminate()
2060 if (xfer->callback && (ret == SEDI_DRIVER_OK)) { in sedi_uart_dma_read_terminate()
2061 xfer->callback(xfer->cb_param, SEDI_USART_ERROR_CANCELED, 0, 0); in sedi_uart_dma_read_terminate()