select would be blocked when UART DMA congured

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

select would be blocked when UART DMA congured

544 Views
mashaofeng
Contributor III

dear :

on imx8qxp platform , we have ttyLP2 uart port , if will configure DMA in dts , the upper layer application would be blocked sometimes;

the dts configuration:

assigned-clocks = <&clk IMX8QXP_UART2_CLK>;
  assigned-clock-rates = <80000000>;
  power-domains = <&pd_dma2_chan13>;
  dma-names = "tx","rx";
  dmas = <&edma2 13 0 0>,
   <&edma2 12 0 1>;

the application call 

iRet = pselect(s_fd + 1, &fdset, NULL, NULL, NULL,NULL);

the application would be blocked in pselect function;

if we modify pselect to :

iRet = pselect(s_fd + 1, &fdset, NULL, NULL, &timeout,NULL);

sometimes it would be timeout , and if timeout occoured , it will always timeout;

but  if we ignore tiemout , it means  we don't care the case iRet==0 and read data directily ,it seems  we can read the data;

if we don't use rx DMA , there are no issue;

but if we don't use DMA, there are high CPU occupany

it seems tty's select and poll function on imx8qxp have issue ;

how to fix it ?    

thanks

0 Kudos
2 Replies

510 Views
igorpadykov
NXP Employee
NXP Employee

Hi ma

what bsp usaed in the case, suggest to use one from nxp official

 source.codeaurora.org/external/imx/linux-imx  repository, where dma is already

enabled:

pastedImage_2.jpg

fsl-imx8dx.dtsi\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel 

Documentation:

i.MX Software | NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

510 Views
mashaofeng
Contributor III

yes , it is enabled , but we found the issue , then we disabled it;

we use the kernel 4.14.98;

0 Kudos