Community
cancel
Showing results for 
Search instead for 
Did you mean: 
FerryT
Valued Contributor I
2,077 Views

Turn off DMA for the HSU (uart)

Does anybody know how to disable DMA of the high speed uart, going through the kernel code, I get the impression that using DMA is an option of the driver that is enabled by default.

The DMA is causing 2 problems for me:

  • after receiving data a 2ms delay that almost defeats the purpose of using a high baud rate
  • as I understand (correct me if I'm wrong) using DMA parity/framing errors are not converted to NULL char's (as the DMA hardware does not know about errors), so communication errors can go undetected (at the byte level).
0 Kudos
6 Replies
FerryT
Valued Contributor I
127 Views

See also this thread (the oscilloscope pictures) /thread/104138 https://communities.intel.com/thread/104138

idata
Community Manager
127 Views

Hi FerryT,

 

 

Let us investigate this a little bit more, we'll get back to you once we have some more information.

 

 

Regards,

 

-Pablo
idata
Community Manager
127 Views

Hi FerryT,

 

 

Thank you for your patience.

 

There is an option in the kernel menuconfig called "Intel MID DMA support for Peripheral DMA Controllers" that you can try to disable. You can also try disabling DMA configurations in the defconfig file and experiment with them, however, we haven't test these options so doing it would be at your own risk. Disabling those configurations may disable other interfaces and functions of Edison.

 

Also, remember that the menuconfig will generate a .config somewhere in the host machine, it will be necessary to copy this file to the write directory where the .defconfig file resides and also replace the contents of the .defconfig file with the .config file generated.

 

 

Regards,

 

-Pablo
FerryT
Valued Contributor I
127 Views

Hello Pablo,

I did some more research my self and found the following https://github.com/01org/edison-linux/blob/edison-3.10.17/drivers/tty/serial/mfd_core.c https://github.com/01org/edison-linux/blob/edison-3.10.17/drivers/tty/serial/mfd_core.c. In line 46-49 it says:

module_param(hsu_dma_enable, int, 0);

MODULE_PARM_DESC(hsu_dma_enable,

"It is a bitmap to set working mode, if bit[x] is 1, then port[x] will work in DMA mode, otherwise in PIO mode.");

So, possibly (if I'm looking in the right place?) this might be the kernel command line option that would disable the DMA without recompiling?

idata
Community Manager
127 Views

Hi Ferry,

 

 

Do you mind if we keep our interactions in this other post /thread/105426 https://communities.intel.com/thread/105426? We would like to have everything in one place if you don't have any issue with that.

 

 

Regards,

 

-Pablo
FerryT
Valued Contributor I
127 Views

For me no problem. But this thread is a question about dma and how to disable it, the other a problem that may be either a bug related to parity detection in our code or in the hsu driver code (if not something completely different), so 2 different things.

But lets's close this one then, if you prefer.

Ferry

Reply