cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
14,821 Views
Registered: ‎02-13-2015

generic UIO broken

Hello,

 

for the current kernel 3.18.0 on GIT it seems that generic UIO does not work anymore, if configured with device tree node "generic-uio". Reason is that entry "{ .compatible = "generic-uio"  } in the definition of structure "of_device_id_uio_of_genirq_match" in file "drivers/uio/uio_pdrv_genirq.c" has been removed.

 

Why has it been changed? Please fix.

 

cheers,

dfrie

 

Tags (3)
0 Kudos
13 Replies
Highlighted
Scholar
Scholar
14,807 Views
Registered: ‎05-28-2013

0 Kudos
Highlighted
Visitor
Visitor
14,744 Views
Registered: ‎02-13-2015

Thanks, that fixed it.

 

0 Kudos
Highlighted
Visitor
Visitor
14,478 Views
Registered: ‎12-02-2014

I meet this problem too. But it tel me "unknown feild 'compatile' specified in initializer" when I compile linux-xlnx-master (downloaded on 3/20/2015).

0 Kudos
Highlighted
Scholar
Scholar
14,470 Views
Registered: ‎05-28-2013

Hmm, is it possible you have a typo? The field is called "compatible", not "compatile".

0 Kudos
Highlighted
Visitor
Visitor
14,460 Views
Registered: ‎12-02-2014

Oh, thank you very much. It's my fault, sorry.

0 Kudos
Highlighted
Anonymous
Not applicable
13,939 Views

I'm don't understatand manner for this modification.

Why { .compatible = "generic-uio", } is a hack?

And how use UIO on Zynq now?

 

How I see, UIO can not work without this code.

 

 

Sorry for my English, it's not my native language

0 Kudos
Highlighted
Visitor
Visitor
13,930 Views
Registered: ‎12-02-2014

It seems a bug of linux kernel. You can find the device /dev/uio0 after you modify this problem and the devicetree.dtb is also modified accordingly.

0 Kudos
Highlighted
Visitor
Visitor
12,684 Views
Registered: ‎08-21-2014

Where can I modify the bootargs?
I've tried by appending the string

 

 uio_pdrv_genirq.of_id=\"generic-uio\"

to CONFIG_CMDLINE in the kernel config (in "boot options"), but that did not work at all...

I guess, that is due to the setting
CONFIG_CMDLINE_FROM_BOOTLOADER=y

So, where can I change the uboot-bootargs?

 

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
12,678 Views
Registered: ‎09-10-2008

Hi,

 

You need to alter the bootargs in the device tree. You need it in system-top.dts to prevent it from being overwritten by Petalinux if you regenerate the trees.

 

At one point I had played with that and here's what I show in my notes but I've not messed with it for a while.  You might be able to use only the chosen section but I didn't verify that.  You take that section from the system-conf.dts for your system as this is overriding what is in that file.

 

/dts-v1/;

/include/ "system-conf.dtsi"

/ {

};

/ {

       model = "702-axi-gpio-irq";

       aliases {

               serial0 = &uart1;

               ethernet0 = &gem0;

       };

       chosen {

               bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";

       };

       memory {

               device_type = "memory";

               reg = <0x0 0x40000000>;

       };

};

 

Thanks

John

Highlighted
Observer
Observer
6,516 Views
Registered: ‎02-03-2016

Hello everybody,

If anyone was able to correctly include the "chosen" in system-top.dts file and eventually see the uio devices. Please share your solution here. I am stuck at the same place.
I have added compatible=generic-uio in system-top.dts file for gpio devices that I want to access through sysfs, unfortunately none of the devices are showing up. the devices are in PL by the way so i have enable the PL clock also in the system-top.dts. Please guide me.
0 Kudos
Highlighted
Observer
Observer
6,511 Views
Registered: ‎02-03-2016

The question i am asking is - where to add chosen {bootargs=} in system-top.dts. Even after adding "compatible=generi-uio" the devices are not showing in /sys/class/uio. Can someone share steps for accessing uio interface for gpiop for 2015.4?
here is my system-top.dts -

//dts-v1/;
/include/ "system-conf.dtsi"
/ {

};
/{
chosen
{
bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
};
};
&clkc {
fclk-enable = <0xf>;
ps-clk-frequency = <33333333>;
};

&btns_5bits {
compatible = "generic-uio";
};

&leds_8bits {
compatible = "generic-uio";
};

&sws_8bits {
compatible = "generic-uio";
};

Please guide
0 Kudos
Highlighted
Observer
Observer
6,507 Views
Registered: ‎02-03-2016

Hi,
Got it working by specifying the bootargs=console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio at the uboot command prompt.

uboot$ setenv bootargs console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio

uboot$ saveenv

Can someone please guide me on how to make these bootargs work without involving uboot commandline. How to configure this in petalinux 2015.4. Thanks
0 Kudos
Highlighted
Explorer
Explorer
5,781 Views
Registered: ‎11-22-2015

 

Same as you, I added the following to entries I wanted to have UIO, 

compatible = "generic-uio";

 

However, I modified the driver directly to support that compat string.   Actually I like the idea of just modifying the devicetree but I don't understand why cmdline in your system dts is not working.   Did cat /proc/cmdline to verify the cmdline was changing?

 

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c

index f598ecd..cc69605 100644

--- a/drivers/uio/uio_pdrv_genirq.c

+++ b/drivers/uio/uio_pdrv_genirq.c

@@ -253,6 +253,7 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {

 

#ifdef CONFIG_OF

static struct of_device_id uio_of_genirq_match[] = {

+       { .compatible = "generic-uio", },

        { /* This is filled with module_parm */ },

        { /* Sentinel */ },

};

0 Kudos