Re: Using vme_tsi148 device driver from user space

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

 



Please keep your responses on list...

On 22/11/11 18:17, Zvi Vered wrote:
> Dear Mr. Welch,
> 
> I tried the following sequence:
> 
> 1. insmod vme.ko
> 2. insmod vme_tsi148.ko
> 3. insmod vme_user.ko bus=0
> 4. mdev -s
> 
> Upon completion I got the following files in /dev:
> 
> bus!vme!m0
> bus!vme!m1
> bus!vme!m2
> bus!vme!m3
> bus!vme!s0
> bus!vme!s1
> bus!vme!s2
> bus!vme!s3
> 
> The file names are strange (the '!' character).
> 
> According to the documentation the files should be: bus/vme/m0 ... bus/vme/s4
> But bus,vme folders are not created.
> 
> Can you help ?
> 

Just tried it here:

# modprobe vme_user bus=0
vme_user: module is from the staging directory, the quality is unknown, you
have been warned.
VME User Space Access Driver
# cd /dev/bus
# ls
usb  vme
# cd vme
# ls -la
total 0
drwxr-xr-x 2 root root    220 Nov 23 09:22 .
drwxr-xr-x 4 root root     80 Nov 23 09:22 ..
crw-rw---- 1 root root 221, 8 Nov 23 09:22 ctl
crw-rw---- 1 root root 221, 0 Nov 23 09:22 m0
crw-rw---- 1 root root 221, 1 Nov 23 09:22 m1
crw-rw---- 1 root root 221, 2 Nov 23 09:22 m2
crw-rw---- 1 root root 221, 3 Nov 23 09:22 m3
crw-rw---- 1 root root 221, 4 Nov 23 09:22 s0
crw-rw---- 1 root root 221, 5 Nov 23 09:22 s1
crw-rw---- 1 root root 221, 6 Nov 23 09:22 s2
crw-rw---- 1 root root 221, 7 Nov 23 09:22 s3
#

Our user space uses udev, that seems to be creating the directory structure
correctly. It appears that the version of mdev you are using isn't. Which
version of busybox are you using? It appears from the busybox website that
support for the "!" syntax was added to mdev in busybox 1.17.0.

Martyn

> Thanks,
> Zvika.
> 
> ----- Original Message ----- From: "Martyn Welch" <martyn.welch@xxxxxx>
> To: "Zvi Vered" <veredz72@xxxxxxxxx>
> Cc: <devel@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Monday, November 21, 2011 19:23
> Subject: Re: Using vme_tsi148 device driver from user space
> 
> 
>> On 21/11/11 17:18, Zvi Vered wrote:
>>> Dear Mr. Welch,
>>>
>>> I would like to appriciate your reply.
>>>
>>> This is what I want to do in the rcS script:
>>>
>>> 1. insmod vme_tsi148.ko
>>> 2. insmod vme_user.ko bus=0
>>> 3. mdev -s
>>>
>>> In kernel configuration , CONFIG_VME_TSI148=m, CONFIG_VME_USER=m so upon 'make
>>> modules', the 2 modules are built.
>>>
>>> Upon rcS completion I expect to find the files:  /dev/bus/vme/m0 ...
>>> /dev/bus/vme/s3
>>>
>>> Am I right ?
>>>
>>
>> Have you tried that?
>>
>> Martyn
>>
>>> Thanks,
>>> Zvika.
>>>
>>> ----- Original Message ----- From: "Martyn Welch" <martyn.welch@xxxxxx>
>>> To: "Zvi Vered" <veredz72@xxxxxxxxx>
>>> Cc: <devel@xxxxxxxxxxxxxxxxxxxxxx>
>>> Sent: Monday, November 21, 2011 13:52
>>> Subject: Re: Using vme_tsi148 device driver from user space
>>>
>>>
>>>> On 21/11/11 03:02, Zvi Vered wrote:
>>>>> Hello,
>>>>>
>>>>> I'm not a developer and I need help on staging/vme/bridges.
>>>>> So please bare with me.
>>>>>
>>>>> My Core2Duo x86 target contains a TSI148 PCI to VME bridge.
>>>>> In Kernel configuration I set CONFIG_VME_TSI148=y
>>>>>
>>>>> Duding boot, this device is initiated and registered.
>>>>>
>>>>> But after 'mdev -s' there is no new device in /dev .
>>>>>
>>>>> The vme_tsi148.c does not contain an IOCTL section. Only .probe,.remove.
>>>>>
>>>>> So how (on earth !) can I open a new master window ?
>>>>>
>>>>
>>>> The VME bridge drivers do not provide a user space API. They register with
>>>> the
>>>> VME core, which provides a kernel space API. This API is documented in
>>>> "drivers/staging/vme/vme_api.txt".
>>>>
>>>>> What major+minor numbers should I use for mknod ?
>>>>>
>>>>
>>>> If you are using udev, the device nodes will be automatically created.
>>>>
>>>>> How can I access the VME using this driver ?
>>>>>
>>>>
>>>> Using the in kernel API.
>>>>
>>>>> Must I use CONFIG_VME_USER=y also ?
>>>>>
>>>>
>>>> Tf you want access from user space, that module provides some basic access to
>>>> the VME bus.
>>>>
>>>> Martyn
>>>>
>>>> -- 
>>>> Martyn Welch (Lead Software Engineer)  | Registered in England and Wales
>>>> GE Intelligent Platforms               | (3828642) at 100 Barbirolli Square
>>>> T +44(0)1327322748                     | Manchester, M2 3AB
>>>> E martyn.welch@xxxxxx                  | VAT:GB 927559189
>>>
>>
>>
>> -- 
>> Martyn Welch (Lead Software Engineer)  | Registered in England and Wales
>> GE Intelligent Platforms               | (3828642) at 100 Barbirolli Square
>> T +44(0)1327322748                     | Manchester, M2 3AB
>> E martyn.welch@xxxxxx                  | VAT:GB 927559189 
> 


-- 
Martyn Welch (Lead Software Engineer)  | Registered in England and Wales
GE Intelligent Platforms               | (3828642) at 100 Barbirolli Square
T +44(0)1327322748                     | Manchester, M2 3AB
E martyn.welch@xxxxxx                  | VAT:GB 927559189
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux