Memory mapping PCI memory region to user space

Phil Nitschke Phil.Nitschke at
Tue Mar 28 17:44:05 EST 2006

On Mon, 2006-03-27 at 20:55 -0800, David Hawkins wrote:

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

OK, I added the device ID(s).

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

That didn't work for me.  (Permission denied, IIRC)

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

Much better, thanks.  I might be able to use your program/driver as a
comparison to my own driver, at least as far as the mmap() goes, because
mine is broken and yours isn't!

Phil Nitschke <Phil.Nitschke at>
Avalon Systems Pty Ltd

More information about the Linuxppc-embedded mailing list