From: David Hawkins <dwh@ovro.caltech.edu>
To: Phil.Nitschke@avalon.com.au
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Memory mapping PCI memory region to user space
Date: Mon, 27 Mar 2006 20:55:21 -0800 [thread overview]
Message-ID: <4428C1B9.4080200@ovro.caltech.edu> (raw)
In-Reply-To: <1143519660.24304.18.camel@lamorak.int.avalon.com.au>
Phil Nitschke wrote:
> On Mon, 2006-03-27 at 08:05 -0800, David Hawkins wrote:
>
>>Try building an insmodding the pci_io driver I posted, it'll pick
>>up the two BAR regions and allow you to access them, and you can
>>add more debugging comments to that code fairly easily.
>
>
>>http://www.ovro.caltech.edu/~dwh/pci_io.tar.gz
>
>
> Hi Dave,
>
> I tried your program briefly, but (I guess) since I'm not using udev,
> the program failed rather early, and I didn't persist for too long.
> I've attached a log of the session below.
>
> (I used it on a commercial VME carrier board with a PmPPC7448 PMC module
> and a PMC FPDP module, and a recent 2.6.16 kernel.org kernel built for
> PPC. I used the ELDK4 NFS filesystem.)
>
Sorry, I should have metioned. If udev is not installed then
the scripts that create the /dev nodes do not exist, so
you need to create them manually.
I don't see any probe calls in the driver log, so I'm not sure
that the driver has been told to register for that device ID.
You can either add your device ID to the pci IDs list in the
driver, or echo to a sysfs node ... let me see ... yeah
echo "129a:dd11" > /sys/bus/pci/drivers/pci_io/new_id
should do the trick.
Then you'll see probe callbacks and comments about
what major and start minor is assigned to each device.
Then create your dev nodes, eg major=254, minor=0, count=3
mknod /dev/pci_00:02.0_0 c 254 0
mknod /dev/pci_00:02.0_1 c 254 1
mknod /dev/pci_00:02.0_2 c 254 2
which is what you were trying already.
Give that a shot.
Dave
next prev parent reply other threads:[~2006-03-28 4:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-23 14:21 Memory mapping PCI memory region to user space Wyse, Chris
2006-03-23 15:44 ` Kumar Gala
2006-03-23 17:12 ` David Hawkins
2006-03-23 17:19 ` Kumar Gala
2006-03-23 17:43 ` Mark Chambers
2006-03-23 17:54 ` David Hawkins
2006-03-23 19:55 ` Mark Chambers
2006-03-23 20:26 ` David Hawkins
2006-03-23 17:46 ` David Hawkins
2006-03-27 8:02 ` Phil Nitschke
2006-03-27 16:05 ` David Hawkins
2006-03-28 4:21 ` Phil Nitschke
2006-03-28 4:55 ` David Hawkins [this message]
2006-03-28 6:44 ` Phil Nitschke
2006-03-28 16:35 ` David Hawkins
2006-03-27 16:18 ` Kumar Gala
2006-03-29 2:26 ` Phil Nitschke
2006-03-23 17:04 ` David Hawkins
-- strict thread matches above, loose matches on Subject: below --
2006-03-23 19:52 Wyse, Chris
2006-03-23 20:01 ` Kumar Gala
Reply instructions:
You may reply publicly 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=4428C1B9.4080200@ovro.caltech.edu \
--to=dwh@ovro.caltech.edu \
--cc=Phil.Nitschke@avalon.com.au \
--cc=linuxppc-embedded@ozlabs.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).