AnsweredAssumed Answered

UIO Test on imx6dl sabresd board

Question asked by Ramappa HUgar on Dec 28, 2018

Dear all,

 

I want to perform UIO Testing on imx6dl sabresd target.

I enabled  the CONFIG_UIO=y and CONFIG_UIO_PDRV_GENIRQ=y in kernel. Added the entry in dts file as below.

+/ {

+ uio0_mmc3@219c000

{

+ compatible = "generic-uio";

+ reg = < 0x219c000 0x1000 >;

+ };

+};

I could able to see the sysfs entry. 

 

My test application is :

fd = open(DEVICE_NAME, O_RDWR);

size = getpagesize();

addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);

printf("Content is = 0x%x\n", *addr);

if (write(fd, "FF", 2) == 0)

printf("Content after writing is = 0x%x\n", *addr);

 

Reading is happening properly. It will show the content. 

After write, content is not getting changed. Previous content only shown. 

 

I need to perform both READ/WRITE tests. 

 

Let  me know if anything  is wrong in the test procedure.

Also suggest me, if you have any specific IO address for UIO test.

 

Thanks in advance.!

 

Thanks,

Ramappa

Outcomes