Community
cancel
Showing results for 
Search instead for 
Did you mean: 
SKuma75
New Contributor I
1,037 Views

How to switch off the DMA mode in Quark SoC X1000??

Jump to solution

Hi Guys,

By default, DMA is enabled and being used by the UARTs in Intel Galileo Boards. The entry cat /sys/class/dma/dma*chan*/in_use shows 1 in all the 4 DMA channels which means that both the UARTs are using the DMA for both Tx FIFO as well as Rx FIFO ( DMA Support for Rx FIFO has now been added in BSP v1.2 for Yocto). But I want to switch off the DMA mode and want both the UARTs to operate in the normal PIO mode. To do this, I found from pg. 15 of quark-x1000-linux-sw-developers-manual.pdf that I need to add the following lines as the Kernel Parameter in grub.conf file :- intel_quark_hsuart_dma.uart0_dma=0 for UART0 and intel_quark_hsuart_dma.uart1_dma=0 for UART1.

Now the grub.conf looks like the following after making these entries into it:--

title Quark X1000 kernel-MassStorage initrd-MassStorage RootFS-MassStorage IMR-On IO-APIC/HPET NoEMU debug

root (hd0,0)

kernel /bzImage intel_quark_hsuart_dma.uart0_dma=0 , intel_quark_hsuart_dma.uart1_dma=0 root=/dev/ram0 console=ttyUSB0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,$EARLY_CON_ADDR_REPLACE,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5 rootimage=image-full-quark.ext3

initrd /core-image-minimal-initramfs-quark.cpio.gz

But inspite of adding these 2 lines and then booting the Board with these changes , I didn't find any difference. The UARTS are still using the DMA , and I can still see the above /sys entries showing 1 in all the 4 channels. (Please note that the error in UART numbering which was found in the BSP 1.1 and earlier versions have been fixed in v1.2).

Thanks in advance. Waiting for your responses.

Tags (1)
1 Solution
SKuma75
New Contributor I
125 Views

Hi Pablom_Intel,

The issue is now solved. There was an extra comma between the 2 entries which was creating the problem. The grub.conf file now looks like the following:-

title Quark X1000 kernel-MassStorage initrd-MassStorage RootFS-MassStorage IMR-On IO-APIC/HPET NoEMU debug

root (hd0,0)

kernel /bzImage intel_quark_hsuart_dma.uart0_dma=0 intel_quark_hsuart_dma.uart1_dma=0,root=/dev/ram0, console=ttyS1,115200n8 earlycon=uart82

initrd /core-image-minimal-initramfs-quark.cpio.gz

 

The dmesg shows :-

ttyS1 - failed to request DMA

ttyS0 - failed to request DMA

Also, cat /sys/class/dma/dma*chan*/in_use show 0 for all the four channels.

Thanks a lot for taking time out and digging into it, Pablom..

View solution in original post

4 Replies
Pablo_M_Intel
Employee
125 Views

Hi shubham_k,

Right now we are working on your case, as soon as we have an appropriate answer we will let you know.

Regards,

PabloM_Intel

Pablo_M_Intel
Employee
125 Views

By the way, are you adding these lines to the SPI Flash image or to the SD image?

Regards,

PabloM_Intel

SKuma75
New Contributor I
125 Views

I'm adding these lines to the SD Card image grub section of the grub.conf file.

SKuma75
New Contributor I
126 Views

Hi Pablom_Intel,

The issue is now solved. There was an extra comma between the 2 entries which was creating the problem. The grub.conf file now looks like the following:-

title Quark X1000 kernel-MassStorage initrd-MassStorage RootFS-MassStorage IMR-On IO-APIC/HPET NoEMU debug

root (hd0,0)

kernel /bzImage intel_quark_hsuart_dma.uart0_dma=0 intel_quark_hsuart_dma.uart1_dma=0,root=/dev/ram0, console=ttyS1,115200n8 earlycon=uart82

initrd /core-image-minimal-initramfs-quark.cpio.gz

 

The dmesg shows :-

ttyS1 - failed to request DMA

ttyS0 - failed to request DMA

Also, cat /sys/class/dma/dma*chan*/in_use show 0 for all the four channels.

Thanks a lot for taking time out and digging into it, Pablom..

View solution in original post

Reply