Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
* Using uio_dmem_genirq with device tree
       [not found] <e25ac9ca9f62447f9cdd26e6f3fdb80c@ES01AMSNLNT.srn.sandia.gov>
@ 2019-05-29 13:46 ` Greg Anders
  0 siblings, 0 replies; only message in thread
From: Greg Anders @ 2019-05-29 13:46 UTC (permalink / raw)
  To: Kernelnewbies

[-- Attachment #1.1: Type: text/plain, Size: 1247 bytes --]

     
 

 
 
Hello all,
 

 
I am trying to figure out how to use the uio_dmem_genirq driver with a platform device described in my device tree
 
   
My device tree entry looks something like this:
 

 
       mydevice: mydevice@a0001000 {
 
               compatible = "generic-uio";
 
               ...
 
       }
 

 
And in my bootargs I have
 

 
       uio_dmem_genirq.of_id="generic-uio"
 

 
This works when using uio_pdrv_genirq but not when using uio_dmem_genirq. By "works" I mean that with uio_pdrv_genirq I see my device mapped under /sys/class/uio, but there is no such mapping with uio_dmem_genirq.
 

 
Looking at the source for the drivers, I notice that the uio_pdrv_genirq driver has the following lines that are not included in uio_dmem_genirq:
 

 
       module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
 
       MODULE_PARAM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 

 
Do these lines need to be included for the uio_dmem_genirq driver to work?
 

 
I have read through the Userspace IO HOWTO but that guide doesn't cover using the generic UIO drivers with the device tree (as far as I can tell, I am a kernel newbie after all).
 

 
Thank you for your help,
 

 
Greg
     

[-- Attachment #1.2: Type: text/html, Size: 3897 bytes --]

<html><body><div id="edo-message"><div></div></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">Hello all,</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">I am trying to figure out how to use the uio_dmem_genirq driver with a platform device described in my device tree</span><br><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">My device tree entry looks something like this:</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">&nbsp; &nbsp; mydevice: mydevice@a0001000 {</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">&nbsp; &nbsp; &nbsp; &nbsp; compatible = "generic-uio";</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">&nbsp; &nbsp; &nbsp; &nbsp; ...</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">&nbsp; &nbsp; }</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">And in my bootargs I have</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">&nbsp; &nbsp; uio_dmem_genirq.of_id="generic-uio"</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">This works when using uio_pdrv_genirq but not when using uio_dmem_genirq. By "works" I mean that with uio_pdrv_genirq I see my device mapped under /sys/class/uio, but there is no such mapping with uio_dmem_genirq.</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">Looking at the source for the drivers, I notice that the uio_pdrv_genirq driver has the following lines that are not included in uio_dmem_genirq:</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">&nbsp; &nbsp; module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">&nbsp; &nbsp; MODULE_PARAM_DESC(of_id, "Openfirmware id of the device to be handled by uio");</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">Do these lines need to be included for the uio_dmem_genirq driver to work?</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">I have read through the Userspace IO HOWTO but that guide doesn't cover using the generic UIO drivers with the device tree (as far as I can tell, I am a kernel newbie after all).</span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original">Thank you for your help,</div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;"><br></span></div><div id="edo-original"><span style="-webkit-tap-highlight-color: transparent;">Greg</span></div></body></html>

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <e25ac9ca9f62447f9cdd26e6f3fdb80c@ES01AMSNLNT.srn.sandia.gov>
2019-05-29 13:46 ` Using uio_dmem_genirq with device tree Greg Anders

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox