[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] FSLFIFO major number



Hi,

    It appears the nodes are already made when I check /dev.

crw-------    1 root     0         10, 192 Jan  1 00:00 fslfifo0
crw-------    1 root     0         10, 193 Jan  1 00:00 fslfifo1
crw-------    1 root     0         10, 194 Jan  1 00:00 fslfifo2
crw-------    1 root     0         10, 195 Jan  1 00:00 fslfifo3
crw-------    1 root     0         10, 196 Jan  1 00:00 fslfifo4
crw-------    1 root     0         10, 197 Jan  1 00:00 fslfifo5
crw-------    1 root     0         10, 198 Jan  1 00:00 fslfifo6
crw-------    1 root     0         10, 199 Jan  1 00:00 fslfifo7

    So when I run your program I get the following error:

/dev/fslfifo0: No such device

    I assume the file open call fails to find the device file because it gets confused by several other nodes with the same major device number (shown below)

crw-------    1 root     0         10, 185 Jan  1 00:00 gpio
crw-------    1 root     0         10, 185 Jan  1 00:00 gpio0
crw-------    1 root     0         10, 186 Jan  1 00:00 gpio1
crw-------    1 root     0         10, 187 Jan  1 00:00 gpio2
crw-------    1 root     0         10, 188 Jan  1 00:00 gpio3
crw-------    1 root     0         10, 189 Jan  1 00:00 gpio4
crw-------    1 root     0         10, 144 Jan  1 00:00 nvram
crw-------    1 root     0         10, 135 Jan  1 00:00 rtc

    I did not add these drivers in myself and do not know where they come from. If the major number is not the issue, please let me know what I am missing.

Thanks,

Simon

----- Original Message ----
From: Dr. Johann Pfefferl <j.pfefferl@xxxxxxxxx>
To: microblaze-uclinux@xxxxxxxxxxxxxx
Sent: Tuesday, January 29, 2008 12:57:44 AM
Subject: Re: [microblaze-uclinux] FSLFIFO major number

Hello,

the FSL link device belongs to the so called "misc" device class. These
devices have always the major number 10. The minor number starts at 192
(according to the source file ./drivers/misc/fslfifo/fslfifo.h). So you
have to create a device node like this:

mknod /dev/fslfifo0 c 10 192
mknod /dev/fslfifo1 c 10 193
...

Hope this helps,
  Hans

Simon Tam <simontam1234@xxxxxxxxx> wrote:
> Hi John,
>
>    I am using the FSLFIFO in the v0.3-RC1 release. The predefined device driver major number is 10. It clashes with several other devices. Can you help changing the major number to somewhere say 20? It will be great if you can show how I can do it myself too so I know how to fish in the future.
>
>
> Thanks,
>
> Simon
>

--
Dr. Johann Pfefferl  ------------  mailto j.pfefferl at eubus dot net
Eubus GmbH          http://www.eubus.net ++++ http://www.ebmhydraxc.com
Gollierstr. 70
D-80339 Muenchen
Phone: +49 (0)89 45 22 578-67    Fax: +49 (0)89 45 22 578-55
Registergericht Muenchen HRB 145 336, Ust-Id Nr. DE 225 783 933
Geschaeftsfuehrer: Volker Ulrich, Peter Sibities
==
-o)  A computer program does what you tell it to do,
/\\        not what you want it to do.             
_\_v-                                               
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/