• Home
  • Raw
  • Download

Lines Matching refs:dma

154 	struct s3c24xx_uart_dma		*dma;  member
290 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c24xx_serial_stop_tx() local
310 if (dma && dma->tx_chan && ourport->tx_in_progress == S3C24XX_TX_DMA) { in s3c24xx_serial_stop_tx()
311 dmaengine_pause(dma->tx_chan); in s3c24xx_serial_stop_tx()
312 dmaengine_tx_status(dma->tx_chan, dma->tx_cookie, &state); in s3c24xx_serial_stop_tx()
313 dmaengine_terminate_all(dma->tx_chan); in s3c24xx_serial_stop_tx()
314 dma_sync_single_for_cpu(dma->tx_chan->device->dev, in s3c24xx_serial_stop_tx()
315 dma->tx_transfer_addr, dma->tx_size, in s3c24xx_serial_stop_tx()
317 async_tx_ack(dma->tx_desc); in s3c24xx_serial_stop_tx()
318 count = dma->tx_bytes_requested - state.residue; in s3c24xx_serial_stop_tx()
339 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c24xx_serial_tx_dma_complete() local
344 dmaengine_tx_status(dma->tx_chan, dma->tx_cookie, &state); in s3c24xx_serial_tx_dma_complete()
345 count = dma->tx_bytes_requested - state.residue; in s3c24xx_serial_tx_dma_complete()
346 async_tx_ack(dma->tx_desc); in s3c24xx_serial_tx_dma_complete()
348 dma_sync_single_for_cpu(dma->tx_chan->device->dev, in s3c24xx_serial_tx_dma_complete()
349 dma->tx_transfer_addr, dma->tx_size, in s3c24xx_serial_tx_dma_complete()
445 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c24xx_serial_start_tx_dma() local
450 dma->tx_size = count & ~(dma_get_cache_alignment() - 1); in s3c24xx_serial_start_tx_dma()
451 dma->tx_transfer_addr = dma->tx_addr + xmit->tail; in s3c24xx_serial_start_tx_dma()
453 dma_sync_single_for_device(dma->tx_chan->device->dev, in s3c24xx_serial_start_tx_dma()
454 dma->tx_transfer_addr, dma->tx_size, in s3c24xx_serial_start_tx_dma()
457 dma->tx_desc = dmaengine_prep_slave_single(dma->tx_chan, in s3c24xx_serial_start_tx_dma()
458 dma->tx_transfer_addr, dma->tx_size, in s3c24xx_serial_start_tx_dma()
460 if (!dma->tx_desc) { in s3c24xx_serial_start_tx_dma()
465 dma->tx_desc->callback = s3c24xx_serial_tx_dma_complete; in s3c24xx_serial_start_tx_dma()
466 dma->tx_desc->callback_param = ourport; in s3c24xx_serial_start_tx_dma()
467 dma->tx_bytes_requested = dma->tx_size; in s3c24xx_serial_start_tx_dma()
470 dma->tx_cookie = dmaengine_submit(dma->tx_desc); in s3c24xx_serial_start_tx_dma()
471 dma_async_issue_pending(dma->tx_chan); in s3c24xx_serial_start_tx_dma()
489 if (!ourport->dma || !ourport->dma->tx_chan || in s3c24xx_serial_start_next_tx()
507 if (!ourport->dma || !ourport->dma->tx_chan) in s3c24xx_serial_start_tx()
511 if (ourport->dma && ourport->dma->tx_chan) { in s3c24xx_serial_start_tx()
520 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c24xx_uart_copy_rx_to_tty() local
526 dma_sync_single_for_cpu(dma->rx_chan->device->dev, dma->rx_addr, in s3c24xx_uart_copy_rx_to_tty()
527 dma->rx_size, DMA_FROM_DEVICE); in s3c24xx_uart_copy_rx_to_tty()
535 ((unsigned char *)(ourport->dma->rx_buf)), count); in s3c24xx_uart_copy_rx_to_tty()
545 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c24xx_serial_stop_rx() local
568 if (dma && dma->rx_chan) { in s3c24xx_serial_stop_rx()
569 dmaengine_pause(dma->tx_chan); in s3c24xx_serial_stop_rx()
570 dma_status = dmaengine_tx_status(dma->rx_chan, in s3c24xx_serial_stop_rx()
571 dma->rx_cookie, &state); in s3c24xx_serial_stop_rx()
574 received = dma->rx_bytes_requested - state.residue; in s3c24xx_serial_stop_rx()
575 dmaengine_terminate_all(dma->rx_chan); in s3c24xx_serial_stop_rx()
616 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c24xx_serial_rx_dma_complete() local
624 dmaengine_tx_status(dma->rx_chan, dma->rx_cookie, &state); in s3c24xx_serial_rx_dma_complete()
625 received = dma->rx_bytes_requested - state.residue; in s3c24xx_serial_rx_dma_complete()
626 async_tx_ack(dma->rx_desc); in s3c24xx_serial_rx_dma_complete()
645 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c64xx_start_rx_dma() local
647 dma_sync_single_for_device(dma->rx_chan->device->dev, dma->rx_addr, in s3c64xx_start_rx_dma()
648 dma->rx_size, DMA_FROM_DEVICE); in s3c64xx_start_rx_dma()
650 dma->rx_desc = dmaengine_prep_slave_single(dma->rx_chan, in s3c64xx_start_rx_dma()
651 dma->rx_addr, dma->rx_size, DMA_DEV_TO_MEM, in s3c64xx_start_rx_dma()
653 if (!dma->rx_desc) { in s3c64xx_start_rx_dma()
658 dma->rx_desc->callback = s3c24xx_serial_rx_dma_complete; in s3c64xx_start_rx_dma()
659 dma->rx_desc->callback_param = ourport; in s3c64xx_start_rx_dma()
660 dma->rx_bytes_requested = dma->rx_size; in s3c64xx_start_rx_dma()
662 dma->rx_cookie = dmaengine_submit(dma->rx_desc); in s3c64xx_start_rx_dma()
663 dma_async_issue_pending(dma->rx_chan); in s3c64xx_start_rx_dma()
723 struct s3c24xx_uart_dma *dma = ourport->dma; in s3c24xx_serial_rx_chars_dma() local
741 dmaengine_pause(dma->rx_chan); in s3c24xx_serial_rx_chars_dma()
742 dmaengine_tx_status(dma->rx_chan, dma->rx_cookie, &state); in s3c24xx_serial_rx_chars_dma()
743 dmaengine_terminate_all(dma->rx_chan); in s3c24xx_serial_rx_chars_dma()
744 received = dma->rx_bytes_requested - state.residue; in s3c24xx_serial_rx_chars_dma()
868 if (ourport->dma && ourport->dma->rx_chan) in s3c24xx_serial_rx_irq()
881 if (ourport->dma && ourport->dma->tx_chan && in s3c24xx_serial_tx_chars()
1058 struct s3c24xx_uart_dma *dma = p->dma; in s3c24xx_serial_request_dma() local
1064 dma->rx_conf.direction = DMA_DEV_TO_MEM; in s3c24xx_serial_request_dma()
1065 dma->rx_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; in s3c24xx_serial_request_dma()
1066 dma->rx_conf.src_addr = p->port.mapbase + S3C2410_URXH; in s3c24xx_serial_request_dma()
1067 dma->rx_conf.src_maxburst = 1; in s3c24xx_serial_request_dma()
1069 dma->tx_conf.direction = DMA_MEM_TO_DEV; in s3c24xx_serial_request_dma()
1070 dma->tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; in s3c24xx_serial_request_dma()
1071 dma->tx_conf.dst_addr = p->port.mapbase + S3C2410_UTXH; in s3c24xx_serial_request_dma()
1072 dma->tx_conf.dst_maxburst = 1; in s3c24xx_serial_request_dma()
1074 dma->rx_chan = dma_request_chan(p->port.dev, "rx"); in s3c24xx_serial_request_dma()
1076 if (IS_ERR(dma->rx_chan)) { in s3c24xx_serial_request_dma()
1078 ret = PTR_ERR(dma->rx_chan); in s3c24xx_serial_request_dma()
1082 ret = dma_get_slave_caps(dma->rx_chan, &dma_caps); in s3c24xx_serial_request_dma()
1090 dmaengine_slave_config(dma->rx_chan, &dma->rx_conf); in s3c24xx_serial_request_dma()
1092 dma->tx_chan = dma_request_chan(p->port.dev, "tx"); in s3c24xx_serial_request_dma()
1093 if (IS_ERR(dma->tx_chan)) { in s3c24xx_serial_request_dma()
1095 ret = PTR_ERR(dma->tx_chan); in s3c24xx_serial_request_dma()
1099 ret = dma_get_slave_caps(dma->tx_chan, &dma_caps); in s3c24xx_serial_request_dma()
1107 dmaengine_slave_config(dma->tx_chan, &dma->tx_conf); in s3c24xx_serial_request_dma()
1110 dma->rx_size = PAGE_SIZE; in s3c24xx_serial_request_dma()
1112 dma->rx_buf = kmalloc(dma->rx_size, GFP_KERNEL); in s3c24xx_serial_request_dma()
1113 if (!dma->rx_buf) { in s3c24xx_serial_request_dma()
1118 dma->rx_addr = dma_map_single(dma->rx_chan->device->dev, dma->rx_buf, in s3c24xx_serial_request_dma()
1119 dma->rx_size, DMA_FROM_DEVICE); in s3c24xx_serial_request_dma()
1120 if (dma_mapping_error(dma->rx_chan->device->dev, dma->rx_addr)) { in s3c24xx_serial_request_dma()
1127 dma->tx_addr = dma_map_single(dma->tx_chan->device->dev, in s3c24xx_serial_request_dma()
1130 if (dma_mapping_error(dma->tx_chan->device->dev, dma->tx_addr)) { in s3c24xx_serial_request_dma()
1139 dma_unmap_single(dma->rx_chan->device->dev, dma->rx_addr, in s3c24xx_serial_request_dma()
1140 dma->rx_size, DMA_FROM_DEVICE); in s3c24xx_serial_request_dma()
1142 kfree(dma->rx_buf); in s3c24xx_serial_request_dma()
1144 dma_release_channel(dma->tx_chan); in s3c24xx_serial_request_dma()
1146 dma_release_channel(dma->rx_chan); in s3c24xx_serial_request_dma()
1155 struct s3c24xx_uart_dma *dma = p->dma; in s3c24xx_serial_release_dma() local
1157 if (dma->rx_chan) { in s3c24xx_serial_release_dma()
1158 dmaengine_terminate_all(dma->rx_chan); in s3c24xx_serial_release_dma()
1159 dma_unmap_single(dma->rx_chan->device->dev, dma->rx_addr, in s3c24xx_serial_release_dma()
1160 dma->rx_size, DMA_FROM_DEVICE); in s3c24xx_serial_release_dma()
1161 kfree(dma->rx_buf); in s3c24xx_serial_release_dma()
1162 dma_release_channel(dma->rx_chan); in s3c24xx_serial_release_dma()
1163 dma->rx_chan = NULL; in s3c24xx_serial_release_dma()
1166 if (dma->tx_chan) { in s3c24xx_serial_release_dma()
1167 dmaengine_terminate_all(dma->tx_chan); in s3c24xx_serial_release_dma()
1168 dma_unmap_single(dma->tx_chan->device->dev, dma->tx_addr, in s3c24xx_serial_release_dma()
1170 dma_release_channel(dma->tx_chan); in s3c24xx_serial_release_dma()
1171 dma->tx_chan = NULL; in s3c24xx_serial_release_dma()
1192 if (ourport->dma) in s3c24xx_serial_shutdown()
1211 if (ourport->dma) in s3c64xx_serial_shutdown()
1237 if (ourport->dma) in apple_s5l_serial_shutdown()
1293 if (ourport->dma) { in s3c64xx_serial_startup()
1296 devm_kfree(port->dev, ourport->dma); in s3c64xx_serial_startup()
1297 ourport->dma = NULL; in s3c64xx_serial_startup()
2068 ourport->dma = devm_kzalloc(port->dev, in s3c24xx_serial_init_port()
2069 sizeof(*ourport->dma), in s3c24xx_serial_init_port()
2071 if (!ourport->dma) { in s3c24xx_serial_init_port()