Hi,
I am using AM623 on LInux. I have tried to enable the DMA for the UART by modifying the device tree.
Below is the modification to use Block Copy DMA (BCDMA).
&main_uart0 { pinctrl-names = "default"; pinctrl-0 = <&main_uart0_pins_default>; dmas = <&main_bcdma 0 0x4400 0>, <&main_bcdma 0 0xc400 0>; dma-names = "rx", "tx"; };
Below is the modification to use Packet DMA (PKTDMA).
&main_uart0 {
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
dmas = <&main_pktdma 0x4400 0>, <&main_pktdma 0xc400 0>;
dma-names = "rx", "tx";
};
I believe PKTDMA is working for the UART because I can see the DMA channel is assigned to the UART.
root@p550:~# cat /sys/kernel/debug/dmaengine/summary
dma0 (485c0100.dma-controller): number of channels: 48
dma1 (485c0000.dma-controller): number of channels: 35
dma1chan0 | 2800000.serial:rx (DEV_TO_MEM, rchan0 [0x4400 -> 0x9000], rflow0, PDMA, Packet mode)
dma1chan1 | 2800000.serial:tx (MEM_TO_DEV, tchan0 [0x1000 -> 0xc400], tflow0, PDMA, Packet mode)
root@p550:~#
But, the BCDMA does not seem to work for UART. And below is the errors when using the UART with BCDMA.
root@p550:~# /tmp/test
[ 159.093326] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.102064] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.110956] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.120405] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.129429] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.138322] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.146916] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.155889] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.164522] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.173155] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.181746] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.190671] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.199298] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.208238] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.217133] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.226058] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.235341] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.244061] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.252705] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.261345] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.269937] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.278543] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.287114] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.295693] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.304275] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.312846] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.321412] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.330252] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.339164] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.347761] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.356418] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.365282] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.373934] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.382575] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.391166] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.399761] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.408317] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.416947] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.425557] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.434138] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.442707] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.451259] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.459869] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.468460] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.477042] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.485696] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.494353] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.502973] ti-bcdma 485c0100.dma-controller: Only TR mode is supported (psi-l thread 0x4400)
[ 159.511584] ti-bcdma 485c0100.dma-controller: get channel fail in udma_of_xlate.
[ 159.523993] omap8250 2800000.serial: failed to request DMA
Would like to verify whether the UART can use BCDMA or not ? Or the modification to the device tree is incorrect ?
rgds,
kc Wong
.
rgds,
kc Wong