Hi,
We are using the below TI chipset for my project.
SoC: AM62X SR1.0 GP Model: Texas Instruments K3 AM625 SoC
I have modified the device tree to use Packet DMA (PKTDMA) for the UART.
&main_uart0 { pinctrl-names = "default"; pinctrl-0 = <&main_uart0_pins_default>; dmas = <&main_pktdma 0x4400 0>, <&main_pktdma 0xc400 0>; dma-names = "rx", "tx"; };
As CONFIG_SERIAL_8250_DMA is defined, the RX DMA function is "omap_8250_rx_dma()" in 8250_omap.c file, and not "serial8250_rx_dma()" function in 8250_dma.c file.
3.2.2.12. UART — Processor SDK AM62x Documentation
By using printk, I understand that the RX DMA is only being setup when the FIFO has data and this is done through the UART IRQ.
static void am654_8250_handle_rx_dma(struct uart_8250_port *up, u8 iir, unsigned char status) { /* * Queue a new transfer if FIFO has data. */ if ((status & (UART_LSR_DR | UART_LSR_BI)) && (up->ier & UART_IER_RDI)) { omap_8250_rx_dma(up); serial_out(up, UART_OMAP_EFR2, UART_OMAP_EFR2_TIMEOUT_BEHAVE); }
I would like to understand if the below DMA operation is possible on this SOC.
One time setup for the UART RX DMA and then let the UART core to send the DMA request to initiate the DMA transfer whenever RX FIFO has data without involving CPU.
And the DMA core will continue to advance to the next buffer descriptor until the end and then goes back to the first buffer descriptor in cyclic mode.
Of course, DMA core needs to have a way to report the progress as how many data has been transferred.
The reason for this requirement is that our measurement data will be streaming continuously from the measurement hardware at 3.125Mbps baudrate.
The product needs to meet the 50,000 readings per second. Hence, we don't want to have 50,000 interrupts per second to the system.
rgds,
kc Wong