Kernel Newbies archive on lore.kernel.org
 help / Atom feed
From: Greg Anders <greg@gpanders.com>
To: Kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Using uio_dmem_genirq with device tree
Date: Wed, 29 May 2019 07:46:48 -0600
Message-ID: <05c0fd1a-68f1-4429-ac47-e523b2d48db2@iPhone-8> (raw)
In-Reply-To: <e25ac9ca9f62447f9cdd26e6f3fdb80c@ES01AMSNLNT.srn.sandia.gov>

[-- 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

           reply index

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <e25ac9ca9f62447f9cdd26e6f3fdb80c@ES01AMSNLNT.srn.sandia.gov>]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05c0fd1a-68f1-4429-ac47-e523b2d48db2@iPhone-8 \
    --to=greg@gpanders.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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